Swiftpack.co - uxcam/ios-swiftui as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by uxcam.
uxcam/ios-swiftui 1.0.4
This is a wrapper on top of the native iOS UXCam SDK for improved SwiftUI capture
⭐️ 2
🕓 43 weeks ago
.package(url: "https://github.com/uxcam/ios-swiftui.git", from: "1.0.4")

⚠️ Deprecated ⚠️

This repository is deprecated and will no longer be supported for future SDK versions. Please migrate to our newer repository at uxcam-ios-swiftui.


This package is the framework for the UXCam SwiftUI wrapper. It depends on the main UXCam framework, v3.4.3 or higher.

Internally it uses some of the ideas in the Introspect library, but that library itself is not included here.

Using SwiftUI with UXCam

Starting the UXCam library

Add an init method to your main App struct.

Call UXCamSwiftUI.start(with: UXCamSwiftUI.Configuration) with your configuration to start the UXCam SDK in SwiftUI mode. NB: The configuration option enableAutomaticScreenNameTagging defaults to false in the UXCamSwiftUI library as manual screen tagging is required in SwiftUI.


		let config = UXCamSwiftUI.Configuration(appKey: "YOUR APP KEY")
		UXCamSwiftUI.start(with: config)

To call a completion block when the UXCam session verify completes use:
UXCamSwiftUI.start(with: UXCamSwiftUI.Configuration, sessionStarted: ((Bool) -> ())? = nil) - the flag indicates if a session started or not

Screen name tagging

Due to the nature of SwiftUI the automatic screen name tagging in UXCam for UIKit is not available.

To name screens use func uxcamTagScreenName(_ screenName: String) -> some View on the View


var body: some View
	Text("Hello world")

Sensitive view hiding

Use func uxcamOcclude() -> some View on a view to hide it from screen recording. By default gestures will not be captured in sensitve views, to capture gestures use .uxcamOcclude(blockGestures: false)


var body: some View  
		Text("Personal data: XYZ")  

		Text("Personal data: Gestures seen")  
			.uxcamOcclude(blockGestures: false)


Stars: 2
Last commit: 4 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Related Packages

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics