I'm testing IPhone and iPad Apps on Apple Silicon Macs.
When I purchase In-app product in the app on Apple Silicon Mac,
the payment receipt is not created, so the purchase fails.
In console log, it says it doesn't have permission to write to the file.
storekitagent [6913DE38_SK1] Error writing receipt (5095 bytes) to file:///Users/XXXX/Library/Containers/90FE2A60-9FDF-4ECF-848F-CE3D396322CA/Data/StoreKit/sandboxReceipt: Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “sandboxReceipt” in the folder “StoreKit”" UserInfo={NSFilePath=/Users/XXXX/Library/Containers/90FE2A60-9FDF-4ECF-848F-CE3D396322CA/Data/StoreKit/sandboxReceipt, NSUnderlyingError=0x14202c920 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}}
The App is using Original API for In-App Purchase written in Objective-C.
When I purchase in-app product, the app calls SKPaymentQueue::addPayment.
And then it gets paymentQueue:updatedTransactions callback with SKPaymentTransactionStatePurchased.
This means that the payment was successful.
But the receipt is not created so I can't continue the after process.
I'm testing with sandbox in-app purchase.
I have tested several times and confirmed that on macOS Monterey 12.2 the receipt is created successfully, but on macOS Ventura 13.2 the receipt isn't created.
I think there is something to do with macOS version.
Does anyone have any solutions?
Here is a very similar thread on apple developer forum. (And there too has no anwsers)
https://developer.apple.com/forums/thread/719505
Related
I am no longer able to test In-App Purchases with Simulator for iOS 12. I didn't have this problem before.
The instructions say for me to log out of iTunes and App Store in Settings, and when I test the In-App Purchase, iOS would ask me for an Apple ID. I have done that, but iOS never asks for an Apple ID. Instead I get an error object in my code that says "Cannot connect to iTunes Store". (It doesn't terminate the app. I was able to successfully print the description of the error object in the debug window.)
When I try to put my sandbox account in the iTunes and App Store account setting, I get a message that says, "There was a problem connecting to the server."
You can display IAP products on both the iOS simulator as well as physical iOS devices, but to test buying or restoring purchases you've always needed a physical device.
On iOS 12, you can set a default sandbox user in Settings -> Your Account -> iTunes & App Store -> Sandbox Account. This can help out with the sign in prompts and save your phone from having to change accounts repeatedly.
I've got my app rejected because they're testing it in iPad simulator where subscriptions do not work and my app needs to be able to verify subscription before providing an access.
Right now my app is displaying an error "Can't connect to iTunes store, please try again".
What does Apple expect me to do?
I am trying set up some in-app purchases through Unity IAP for iOS devices. Registering the various product IDs, the initialization process seems to have passed successfully. However, when I tried to make a purchase using an iPad connected to a Mac, I received an error message on XCode saying:
UnityIAP: No App Receipt found
The purchase failed. The reason given for the error was: Unknown.
On the Unity editor, the purchase did go through without any problem.
So what could be the reason? What is an App Receipt?
I hired a freelancer to fix the issue. He asked me to test the system with a test user's account, and it succeeded. Apparently, for the IAP to work, all I needed to do was to release and publish the game in the Apple's App Store, and download the app from the App Store directly!
It is also worthwhile mentioning that we need to fill in the forms at Agreements, Tax, and Banking. Otherwise the initialisation process won't even pass.
My app got rejected from app store with following reason:
We found that your in-app purchase product(s) exhibited one or more bugs, when reviewed on iPhone running iOS 10.2.
Specifically, a purchase error message was displayed when we tapped the subscription in-app purchases on the Pro Membership screen.
All my products are getting fetched correctly from in app services.
On further debugging I found that I am receiving following error
Error Domain=SKErrorDomain Code=0 "Cannot connect to iTunes Store"
UserInfo={NSLocalizedDescription=Cannot connect to iTunes Store}
Error is resolved when I follow this url
But my question is how can I take this case with the Apple review team?
I am using cordova-plugin-inapppurchase with Ionic and I also opened an Issue on the plugin's repository: Issue #78
When I try to Restore a Purchase on iOS I get the Console Output below.
Console output
RMStore: restored transactions failed with error Error
Domain=SKErrorDomain Code=2 "Cannot connect to iTunes Store"
UserInfo={NSLocalizedDescription=Cannot connect to iTunes Store}
The reviewer in the App Store wrote:
Please run your app on a device while connected to an IPv6 network
(all apps must support IPv6) to identify the issue(s), then revise and
resubmit your app for review.
Is the plugin IPv6 complaint? What is the issue otherwise, I have been stuck in this for several days now.
Product Type
Consumable
Cordova version
6.4.0
iOS version
iOS 10
It was an issue with the account being related to another country. Nothing to do with the plugin.