I'm running location verification and getting a -1 error code, but this case isn't documented in the enum.
What does it mean?
payload.confirmAcquired(in: region) { (inRegion, error) in
		guard let confirmationError = error as? APActivationPayloadError else {
				if inRegion {
						// The location of the NFC tag matches the user's location
				} else {
						// The location of the NFC tag doesn't match the records;
						// for example, if someone moved the NFC tag.
				}
				return
		}
		
		print("\(confirmationError.code.rawValue)") // -1
}
Post
Replies
Boosts
Views
Activity
I have the following code, after looking at the Fruta sample app.
@main
struct MyClipApp: App {
		var body: some Scene {
				WindowGroup {
						ContentView()
								.onContinueUserActivity(NSUserActivityTypeBrowsingWeb, perform: handleUserActivity)
				}
		}
}
func handleUserActivity(_ userActivity: NSUserActivity) {
		print("Handle User Activity")
		guard let incomingURL = userActivity.webpageURL else {
				print("No incoming URL")
				return
		}
		print("Incoming URL: \(incomingURL)")
}
If I just build and run the app clip I get:
Handle User Activity
Incoming URL: https://example.com
Then if I go into my Schema and tick the _XCAppClipURL checkbox and enter a value of https://custom.com?id=1234567890
Build and run the app clip again, I get:
Handle User Activity
Incoming URL: https://custom.com?id=1234567890
Handle User Activity
Incoming URL: https://example.com
See how I have my new custom URL and the previous example URL. Go back into my Scheme setup and untick the _XCAppClipURL option.
Build and run the app clip again, I get:
Handle User Activity
Incoming URL: https://example.com
Handle User Activity
Incoming URL: https://example.com
And now I always get two activities when launching the app clip. Is it normal to get two? And how do you stop the https://example.com activity coming in?