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 0.8.5
This is a wrapper on top of the native iOS UXCam SDK for improved SwiftUI capture
⭐️ 0
🕓 2 days ago
iOS
.package(url: "https://github.com/uxcam/ios-swiftui.git", from: "0.8.5")

UXCam-SwiftUI

Version: 0.8.5 - pre-release - use with caution

This package is the framework for the UXCam SwiftUI wrapper. It depends on the main UXCam framework, v3.4.0 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 is not available in the UXCamSwiftUI library (manual screen tagging is required in SwiftUI)

eg.

	init()
	{
		UXCam.optIntoSchematicRecordings()
		let config = UXCamSwiftUI.Configuration(apiKey: "YOUR API 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

eg.

var body: some View
{
	Text("Hello world")
		.uxcamTagScreenName("HelloScreen")
}

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)

eg.

var body: some View  
{  
	VStack
	{
		Text("Personal data: XYZ")  
	 		.uxcamOcclude()  

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

GitHub

link
Stars: 0
Last commit: 2 days ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

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