storekit

Does an In App Purchase's Product ID have to begin with a Reverse-DNS?

与世无争的帅哥 提交于 2019-12-05 00:03:11
Does an In App Purchase's Product ID have to begin with a Reverse-DNS like com.mycompany.My_Awesome_Game.Level_Pack_1 or can it just be standalone like Level_Pack_1 ? Julio Gorgé Product IDs can be whatever you want, although it is recomend you follow the reverse domain name style. But in the end there's no restriction over the naming of your product IDs. It also does not need to use your app bundle ID as a prefix. From the source : Q: I am implementing In App Purchase and must register my product identifiers. What are product identifiers and how do I create and use them in my application? A:

How to test renewable subscriptions (App Store)

自作多情 提交于 2019-12-04 21:21:30
问题 I'm implementing auto renewable subscriptions in my app and I wonder if there is a way to simulate when a subscription period runs out and a new transaction is created. The app is connected to a online service that always keeps track of the users and if they have "premium access" or not. As understand i, there are two ways to detect when a transaction is made. The app is launched and updatedTransactions: is called in my PaymentObserver as a SKPaymentTransactionStateRestored. I then, from the

Already purchased subscriptions in StoreKit

余生长醉 提交于 2019-12-04 21:10:45
问题 I am using renewable subscriptions in app purchases in an iOS app. When a user attempts to purchase a subscription that they already have paid for a message is displayed from iTunes "You're currently subscribed to this". How I can detect when this event has occurred so that I can process the transaction and grant access to my app. In the paymentQueue:updatedTransactions: method of the observer it is coming through as a SKPaymentTransactionStateFailed. How do I distinguish between this type of

Handle cancelled IAP transactions

寵の児 提交于 2019-12-04 20:22:01
问题 I'm using StoreKit for in-app purchases. I'm finding that the API is quirky in its behavior when the user presses the "Cancel" button. For example, if I push Cancel on the "Confirm Your In App Purchase" screen, I get a SKPaymentTransactionStateFailed transaction with error.code == SKErrorPaymentCancelled as I'd expect. But if I push Buy and then press Cancel, I get a Failed transaction with error.code == 0 . The error.localizedDescription is "Cannot connect to iTunes Store" which is clearly a

In-App-Purchase takes too long time to show confirmation alert view

六月ゝ 毕业季﹏ 提交于 2019-12-04 18:42:01
问题 I have encountered the following issue: when my app runs on a device and I tap BUY button, which triggers In-App-Purchase mechanism it takes up to ten seconds to show the standard confirmation UIAlertView , the one which says: "Do you want to buy...". I have never seen such a behaviour before. Usually it happens immediately. So first I thought it might be due to poor internet connection or something like this, but the simulator uses the same WiFi network and it works perfectly, the alert view

In-app purchase tracking with Google Analytics iOS SDK

旧时模样 提交于 2019-12-04 18:03:44
问题 I would like to track in-app purchases with the Google Analytics SDK for iOS v2, as indicated in their Ecommerce Tracking guide. I'm currently doing the following after receiving a SKPaymentTransactionStatePurchased transaction update: - (void) trackTransaction:(SKPaymentTransaction*)transaction { NSString *transactionIdentifier = transaction.transactionIdentifier; GAITransaction *gaiTransaction = [GAITransaction transactionWithId:transactionIdentifier withAffiliation:@"App Store"]; SKPayment

In-App Purchase Error Code 0

懵懂的女人 提交于 2019-12-04 11:48:28
I'm trying to troubleshoot why I'm getting "Cannot connect to iTunes Store" with error code 0. I know my app identifier is fine because I retrieve product information on app launch and log the results and I get the correct product identifiers and prices from iTunes. When I change my app identifier to something stupid this fails. I know my product identifiers are fine as well for the above reasons (it wouldn't work otherwise and I double checked). I have tried firing the purchase by creating an SKPayment in 2 different ways: FIRST WAY SKPayment *payment = [SKPayment paymentWithProductIdentifier

How to Create a Apple Music User Token outside iOS

这一生的挚爱 提交于 2019-12-04 08:09:41
I am trying to let people like tracks, albums or playlists on Apple Music from a webpage. I understand the manual on this page: https://developer.apple.com/library/content/documentation/NetworkingInternetWeb/Conceptual/AppleMusicWebServicesReference/SetUpWebServices.html Until I hit the part where I should use the requestUserToken(forDeveloperToken:completionHandler:) method from SKCloudServiceController in the StoreKit framework, since there is no StoreKit framework available for outside iOS. How is this token generated? Is there any other way I can generate this Music User Token manually? I

Cancel event for [[SKPaymentQueue defaultQueue] restoreCompletedTransactions]

吃可爱长大的小学妹 提交于 2019-12-04 07:37:48
Apple released the StoreKit and we cannot even get any callbacks for the cancel event when a user puts in his/her email and password for: [[SKPaymentQueue defaultQueue] restoreCompletedTransactions] This event should not be confused with pushing cancel when cancelling a purchase . The event we're interested in is pushing cancel when trying to restore transactions . There are no callbacks for a user pushing cancel, or even pushing the OK button. The only call back you get is when the information from the server comes back indicating if it was successful or not. Unacceptable. Try this one:

Redeemed promo codes not included in updateTransaction

99封情书 提交于 2019-12-04 07:29:44
I have an application that integrates In-App Purchases. The in-app purchasing functionality in general works as expected for purchases that occur in app, and is also fully tested to work for purchases initiated in the app store (tested using "itms-services://?action=....") I am enabling my IAPService as soon as the app is launched in the AppDelegate, and it is correctly calling updateTransaction as expected, but.... When I redeem a promo code it does not arrive in updateTransactions. It does contain other purchases that I have made, but no mention of anything redeemed through the promo code