Terms of Service Notice not appearing consistently

Roy
Roy Posts: 29 🔥

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..

Tagged:

Answers

  • Roy
    Roy Posts: 29 🔥

    The expected usage would be that on every new installation of the app, the terms alert will appear for the user (but this does not seem to be the case).

  • stevenxu
    stevenxu Posts: 574 👻

    @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!

  • stevenxu
    stevenxu Posts: 574 👻

    @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.
  • Roy
    Roy Posts: 29 🔥

    Thanks @stevenxu - A suggestion that could be greatly helpful in upcoming sdk versions:

    Being able to know when the Agreements modal is displayed (not only dismissed)

    LMK thoughts on it!

  • Roy
    Roy Posts: 29 🔥
    edited May 2023 #6

    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
            }
        }
    
  • stevenxu
    stevenxu Posts: 574 👻

    yahoo!!! Thank you @Roy !!!! Shared your feedback to the PM team. Appreciate you as always!