StoreKit

RSS for tag

Support in-app purchases and interactions with the App Store using StoreKit.

StoreKit Documentation

Post

Replies

Boosts

Views

Activity

StoreKit 2 failure on tvOS 18.2
Please help! I have a subscription IAP failing on tvOS 18.2 at: func makePurchase(_ product: Product) async throws { let result = try await product.purchase() //ERROR OCCURS HERE (See error message below) ... Xcode Console message: "Could not get confirmation scene ID for [insert my IAP id here]" The IAP subscription was working fine on 18.1 and earlier, and the same IAP and code is also running fine on iOS 18.2. The tvOS error on 18.2 happens both in production and sandbox. Are there any changes to StoreKit 2 which might cause this error?
3
0
117
5d
Filling the tax Information. Help needed.
I'm setting up subscriptions on the App Store and need to fill out some forms. One of them is the "U.S. Certificate of Foreign Status of Beneficial Owner." At the bottom of the form, I see a label 'U.S. Person' with my name listed underneath it. What does "U.S. Person" mean here? My name appears below the "U.S. Person" title, but I'm not a U.S. person. What should I do? Also, what title should I enter? I'm the only developer on the app.
6
6
821
Apr ’24
Subscription "Waiting for review" status stuck after been approved
We uploaded to App Store Connect a new app version with new subscription groups & items. Everything was approved, and we received the emails from App Store connect, but if we visit our App Store Connect account App, some of these subscription items are still "Waiting for review" for more than 4 days. It has no sense as the email informed us that the new app version and all the items had been approved. The app is online, but some subscription items are not available. We even uploaded a new app version, it was updated, but the subscription items are still "Waiting for review". Has anyone faced this problem? How do you solved it? We have contacted App Store Connect but it is pretty difficult to get real assistance, most of the time they reply with template email answers.
38
13
19k
Oct ’22
StoreKit in IOS 18
I have has a the Storekit working in my application previously. It uses the a iTunes songs ID and allows the user to purchase the track from iTunes within the app using a View. its been fine in IOS 17 but since the update to 18 Ive not been able to get this to work. the iTunes panel loads within the app and shows the track I wish to purchase. on clicking purchase I login with my Apple ID password. that then spins for a few seconds then asks to do the purchase again. Can you please advise. code below print ("Store ID + \(self.appId)") let storeProductViewController = SKStoreProductViewController() storeProductViewController.delegate = self let parameters = [SKStoreProductParameterITunesItemIdentifier: self.appId] storeProductViewController.loadProduct(withParameters: parameters) { status, error -> Void in if status { self.present(storeProductViewController, animated: false, completion: nil) print("success: \(status.description)") } else { if let error = error { print("Error: \(error.localizedDescription)") } } } DispatchQueue.main.async { self.isPresentStoreProduct.wrappedValue = false } }
1
1
115
6d
macOS TestFlight app using Xcode environment for IAP
I don't know how this happened or how to reset this, but I can't test the StoreKit part of my TestFlight app anymore. When I try to retrieve or buy products (IAPs), I get all kinds of strange behavior. I think it is caused by storekitagent thinking the app is in "Xcode sandbox environment". One of the errors from storekitagent looks like this: [51852D62] [LoadSubscriptionStatusTask]: Subscription status request failed with error - Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo={AMSStatusCode=0, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <468756B3-DA53-4FED-B35C-E093954C27D8>.<1>, NSErrorFailingURLKey=http://localhost:49828/inApps/subscriptions?guid=98DD60024C21&reason=push, _kCFStreamErrorDomainKey=10, _NSURLErrorRelatedURLSessionTaskErrorKey=( "LocalDataTask <468756B3-DA53-4FED-B35C-E093954C27D8>.<1>" ), NSLocalizedDescription=A server with the specified hostname could not be found., NSErrorFailingURLStringKey=http://localhost:49828/inApps/subscriptions?guid=98DD60024C21&reason=push, NSUnderlyingError=0x122f638d0 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 "(null)" UserInfo={_NSURLErrorNWPathKey=satisfied (Path is satisfied), interface: lo0, _kCFStreamErrorCodeKey=-72000, _kCFStreamErrorDomainKey=10}}, _kCFStreamErrorCodeKey=-72000} It looks like it's trying to connect to a local server instead of contacting Apple's App Store servers. I'm on the latest macOS and Xcode. Any help is greatly appreciated:) Thanks!
5
1
1.5k
Jun ’23
In-App Purchase Refund Procedure
Hi everyone, I was just wondering if anyone could point me in the right direction on how to properly handle inquiries about refunding in-app purchases. I've seen multiple posts saying to direct them to Apple's support, but is there no other direct way of handling this? Also, does Apple not provide an API to interface with so you can issue refunds on behalf of the customer? Thanks.
3
0
142
1w
Offer Code Transaction
Hello, We're trying to implement and test offer codes in our app. We have create all the necessary items in the App Store. The app has been reviewed and approved for release. We have not published it yet. We are redeeming the offer using a URL that opens the App Store. When I redeem, the account is updated, but the app does not see the Transaction. We implemented using this: https://developer.apple.com/documentation/storekit/transaction First, we used the Transaction.updates and then we added Transaction.all and neither return any Transaction. Any ideas with there are any other dependencies that are required here or recommendations for how to test?
4
0
96
1w
Landscape safe area is incorrect when presenting SKStoreProductViewController
Hi. If the app is in landscape only and when the SKStoreProductViewController is presented, the safeArea changes to what looks like a portrait mode safe area. When the SKStoreProductViewController is dismissed, the safeArea does NOT revert back to the original values. Is there a way to force the safeArea to "reset"? I've submitted some bug tickets through Apple Feedback but I haven't received any response about it. The below code will pop up the SKStoreProductViewController and if you have a UIView that is constrained to the safe area, then you can visibly notice that the safe area is changed and doesn't go back. I have tested this on iPhone 14 Pro, iPhone 15, and iPhone 16 Pro and in the Simulators. The incorrect behavior happens on those and probably more. Thanks. #import "ViewController.h" #import &amp;lt;StoreKit/StoreKit.h&amp;gt; @interface ViewController () @property (nonatomic, strong) SKStoreProductViewController *productViewController; @end @implementation ViewController - (IBAction)buttonTapped:(id)sender { self.productViewController = [[SKStoreProductViewController alloc] init]; NSDictionary *parameters = @{ @"id" : @"6443575749" }; [self.productViewController loadProductWithParameters:parameters completionBlock:^(BOOL result, NSError * _Nullable error) { [self presentViewController:self.productViewController animated:YES completion:^{ // presented // The panel that is constraint to the safe area visibly shows that the safe area is no longer correct. }]; }]; } @end
0
0
145
1w
Implementing In-App Purchases for the first time
Hi, I want to apply in app purchases in my app. I have set it up in xcode and on appstoreconnect, it is saying ready to submit. I dont understand what i need to do now to connect the two. I have read i need to send my app for review for them to be reviewed, but i want to test the in app purchases first on test flight and on sandbox before i send my app for review. Please can someone clarify for me and help me?
0
0
106
1w
How to remove Subscription from Review
The guidance provided only explains how to remove the entire app from review, but not how to remove a single subscription. Currently, I have one incorrect subscription that has been rejected due to localisation issues, and it is stuck in the "In Review" status. Unfortunately, I am unable to make changes to it. The correct subscription is in the "Waiting for Review" status, and while I am able to remove it, there is no need to do so. What I would like to do is remove the previous, incorrect subscription.
0
0
79
1w
Can I use AppTransaction to verify purchase of a paid macOS app?
I've tried to use AppTransaction.shared / AppTransaction.refresh() to verify that my app has been purchased from the Mac App Store. It works when testing a release build on my Mac, using a Sandbox Apple ID. But when I submit the app for review, the reviewer says it doesn't work. The error message returned by AppTransaction is "Unable to Complete Request", which is pretty vague. I get the same error when I try to use a real Apple ID for testing on my machine, so I have been wondering if maybe the problem is that App Review is testing a build that doesn't accept Sandbox Apple IDs? My app doesn't have a provisioning profile, could it be that this is the problem? As a Mac app developer, I'm not sure what provisioning profiles are good for, I thought they were only useful for iOS. Has anybody successfully submitted a Mac app that uses AppTransaction?
4
3
897
Apr ’23
subscriptionStorePolicyDestination is broken since iOS 18.0.1
I'm using StoreKit together with SubscriptionStoreView to show the subscriptions in my app. I also utilize subscriptionStorePolicyDestination to show the terms of service and the privacy policy link on the view: .subscriptionStorePolicyDestination(url: URL(string: "https://www.apple.com/legal/internet-services/itunes/dev/stdeula/")!, for: .termsOfService). Everything was working fine until iOS 18.0.1. After the update, when you tap into the terms of service (or the privacy policy) link on the store view, it opens the web view by rendering the page incorrectly. Besides that, it is not possible to close the web view anymore, you have to kill the app. I already submitted a bug (FB15552274) on Feedback Assistant but I didn't hear anything back for 2 weeks. My apps are getting rejected now, because the store view doesn't have: A functional link to the Terms of Use (EULA) A functional link to the privacy policy This is really frustrating because the API was working fine but now it is broken and neither the Apple developers nor the reviewers really care if the API is broken.
1
1
124
1w
iOS OfferCode testing in outside the app .
In my app, I need the user to redeem a code outside the app and then capture the transaction in the callback/response from the App Store. How can I test this process? Here's my function for opening a URL: if UIApplication.shared.canOpenURL(url) { UIApplication.shared.open(url, options: [:], completionHandler: nil) } } I am trying to get the transaction object in the TransactionObserver class: // Implementation details... } Here is the link to this class. However, I am not receiving the expected callback in this observer. I am testing on a TestFlight build. My question is: Is it possible to test offer codes in TestFlight? Or is there something wrong with my implementation?
2
0
148
3w
StoreKit2 - RenewalInfo parse decode error
The last line of StoreKit code below generates this parse/decode error in Xcode console; is this benign? Any suggestions how to fix it? [df892a08] Failed to parse status due to error: StoreKit.DecodingContext<StoreKit.Product.SubscriptionInfo.RenewalInfo.Key>.DecodingError.typeMismatch(for: [StoreKit.Product.SubscriptionInfo.RenewalInfo.Key.autoRenewalStatus], expected: Swift.Bool) Type: Error | Timestamp: 2024-11-04 11:00:53.056821-08:00 | Library: StoreKit | Subsystem: com.apple.storekit | Category: Default | TID: 0x77bc77 @Published private(set) var offeredSubscriptions: [Product] = [] // ... do { guard let anyProduct = offeredSubscriptions.first, let subscriptionInfo = anyProduct.subscription else { logger.error("\(#function): ..."); return } let statuses = try await subscriptionInfo.status // ...
0
0
146
1w
Your payments from Apple are on hold.
Hey everybody, today I received an email (seemingly automated) stating that my payment is on hold due to irregular activity. However, I haven't violated any rules, and I've seen that many other people have received the same message. As soon as I saw the email, I contacted support via phone, and the representative who assisted me confirmed that my account status is correct and in good standing. She requested that I forward the email to her for further investigation. Email received: "We noticed some irregular activity associated with your vendor number XXXXXXXX and have paused your earnings payments while we investigate. Once our review is complete, we'll determine if we can resume your payments." Questions: Has anyone else experienced this issue? If so, what was the process to resolve it? How long does it typically take to have the payments resumed? Wishing you all a great day, Thank you.
4
2
1.7k
Jul ’23
AppTransaction: how to use in ObjC apps (now that we are forced to use it after the exit(173) deprecation)
Hello We are developers of a long-running game series and now reports have started to come in that users who install any of our previous games from the Mac App Store on OS X Sequoia are shown a popup claiming "The exit(173) API is no longer available". It's actually a lie, the mechanism is still there, the receipt generation still works and the game still runs afterwards. But the popup is confusing to users therefore we need to update the code. Apparently the replacement for the old receipt generation mechanism is AppTransaction which does not exist for Objective C. We have attempted to use it using the Swift/ObjC interoperability and failed so far. The problem is that we need to call async methods in AppTransaction and all our attempts to make this work have failed so far. It seems as the actor/@MainActor concept is not supported by Swift/ObjC interoperability and without those concepts we don't know how to pass results from the async context to the callers from ObjC. The lack of usable information and code online regarding this topic is highly frustrating. Apple really needs to provide better support for developers if they want us to continue to support the Mac platform with high quality games and applications on the Mac App Store. We would appreciate if anyone can cook up a working sample code how to use AppTransaction in ObjC. Thanks in advance!
46
1
997
Sep ’24