join us on Discord for support, updates, and all things Snap AR! See you there!
iOS Crash: com.snap.camerakit.sample is not authorized to use CameraKit
Hello
I tried to run an iOS example.
1. I took the last version from GitHub (commit de185d4);
2. I created a new app in Admin UI and fill Bundle ID in Platform Identifiers;
3. I ran "pod install". Camera Kit SDK version is "1.19.2";
4. I replaced the app id and token in "info.plist", lenses group id in AppDelegate and signing team;
The app sometimes works and I see lenses. But sometimes it crashes with the message Terminating app due to uncaught exception 'unauthorized', reason: 'com.snap.camerakit.sample is not authorized to use CameraKit'
I ran the app 20 times and took 13 crashes.
Android example with the same credentials works fine.
XCode 14.1
iPhone 11 Pro
iOS 15.6.1
What should I do to fix it?
Answers
-
@Andrey Rylov Thanks for posting your issue on our forum. Sharing this with our eng team now to take a look. Hang tight!
0 -
Hi @Andrey Rylov, thank you for reporting this issue and the details you provided; it is very unusual. I'd like to find out why some of those calls are not accepted. Are you behind a VPN on iOS by any chance? If so, could you try without VPN?
0 -
@arashp Thank you
Yes, I used VPN. Without a VPN app works fine.0 -
Thank for letting us know @Andrey Rylov! Sometimes the calls are not accepted if there is a time discrepancy. I believe the API is designed this way for security reasons but I will let our team know
0 -
@arashp Thanks for explanation
SDK crashes the app in this case. And the app can't catch this exception.
Maybe, you will add some error-callback instead of crash for this situation?0 -
Hi @Andrey Rylov, thank you for the feedback. I will discuss with the team
0 -
Hi @Andrey Rylov, regarding your question about error handling: sample apps default to crashing in this scenario, but we provide an api to handle such errors:
1