join us on Discord for support, updates, and all things Snap AR! See you there!
Terms of Service Notice not appearing consistently
In our ios app, we are presenting a tutorial flow which requires some modals and permission alerts being presented.
We have user's reporting that the Terms of Service Notice is interfering with the flow, as the Terms Alert is shown but user's are unable to "accept" / press on anything.
As a part of the testing/debugging the issue, I was trying to get the terms alert to appear as well, but am unable to do so.
I went through explanation described here and through the code itself, but we are unable to get the terms alert to appear at all (either than some first random times). Looks like there might be some caching or something involved.
What do we need to clear/clean in order to make sure the alert appears (so we can test and fix the issue)?
For reference, we're using the AgreementsPresentationContextProvider
provided in the example, and have tried uninstalling + restarting app and still are unable to make the terms alert reappear..
Answers
-
@Roy Thanks for posting on the forum! The good news is the inconsistency is expected as the root cause is intended, but let me just triple check with our eng team right now and also any additional thoughts from them to resolve / move forward
Hang tight! Ideally tomorrow latest!
1 -
@Roy said:
...
What do we need to clear/clean in order to make sure the alert appears (so we can test and fix the issue)?Two things:
- Use a US-based IP address for testing. The pop up currently applies for US which explains why only some users see it.
- The app needs to be deleted and reinstalled to test the alert appearing. We cache user input in response to the ToS popup.
1 -
For those running into issue where you need to know when the agreements modal is showing, my solution was to use method swizzling to detect whenever a VC is being displayed (from the host vc that's presenting the agreements modal).
Hereis code below:
@objc func didPresentModalViewController() { SCLogging.infoLog("A view controller was presented modally!") if let presentedViewController = self.presentedViewController, NSStringFromClass(type(of: presentedViewController)) == "SCCameraKitAgreementsViewController" { // The presented view controller is of type "SCCameraKitAgreementsViewController" SCLogging.infoLog("SCCameraKitAgreementsViewController was presented modally!") //hide tutorial if it is active SCTutorialFlowScreen.activeTutorialScreen()?.isHidden = true } else { //diff vc } }
1