Configuration Options
You can customize the behavior of the UserView iOS SDK through local configuration options.
Setting Configuration
Pass a PartialConfiguration when initializing the SDK:
let localConfig = PartialConfiguration(
settings: PartialConfiguration.Settings(
requireAuthorizationForSession: true,
authorizationPromptTitle: "Screen Sharing Request",
authorizationPromptMessage: "Allow {%agentName%|Support} to view your screen?",
endOfScreenshareMessage: "Thanks for using screen sharing!",
translationsYes: "Allow",
translationsNo: "Decline"
)
)
let upscopeManager = UpscopeManager(
apiKey: "YOUR_API_KEY",
localConfig: localConfig
)
Configuration Options
Message Placeholders
The authorizationPromptMessage supports these placeholders:
{%agentName%|fallback}- Agent's name with a fallback if unavailable{%currentDomain%}- App name on iOS
Example:
authorizationPromptMessage: "{%agentName%|Our support team} would like to view your screen"
UI Display
| Option | Type | Default | Description |
|---|---|---|---|
showTerminateButton | Bool | false | Show a button to end the screen sharing session. |
showUpscopeLink | Bool | false | Show Upscope branding link. |
endOfScreenshareMessage | String | — | Message displayed when the session ends. |
Lookup Code
| Option | Type | Default | Description |
|---|---|---|---|
enableLookupCodeOnShake | Bool | true | Show lookup code popup when device is shaken. |
lookupCodeKeyTitle | String | — | Custom title for the shake detection alert. |
lookupCodeKeyMessage | String | — | Custom message for shake alert. Supports {%lookupCode%} placeholder. |
Localization Strings
| Option | Type | Description |
|---|---|---|
translationsYes | String | Custom text for "Allow" button in authorization prompt. |
translationsNo | String | Custom text for "Deny" button in authorization prompt. |
translationsOk | String | Custom text for "OK" button. |
translationsStopSession | String | Custom text for stop session button. |
System Options
| Option | Type | Description |
|---|---|---|
autoconnect | Bool | Automatically connect on initialization. |
beta | Bool | Enable beta features. |
teamDomain | String | Custom team domain. |
defaultRegion | String | Default region for connections. |
Full Example
let config = PartialConfiguration(
settings: PartialConfiguration.Settings(
requireAuthorizationForSession: true,
authorizationPromptTitle: "Screen Share",
authorizationPromptMessage: "{%agentName%|Support} wants to help you",
showTerminateButton: true,
endOfScreenshareMessage: "Session ended. Thank you!",
enableLookupCodeOnShake: true,
lookupCodeKeyTitle: "Your Code",
lookupCodeKeyMessage: "Share this code: {%lookupCode%}",
translationsYes: "Yes, share",
translationsNo: "No thanks",
translationsOk: "Got it",
translationsStopSession: "End Session"
),
defaultRegion: "United States"
)
let manager = UpscopeManager(apiKey: "YOUR_API_KEY", localConfig: config)
