What error code should I expect for user-cancellation of in-app purchases in mac-catalyst - in-app-purchase

I'm working on a catalyst app that isn't on the Mac App Store yet and when testing from Xcode or TestFlight cancelling in-app purchases gives me a SKError.Code.unknown instead of .paymentCancelled that I get when cancelling on iOS.
Is it only the testing environment for mac-catalyst that doesn't report user cancellation correctly or will the app distributed from the Mac App Store also behave like this?

Related

In app purchase is not working after release but it was working in sandbox mode

Reject from Apple for In APP Purchase
During development in app purchase auto-renewing subscription, I've created test accounts which are able to obtain the product of the in app purchase as well as actually purchasing it without an issue. I've submitted the version to the testFlight Beta and testing in app purchase as well as purchasing it with test accounts works well at sandbox mode environment. However after submitted to the IOS version app to the Apple review, the version of the app can't even retrieve the product, and nothing shows up when I press the button to send the purchase request.
IAP is attached to the binary and IAP is approved with the binary that i submit. But its not displaying in the production. In sandbox its listing fine.
Please tell me how you solved this problem?
Or is this factor not decisive and the application will not be rejected for this reason?

iOS - In-app purchases and beta testing

I am about to test my app with my external testers. I will give them a sandbox account to test my in-app purchases. My in-app purchases are hosted with Apple.
My question is, after the testing finishes, I disable app testing in iTunesConnect, I submit my app to Apple, and my app becomes available on the App Store. My testers download my app from App Store. Will the in-app purchases they tested still be there? Will installation from App Store act as a app update?
I tried disabling app testing in iTunesConnnect just now by making it "Not available for testing" and I'm still able to use my app, and test in-app purchases.
If I can't disable my app from testing then testers will get all my in-app purchases that they test for free?
Am I missing something? Can I disable app testing completely?
The app in testflight will last for 30 days from the day of download. After that the app will not be available.
The live version is different and will be needed to be downloaded separately from the app store. It will be a unique application compared your beta app. It would be treated as a fresh install.
Will the in-app purchases they tested still be there?
No
Will installation from App Store act as a app update?
No
will [users] get all my in-app purchases that they test for free?
No
Can I disable app testing completely?
You already have. App will not be available for download. However you cannot remove apps that are already installed. Existing app will last until expiry date.
More info here

Test In app purchase in waiting for review status for ios app

Currently My app's Version 2.0 is live.
Recently I have uploaded version 2.1. I have made sandbox mode disabled from app which I am using for renewal subscriptions.
Now My app V2.1 is in waiting for review status. During this period when I am testing the app, it shows me [Environment:Sandbox] while testing In-App purchases.
I am trying to make in app purchase by downloading the app from test flight i.e. V2.1
V2.1 is in waiting for review mode and I am trying to restore my in app purchases with V2.1 which I already bought with V2.0.
Will this sandbox environment be disabled automatically by apple once the app is live?
Or there is anything I am missing?
Can anyone please help me out?
Thanks a lot in advance.
What you mean by "I have made sandbox mode disabled from app which I am using for renewal subscriptions."?
You won't get sandbox once you use app downloaded from AppStore. It's related to how the app is signed - test flight build is ad-hoc distributed which implies you get sandbox.
You can't disable sandbox in your app. Your provisioning profile will control which servers the IAP process looks at. You need to generate an app that's signed for Release to access the Prod IAP server.

Can I make real IAP purchases from AdHoc build?

I have an approved iOS application in AppStore. There are few approved in-app purchases.
Question: Can I make a real purchase from AdHoc version of my app?
No, you cannot test a real in-app purchases through sandbox while the application is in adhoc. Real purchase can only be done if and only if the app is downloaded from the appstore. But if it is working fine in the sandbox testing, it is bound to work exactly fine in the real enviornment.

iOS In App Purchase: test a real purchase without submitting to Apple

I implemented in app purchase in my iOS app and I want to do a real test (not a sandbox) before submitting this new version to Apple
Of course, the current version of the app (in the App Store) was validated with a product
So, I archived the app using an Ad Hoc distribution profile and I generated an IPA file for Ad Hoc deployment. But when I installed the app via Testflight on my device, I discovered that the app was in sandbox environment!
Is there a way to do a "real" purchase before submitting the app to the App Store ?
You can actually test the in-app purchasing in the sandbox environment, basically you'll need to set up an test user account in your iTunesConnect.
Check the apple documentation here:
http://developer.apple.com/library/ios/#technotes/tn2259/_index.html
You'll be able to find all the information related to In-App Purchasing, including sandbox testing.
Short answer: you can't test a real purchase (aka, spend real money). It isn't possible.
Slightly longer answer: You'll automatically hit the sandbox environment unless it's an apple-signed release build. Even ad-hoc signed builds hit the sandbox.
To test a new IAP: create your IAP (it will be in "needs approval mode" until submitted with the final build and test against the sandbox - that's fine). If your purchase works against the sandbox, it should work against prod with real money as well. It would be great to do a trial run with real money, but that's just not possible until the IAP is approved and you get the production signed version of the app from the app store.
Just create a test account on iTunes Connect. Then log out from the device and run your app from Xcode.
To get access to the purchase you need apple signature, because you are connecting with the apple servers.
I assume that your app, is doesnt have that signature, so your request goes to the sandbox.

Resources