- iOS 16.0+
- Swift 5.9+
- Xcode 15.0+
Add the following line to your Podfile:
pod 'UpscopeIO', '~> 2025.11.6'Then run:
pod installAdd the following dependency to your Package.swift:
dependencies: [
.package(url: "https://github.com/upscopeio/cobrowsing-ios.git", from: "2025.11.6")
]import UpscopeIO
// In your AppDelegate or App initialization
let upscopeManager = UpscopeManager(apiKey: "YOUR_API_KEY")
UpscopeManager.shared = upscopeManager // Required for redaction to work
upscopeManager.connect()// Generate a code for your support agent
let code = upscopeManager.getCode()
print("Share this code with support: \(code)")TextField("Credit Card", text: $creditCardNumber)
.upscopeRedacted()
SecureField("Password", text: $password)
.upscopeRedacted()creditCardTextField.markAsRedacted()
passwordTextField.markAsRedacted()let config = PartialConfiguration(
settings: PartialConfiguration.Settings(
requireAuthorizationForSession: true,
authorizationPromptTitle: "Screen Sharing Request",
authorizationPromptMessage: "Support would like to view your screen",
endOfScreenshareMessage: "Thank you for sharing your screen. The session has ended.",
translationsOk: "OK"
)
)
let upscopeManager = UpscopeManager(
apiKey: "YOUR_API_KEY",
localConfig: config
)// Start a session programmatically
upscopeManager.startSession()
// End the current session
upscopeManager.endSession()
// Get session status
if let session = upscopeManager.session {
print("Session ID: \(session.id)")
print("Status: \(session.status)")
}For comprehensive documentation, visit https://cobrowsingapi.com/docs
- 📧 Email: support@upscope.com
- 💬 Live Chat: Visit upscope.com
Current version: 2025.11.6