mobileStoreMakePurchase not working for iOS

Andrew at MidWest Coast Media andrew at midwestcoastmedia.com
Mon Mar 29 13:24:33 EDT 2021


I see now that it was stated on 7/16/2014 that this might not work in the Simulator, that was my misunderstanding.

My app is able to make the request as I can get “sendingRequest” as the pState, but then errors out with the “An unknown error occurred” for the “error” pState. This happens on test device with development credentials as well as distribution credentials; it’s live now. Everything I’ve read about using sandbox users to test IAP has been an absolute nightmare, so after no luck in the simulator or on my tethered iPhone I just bit the bullet and tried the transaction myself (it was only 99¢). The iOS side just throws a generic error back at me but on Google Play the transaction goes through and the purchase is successful. 

This seems to happen when the StoreKit returns SKErrorCode=0 and seems to be more problematic with Xcode 12+ & iOS 12+.
Is there any way to see the full error message returned from Apple to find out where this is failing? 
Doesn’t seem like there is a mobileStorePurchaseError(pPurchaseID,”verbose”) mode but the LC dictionary isn’t very resource heavy for mobile purchases.

—Andrew Bell


> Date: Mon, 29 Mar 2021 17:59:42 +0300
> From: panagiotis merakos <merakosp at gmail.com>
> Subject: Re: mobileStoreMakePurchase not working for iOS
> Message-ID:
> 	<CA+JfEq_qm1w9SxfO+4n+fXvJB=JMjaOzzrfGGauEvUWbEu9W8g at mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
> 
> Hello Andrew,
> 
> Just to mention that in-app purchases are not supported in the Simulator.
> 
> Kind regards,
> Panos
> --
> 
> On Fri, 26 Mar 2021 at 05:29, Andrew at MidWest Coast Media via
> use-livecode <use-livecode at lists.runrev.com> wrote:
> 
>> I have released my first project with in-app purchases but only to 50%
>> platform success: Android works but iOS does not. I?m using the directions
>> at
>> https://lessons.livecode.com/m/4069/l/186807-how-do-i-implement-in-app-purchases-in-livecode-apple-appstore
>> but am getting generic errors.
>> 
>> I had been receiving the dreaded ?Cannot connect to iTunes Store? error,
>> but did the test user creation dance a couple times to step past that.
>> When trying in the simulator with a real user account or registered
>> sandbox user I?m getting a mobileStorePurchaseError of ?UNKNOWN_ERROR"
>> When trying on the device (production build from App Store) I?m getting a
>> mobileStorePurchaseError of ?An unknown error occurred?
>> 
>> These are all submitted and approved consumables registered in App Store
>> Connect. Is there anyway to track down a more descriptive error message?
>> Same code is working for Google Play.
>> 
>> Compiled with LiveCode 9.6.2rc3 on macOS 11.0.1 using Xcode 12.1
>> 
>> ?Andrew Bell
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> 
> 
> ------------------------------



More information about the use-livecode mailing list