Post

Replies

Boosts

Views

Activity

Getting MacOS Version in iOS Apps running on Apple Silicon Mac
I want to get MacOS Version from Objective-C build for iOS Apps to run on Apple Silicon Mac. Because AppStore In-App Purchase on Apple Silicon Mac had issues on MacOS version 13.0 and was fixed at version 13.3.1. I need to know the exact version of the MacOS to prevent users from buying In-App Purchases. I found that I can get iOS version that the app is emulating on and assume MacOS version from iOS version. But I think it's not 100% guaranteed way, because no documentation says anything about it. Is there a way to get MacOS Version in iOS Apps running on Apple Silicon Mac?
1
0
327
Aug ’24
Handling receipt validation status code for consumable product
My app has consumable in-app purchase products. The app is using "Original API for In-App Purchase". When the user purchase in-app product, the app sends the receipt to our web server which then validates the receipt throw the App Store api. The App Store validates the receipt and gives us the response with a status code. The problem is here. It's obvious how to handle a 'valid receipt' response status code which is 0. But the document is not straight about handling response code which isn't 0. Should we call finishTransaction when the response code isn't 0? or should we not? If we don't call finishTransaction, we are worried that the transaction will stay alive and loop forever. If we call finishTransaction, we are worried that we might ignore a valid purchase and not give the consumable product that user purchased. Is there a right way to handle this? Original API for In-App Purchase: https://developer.apple.com/documentation/storekit/in-app_purchase/original_api_for_in-app_purchase?language=objc Receipt Validation Response Status code : https://developer.apple.com/documentation/appstorereceipts/status
0
0
663
Mar ’23
In-app purchase fails on Apple Silicon Mac
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
7
0
1.3k
Feb ’23