storekit

iPhone StoreKit - invalid product id's

社会主义新天地 提交于 2019-11-27 04:11:43
问题 I'm trying to test In App Purchase within the sandbox environment. In order to test the code I did the following: Created an In App Purchase Test User account under 'Manage Users' in iTunes Connect Created some in app purchase products under 'Manage Your In App Purchases'. I used numeric values and alpha-numeric values for the Product IDs. Loaded the app onto the iPhone, went to Settings->Store and logged out of the regular store and into the test account created in step 1 Set a breakpoint in

Check if an Auto-Renewable Subscription is still valid

对着背影说爱祢 提交于 2019-11-27 02:45:36
问题 I would like to check the Auto Renewable Subscription status whenever I open the app. This is to make sure that the user is still subscribed to the service. How do I achieve this? Any thoughts? Thank you P.S.: I am using SwiftyStoreKit 回答1: Here is several ways to do receipt validation to check is user granted to subscription. Here is two ways of doing it correctly: Do receipt validation locally as it is written here. Do receipt validation remotely as it is written here. It is mentioned that

iPhone storekit sandbox stopped working

筅森魡賤 提交于 2019-11-27 02:28:03
问题 Bug reported as fixed by Apple, see accepted answer below ... UPDATE MON AUG 23rd 10:00 GMT Although the bug report with apple hasn't been closed yet, it now seems to be working (at least for a couple of us) OK. It could be they have nailed it, or the fix is in testing, and I'll report back when (if) I hear anything more from Apple. UPDATE FRI AUG 20th Just to say I've had an email back from Apple Engineering (21:20 GMT) and they have said: "Thank you for reporting this. We're aware of this

(iOS + StoreKit) Can I detect when I'm in the sandbox?

徘徊边缘 提交于 2019-11-27 01:17:28
问题 I've got in-app purchases working just fine, and I'm going the server validation route. The server needs to know whether I'm in the sandbox or not, so for now I'm just sending it a "&sandbox=1" parameter. Of course when the full version of the app is out I won't be sending this parameter. I'd rather not have this hardcoded in my app, as that will make testing difficult in the future, and it's one more (big) thing to remember to change before submitting builds to Apple. Is there a way I can

StoreKit SKProductsRequest Crash

感情迁移 提交于 2019-11-26 21:46:23
问题 I use the following code to request a list of products as per the In-App Purchase Programming Guide. It used to work fine in my iPhone application, however now it crashes every time the product list is requested. The delegate method (void)productsRequest:(SKProductsRequest **)request didReceiveResponse:(SKProductsResponse **)response is never called. SKProductsRequest *request = [[SKProductsRequest alloc] initWithProductIdentifiers:[NSSet setWithObject:@"my.product.identifier"]]; [request

When to use restoreCompletedTransactions for in-app purchases?

。_饼干妹妹 提交于 2019-11-26 19:06:08
问题 For a basic app with nonconsumable in-app purchases, has anyone figured out best practices for using SKPaymentQueue's restoreCompletedTransactions ? Observations I know it's recommended to always register a transaction observer to receive pending transactions that make their way back to the app, but this is a different question. It looks like restoreCompletedTransactions is something the app has to actively decide when to call to poll for all the purchases the customer has already made. From

Verify receipt for in App purchase

China☆狼群 提交于 2019-11-26 15:37:14
I have been playing around with in app purchases for a few days, everything works fine up until the point where I try to validate the receipt with the app store, as i am constantly getting back an invalid status. I am passing the receipt data to my PHP server then forwarding from there to the app store and once I get a valid response I intend to add the receipt data to my database. The store kit programming guide and the class references are less than useless for this particular area as they don't really give you any sort of example, I did find one useful article which helped me out a bit but

StoreKit In App Purchase invalid product identifiers [duplicate]

时间秒杀一切 提交于 2019-11-26 15:14:49
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: iPhone StoreKit - invalid product id's I am getting an empty array of product identifiers from SKProductsRequest . I did the following steps: Created a In App Purchase Test User account under 'Manage Users' in iTunes Connect Created some in app purchase products under 'Manage Your In App Purchases'. Loaded the app onto the iPhone, went to Settings → Store and logged out of the regular store Set a breakpoint in

Undocumented NSURLErrorDomain error codes (-1001, -1003 and -1004) using StoreKit

≯℡__Kan透↙ 提交于 2019-11-26 14:50:58
I'm writing StoreKit-related code, and I'm getting some rather troubling error codes when I try to add a purchase to the queue. So far, I've experienced error codes -1003 and -1004 and I can't find anything about those codes on the internet. Running a product request returns valid product numbers, so I don't know why calls to [[SKPaymentQueue defaultQueue] addPayment:aPayment]; would fail with this undocumented problem. The same code also works without the errors on one device but not on another. The questions I have are, as of yet, unanswered: What do these codes mean? How can I mitigate this

iPhone In-App Purchase Store Kit error -1003 “Cannot connect to iTunes Store”

时光总嘲笑我的痴心妄想 提交于 2019-11-26 12:24:57
问题 I\'ve been working on adding in-app purchases and was able to create and test in-app purchases using Store Kit (yay!). During testing, I exercised my app in a way which caused the app to crash mid purchase (so I guess the normal cycle of receiving paymentQueue:updatedTransactions and calling finishTransaction was interrupted). Now I am unable to successfully complete any transactions and instead am getting only transactions with transactionState SKPaymentTransactionStateFailed when