storekit

Free non-consumable in-app purchase with hosted content on Apples's servers

£可爱£侵袭症+ 提交于 2019-12-07 15:18:31
问题 Can non-consumable in-app purchases that include content hosted on Apple's servers be free? I couldn't find anything about this in the docs and as you can set in-app purchases to be free in iTunes connect, I assumed it was possible. I have set up a non-consumable in-app purchase on iTunes connect, uploaded some content and set its price to be free. Unfortunately when I request the products data using the product ID, I receive that ID in the SKProductsResponse.invalidProductIdentifiers array.

IAP receipt validation for iOS

痞子三分冷 提交于 2019-12-07 14:49:25
问题 I am working on a client/server application which uses Apples IAP and StoreKit framework to purchase a subscription. What we would like is for the client (iPhone or iPad) to make the initial subscription purchase with apple through their iTunes account using StoreKit framework and then pass of the receipt to our server, which will validate it and then update the users account status. We'd also like the server to be responsible for managing the status of the subscription (check for auto-renew,

Trying to add a protocol to a Class signature in swift

守給你的承諾、 提交于 2019-12-07 09:38:28
问题 I'm trying to create an in-app purchase in swift. In my class signature, I have the following: class ViewController: UIViewController, UITextFieldDelegate, UIAlertViewDelegate, SKStoreProductViewControllerDelegate, SKPaymentTransactionObserver{ However, I get an error message: type "ViewController" does not conform to protocol: SKPaymentTransactionObserver I've read this: https://developer.apple.com/library/prerelease/mac/documentation/Swift/Conceptual/BuildingCocoaApps

How do you determine the customer/user when receiving an Apple statusUpdateNotification for auto renewing subscriptions?

孤街醉人 提交于 2019-12-06 16:04:49
So, Apple has implemented their server to server notification for various events in the subscription lifecycle. I was very excited to get going on this but then it seems there is some sort of glaring thing I'm missing. I'm not sure how to match the notification data to a user on my side. I'm surprised there isn't a uid/apple id passed with the notification to match on. Maybe I'm supposed to be using the original_transaction_id but its unclear whether that is unique. Does anyone know what to use in the status response? I use the original_transaction_id to match the event to a user. Apple will

Multiple SKPaymentTransaction

旧时模样 提交于 2019-12-06 07:25:49
I implemented StoreKit into my application. What I noticed is that for some of my test accounts, there are multiple SKPaymentTransaction 's in the paymentQueue. This is causing the SKPaymentTransactionObserver to be called multiple times with a SKPaymentTransactionStatePurchased This problem seems to manifest more when I stop the app mid upgrade, or put the application in the background. I am not sure what is causing the multiple payments, or is this expected behavior? Also, am making sure to finish all purchased transactions after they are validated. When a transaction is completed, cancelled

How to detect an iOS app install campaign inside the app

不羁的心 提交于 2019-12-06 06:06:22
I would like to find out in my iOS app if the app was installed due to an ad campaign link. Google Analytics is doing this and it is tracked on their analytics web page. iTunes Connect is doing this too and it is also tracked on the iTC web page. I'm looking now for a way to get this information inside the app. When the app first starts i want to check if it was installed because the user was sent to the App Store by a campaign link and what campaign id it was. Is there a way for an iOS app to ask Google Analytics, Firebase or iTC/StoreKit what campaign has led to its install? Google Anlaytics

StoreKit's SKStoreProductViewController leaving space between the nav bar and the view?

眉间皱痕 提交于 2019-12-06 04:28:59
I have this subclass of UIViewController that shows a SKStoreProductViewController . This view controller was originally created for iOS 5 and is NOT using auto-layout. My problem is that when the SKStoreProductViewController is presented, there's a space between the nav bar and the actual content... if you scroll the view, the segmented control (Details/Reviews/Related) floats below the nav bar (see the images below, I added a mask to the images to make the problem more apparent). Since we don't have access to the presented view controller I'm guessing it has to do with the controller that

In-App Purchase Error Code 0

…衆ロ難τιáo~ 提交于 2019-12-06 04:06:02
问题 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

How to Create a Apple Music User Token outside iOS

℡╲_俬逩灬. 提交于 2019-12-06 03:45:46
问题 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

Cancel event for [[SKPaymentQueue defaultQueue] restoreCompletedTransactions]

∥☆過路亽.° 提交于 2019-12-06 03:27:37
问题 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