πŸ“˜

All UXCam properties and methods are also available in UXCamSwiftUI without additional import of UXCam and can be accessed using UXCamCore. For eg. UXCam.isRecording() can be accessed into UXCamSwiftUI as UXCamCoreSwiftUI.isRecording()

pod version

SDK Integration

If you're building your app using SwiftUI, please integrate UXCam using Swift Package Manager or Cocoapods using the following steps:


Cocoapods

  • Add to the Podfile
pod 'UXCamSwiftUI'
  • Run pod install in the project directory to download dependency.

Swift Package Manager


Add UXCamSwiftUI Package:

902

https://github.com/uxcam/uxcam-ios-swiftui

Initialization Steps:

  • Import UXCam at the top of your main App struct:
import UXCamSwiftUI
  • Add an init method to your main App struct and add the following calls:
init(){
     UXCamCore.optIntoSchematicRecordings()
     let config = Configuration(appKey: "YOUR APP KEY")
     UXCamSwiftUI.start(with: config)
}

πŸ‘

That completes the integration process.
Your session will be shown on the dashboard within a few seconds after the app goes in the background.
You can optionally use the API's for customizations such as identifying users from your database with UXCam, tagging sessions or hiding sensitive views.

🚧

Automatic Screen Tagging is not available for the UXCamSwiftUI library due to the nature of SwiftUI, manual screen tagging is required, using our tagScreenName API.

Screen Tagging and Hiding Sensitive Data for Swift UI have some differences and you can check some examples on the documentation, all other customization APIs provided by UXCam can be called regularly done with iOS by importing UXCam and calling the desired method.

πŸ“˜

SDK Updates

To check all the information on the fixes and improvements on the latest versions of the SDK, please visit this page.


What’s Next