Implement proactive in-app purchase restore

RSS for tag

Discuss the WWDC22 Session Implement proactive in-app purchase restore

Posts under wwdc2022-110404 tag

8 Posts

Post

Replies

Boosts

Views

Activity

Refunded purchases returned with current entitlements using StoreKit 2 on watchOS
Hello everyone, I am writing to inquire about a strange behavior that I encountered while using StoreKit 2 on watchOS 9.1 and Xcode 14.2. Specifically, when using the Transaction.currentEntitlements method, it returns refunded non-consumable purchases alongside valid ones. Additionally, I have observed that Transaction.updates does not notify me of refunded purchases or cancelled subscriptions while testing on my local environment with Xcode. When implementing the same code with an iOS app, it works as expected, indicating that this may be a watchOS-specific issue. This behavior is unexpected, and I am unsure if this issue also occurs in a production environment. Can anyone please help me with this issue? Thank you in advance.
2
0
1.4k
Aug ’23
Detect a subscription has expired
I'm following the example code that comes with SKDemo to understand where in the lifecycle of my app to detect the subscription has expired to block users from having access to functionality they shouldn't have access to anymore. This is pretty straight forward to implement and check on app launch. However, my app has a pretty low memory footprint so it's often not getting terminated over the course of several days. Still, I would like to check for a valid subscription whenever the app is foregrounded. Otherwise users might have access to subscriber-only features for numerous days before the app finally has to cold start again. Is there a way to listen to these kind of 'subscription-expired' updates or do I need to figure out myself to verify the subscription, for instance, by listening to UIApplication.willEnterForegroundNotification and then run some business logic on my end to confirm the user is still within the subscription period?
6
0
4.8k
Jun ’23
Implement "traditional" in-app purchase restore
I love how flexible yet simple the StoreKit2 APIs work. With the help of the session video and the provided example code, Implementing pro-active in-app purchase has been relatively straightforward. Now I wonder, does Apple require me to add a button - Restore Purchases - to the set of in-app purchase options in my app at all? If the answer is yes, is there any best practice on how to implement the "traditional" way of restoring in-app purchases with StoreKit2?
1
0
1.1k
Sep ’22
Can't run Example Code "Implementing a store in your app using the StoreKit API"
Hi all, I'm trying to run the sample code - it gives these errors and empty lists of available subscriptions and purchases 2022-07-22 17:32:51.978942+0300 SKDemo[11045:586088] [Default] Error enumerating unfinished transactions for first transaction listener: Error Domain=ASDErrorDomain Code=500 "Unhandled exception" UserInfo={NSUnderlyingError=0x283f8a7c0 {Error Domain=AMSErrorDomain Code=301 "Invalid Status Code" UserInfo={NSLocalizedDescription=Invalid Status Code, AMSURL=https://mzstorekit-sb.itunes.apple.com/inApps/v1/history?REDACTED, AMSStatusCode=404, AMSServerPayload={     errorCode = 4040003;     errorMessage = "App not found.";     okButtonString = OK; }, NSLocalizedFailureReason=The response has an invalid status code}}, NSLocalizedFailureReason=An unknown error occurred, NSLocalizedDescription=Unhandled exception} 2022-07-22 17:32:52.426875+0300 SKDemo[11045:586088] [Default] Error enumerating all current transactions: Error Domain=ASDErrorDomain Code=500 "Unhandled exception" UserInfo={NSUnderlyingError=0x283f8a790 {Error Domain=AMSErrorDomain Code=301 "Invalid Status Code" UserInfo={NSLocalizedDescription=Invalid Status Code, AMSURL=https://mzstorekit-sb.itunes.apple.com/inApps/v1/history?REDACTED, AMSStatusCode=404, AMSServerPayload={     errorCode = 4040003;     errorMessage = "App not found.";     okButtonString = OK; }, NSLocalizedFailureReason=The response has an invalid status code}}, NSLocalizedFailureReason=An unknown error occurred, NSLocalizedDescription=Unhandled exception} How do I fix it? Thank you in advance.
1
0
2.1k
Jul ’22
Are in-app purchase receipts included in the App Store receipt on initial install on a new device?
I'm working on an app that uses Auto renewable subscriptions. The app uses StoreKit (not StoreKit2). It is pre-release. I was under the assumption that if the user subscribes via in app purchase on Device 1, and then installs the same app on Device 2 (logged in with the same Apple ID) that the receipt on Device 2 would include the in app purchase receipt on initial install, and therefore by inspecting the receipt locally I could determine that showing onboarding UI on Device 2 is not necessary (and all this could be done locally). Is this not true? I just watched the WWDC 2022 session 110404 "Implement proactive in-app purchase restore" which seems to indicate that this is not the case?
4
0
3.4k
Jul ’22
Refunded purchases returned with current entitlements using StoreKit 2 on watchOS
Hello everyone, I am writing to inquire about a strange behavior that I encountered while using StoreKit 2 on watchOS 9.1 and Xcode 14.2. Specifically, when using the Transaction.currentEntitlements method, it returns refunded non-consumable purchases alongside valid ones. Additionally, I have observed that Transaction.updates does not notify me of refunded purchases or cancelled subscriptions while testing on my local environment with Xcode. When implementing the same code with an iOS app, it works as expected, indicating that this may be a watchOS-specific issue. This behavior is unexpected, and I am unsure if this issue also occurs in a production environment. Can anyone please help me with this issue? Thank you in advance.
Replies
2
Boosts
0
Views
1.4k
Activity
Aug ’23
Detect a subscription has expired
I'm following the example code that comes with SKDemo to understand where in the lifecycle of my app to detect the subscription has expired to block users from having access to functionality they shouldn't have access to anymore. This is pretty straight forward to implement and check on app launch. However, my app has a pretty low memory footprint so it's often not getting terminated over the course of several days. Still, I would like to check for a valid subscription whenever the app is foregrounded. Otherwise users might have access to subscriber-only features for numerous days before the app finally has to cold start again. Is there a way to listen to these kind of 'subscription-expired' updates or do I need to figure out myself to verify the subscription, for instance, by listening to UIApplication.willEnterForegroundNotification and then run some business logic on my end to confirm the user is still within the subscription period?
Replies
6
Boosts
0
Views
4.8k
Activity
Jun ’23
How to convert png to svg and save image as .svg in swift
Hi, I need the to convert png o jpeg image into svg image for quality and clear pixel while zooming, can you please let me know how to do in iOS or there is any framework available, or we can change the image data as vector.
Replies
0
Boosts
0
Views
1.2k
Activity
Nov ’22
Why developer need to provide restore button?
Hi, I am working on Subscription when i saw the SKDEmo apple video, and many of the other developer statement is, need to provide Restore button. My question is: App restore the subscription automatically using Storekit 2, then why we need Restore button and please explain what is the purpose of the button in Storekit 2.
Replies
2
Boosts
0
Views
1.2k
Activity
Oct ’22
AutoRenewable not working properly using Storekit 2 [SKDemo]
Hi, I am using SKDemo project. For the first time it will renew properly, suppose i will uninstall and reinstall the app updateCustomerProductStatus() function not get called or it will take more than 10 minutes. I don't know what is the issue.
Replies
4
Boosts
0
Views
1k
Activity
Oct ’22
Implement "traditional" in-app purchase restore
I love how flexible yet simple the StoreKit2 APIs work. With the help of the session video and the provided example code, Implementing pro-active in-app purchase has been relatively straightforward. Now I wonder, does Apple require me to add a button - Restore Purchases - to the set of in-app purchase options in my app at all? If the answer is yes, is there any best practice on how to implement the "traditional" way of restoring in-app purchases with StoreKit2?
Replies
1
Boosts
0
Views
1.1k
Activity
Sep ’22
Can't run Example Code "Implementing a store in your app using the StoreKit API"
Hi all, I'm trying to run the sample code - it gives these errors and empty lists of available subscriptions and purchases 2022-07-22 17:32:51.978942+0300 SKDemo[11045:586088] [Default] Error enumerating unfinished transactions for first transaction listener: Error Domain=ASDErrorDomain Code=500 "Unhandled exception" UserInfo={NSUnderlyingError=0x283f8a7c0 {Error Domain=AMSErrorDomain Code=301 "Invalid Status Code" UserInfo={NSLocalizedDescription=Invalid Status Code, AMSURL=https://mzstorekit-sb.itunes.apple.com/inApps/v1/history?REDACTED, AMSStatusCode=404, AMSServerPayload={     errorCode = 4040003;     errorMessage = "App not found.";     okButtonString = OK; }, NSLocalizedFailureReason=The response has an invalid status code}}, NSLocalizedFailureReason=An unknown error occurred, NSLocalizedDescription=Unhandled exception} 2022-07-22 17:32:52.426875+0300 SKDemo[11045:586088] [Default] Error enumerating all current transactions: Error Domain=ASDErrorDomain Code=500 "Unhandled exception" UserInfo={NSUnderlyingError=0x283f8a790 {Error Domain=AMSErrorDomain Code=301 "Invalid Status Code" UserInfo={NSLocalizedDescription=Invalid Status Code, AMSURL=https://mzstorekit-sb.itunes.apple.com/inApps/v1/history?REDACTED, AMSStatusCode=404, AMSServerPayload={     errorCode = 4040003;     errorMessage = "App not found.";     okButtonString = OK; }, NSLocalizedFailureReason=The response has an invalid status code}}, NSLocalizedFailureReason=An unknown error occurred, NSLocalizedDescription=Unhandled exception} How do I fix it? Thank you in advance.
Replies
1
Boosts
0
Views
2.1k
Activity
Jul ’22
Are in-app purchase receipts included in the App Store receipt on initial install on a new device?
I'm working on an app that uses Auto renewable subscriptions. The app uses StoreKit (not StoreKit2). It is pre-release. I was under the assumption that if the user subscribes via in app purchase on Device 1, and then installs the same app on Device 2 (logged in with the same Apple ID) that the receipt on Device 2 would include the in app purchase receipt on initial install, and therefore by inspecting the receipt locally I could determine that showing onboarding UI on Device 2 is not necessary (and all this could be done locally). Is this not true? I just watched the WWDC 2022 session 110404 "Implement proactive in-app purchase restore" which seems to indicate that this is not the case?
Replies
4
Boosts
0
Views
3.4k
Activity
Jul ’22