iOS OfferCode testing in outside the app .

In my app, I need the user to redeem a code outside the app and then capture the transaction in the callback/response from the App Store. How can I test this process?

Here's my function for opening a URL:

    if UIApplication.shared.canOpenURL(url) {
        UIApplication.shared.open(url, options: [:], completionHandler: nil)
    }
}

I am trying to get the transaction object in the TransactionObserver class:

    // Implementation details...
}

Here is the link to this class.

However, I am not receiving the expected callback in this observer.

I am testing on a TestFlight build. My question is: Is it possible to test offer codes in TestFlight? Or is there something wrong with my implementation?

Answered by DTS Engineer in 812528022

The Testing at all stages of development with Xcode and the sandbox article describes all the various scenarios you can test in the sandbox and the local test environment. TestFlight uses the sandbox for in-app purchases. Per this article, you can test redeeming an offer code for an auto-renewable subscription in the local test environment. You can't perform this test in the sandbox environment.

How can I test this process?

Be sure to follow the instructions in Supporting subscription offer codes in your app.

The Testing at all stages of development with Xcode and the sandbox article describes all the various scenarios you can test in the sandbox and the local test environment. TestFlight uses the sandbox for in-app purchases. Per this article, you can test redeeming an offer code for an auto-renewable subscription in the local test environment. You can't perform this test in the sandbox environment.

How can I test this process?

Be sure to follow the instructions in Supporting subscription offer codes in your app.

iOS OfferCode testing in outside the app .
 
 
Q