Post not yet marked as solved
Here's the scenario–
App downloaded via TestFlight
appStoreReceiptURL is retrieved
Checks if there is a receipt at that URL
------> If NOT found–> a new request is via the following, and that's when the authentication dialog pops up, it is successful when sandbox account credentials are entered. Otherwise it fails
let request = SKReceiptRefreshRequest(receiptProperties: nil)
request.delegate = self
request.start()
My Question is (and I have no way to know this for sure), when app is in production, and downloaded from the App Store (Not TestFlight), would that also have the same authentication dialog pop? At this point I was assuming this authentication event is due to TestFligth and Sandbox Apple Account.
[mistakenly selected answered to the question asked earlier– hence re-asking]
For implementing a Store functionalities and tests by using StoreKit2, I have a task listener and two testcases.
The first one is waiting the update notification before processing the next SKTestSession operation.The second one is not waiting the update.
I looked update events theree times on first one, and twice on second one.
My question is, "Do multiple transactions created or modified within a certain period be emitted as a single Transaction.updates event?"
Task listener
Testcase1
Testcase2
Post not yet marked as solved
Hello
I keep getting the the message "A user with this emai address already exists on this team."
But it doesn't.... I tried with several different emails from different domains.
Apple apps are a nightmare to test!!!
Thanks for help
Paolo
Post not yet marked as solved
Hi, I'm getting the following error while uploading the iOS build from Xcode:
Profile doesn't include the com.apple.security.app-sandbox and com.apple.security.files.user-selected.read-write entitlements
I have also created an .entitlements file turning on both sandbox and user selected rights.
I can also see the required entitlements in signing and capabilities tab under app's target section.
I have also tried deleting all provisioning files from
~/Library/MobileDevice/Provisioning\ Profiles/
and re-downloading them again.
The build is getting succeeded but I'm not able to upload it to app store connect.
Any help or suggestions will mean a lot. Thanks!
Post not yet marked as solved
I tried adding StoreKit testing for an existing macOS app. On first launch, there is no App Store receipt on the main bundle and therefore my app calls exit(173) to get a receipt, and I get an App Store sign in sheet. Then when I sign in, I have a receipt that does not validate. I believe I'm simply getting an App Store receipt in the sandbox environment? I was under the impression that using StoreKit testing would allow me to test iAP in a local environment.
Here is my steps to reproduce:
1) Added the Configuration.storekit file to my project.
2) Set this file as the storekit configuration in the scheme editor.
3) Run the app.
4) Local receipt validation fails, macOS gives me a Mac App Store login prompt, which I can use but then I get a sandboxed App Store receipt on the main bundle. Receipt will not verify against StoreKitTestCertificate.cer.
I'm running Xcode 12.3. I'm on Big Sur. My app's deployment target is 10.11.
Any ideas? Thanks
Post not yet marked as solved
Our App uses storekit v1 to set applicationname to a string in UUID format, and our backend gets the same value in the appAccountToken in the apple store notification.
In-app purchases of our app are auto-renewable and found in sandbox environment testing. After placing several orders in a short period of time, the appAccountToken in the notification received by our backend is the same value in UUID format. But the app sets the applicationname to be a different UUID format value each time an order is placed.
What is the reason for this, is it normal?
Post not yet marked as solved
App is freezing/stuck when user taps on "Not Now" alert action of native StoreReviewController.
The issue is on iOS 15.0.2, App works perfectly fine in lower versions (iOS 14.4)
We used following code, to collect user review, also tried keeping this line on code in main thread, but no luck.
SKStoreReviewController.requestReview(in: scene)
Is there anything we could do to fix?
Thanks in advance!
Post not yet marked as solved
I have a black screen on the Simulator on xcode. i added all the code on the [App title] not the ContentView.
do I have to code the ContentView to make the app work? if so what do I need to add?
Post not yet marked as solved
Hi,
We are trying to test Auto-Renewable In App Purchases in our iOS application and we need to support several use cases:
Grace Period;
Failed Transactions;
Cancel the Subscription.
Regarding Cancel the Subscription, we know this is possible to test in Sandbox environment, as we can intentionally cancel it (since iOS 14), and the Auto-Renewable finishes the renewal operations after some times.
The problem we have is:
to test the use case where we couldn't renew the subscription (failed transaction) and we want to continue offering the service during the Grace Period. We were not able to reach this scenario neither in Sandbox environment nor using StoreKit in Xcode Debug mode.
Does anyone have a way to test this use case we described? Is it even possible to test this particular use case?
Thank you!
The status property is described as get async throws, but the details of the error is not described yet.
Is the error Product.PurchaseError?.
Post not yet marked as solved
When dealing with auto-renewable subscriptions, there are multiple ways to access the latest transaction. We can access it when a purchase is made, or we can request the latest transaction for a given productID at a later time. To do so, we can use Transaction.latest(for:), access the transaction history using Transaction.all, get the currentEntitlements, or use the array of Product.SubscriptionInfo.Statusthan contains the latest transaction for a subscription group. It's also necessary to listen to transactions when the app is running using the AsyncSequenceTransaction.updates`.
In my app (and also in the SKDemo project from Apple), when I want to access the latest transaction as soon as the app is launched, it's missing the transactions that renewed or happened while the app was not running. I tried using the different methods mentioned above but they never give me the latest transaction, always the latest transaction while the app was running before I killed it. I have to wait for a new renewal event to receive the latest transaction in the Transaction.updates listener, which is not good. For example, when I set the Subscription Renewal Rate to Monthly Renewal Every 30 seconds, and I quit the app when the latest transactionId is 100, I wait for 5 minutes, I expect to see the transactionId 110 but I see 100. In the real life, it means that if the app is not running when a monthly or annual subscription renews, I have to wait weeks or months to receive the missing transaction. I thought that the Transaction.updates listener would be called at launch with all the transactions that occurred while the app was not running.
Is that a bug in Xcode or have I misunderstood something? How can I access the real latest transaction that happened when the app was not running at launch? I need to access that to know what the user has access to. I think the transaction management panel from Xcode displays all the transactions, even the one when the app was not running.
PS: I'm using Xcode 13.2.1 and iOS 15.0 (simulator). Transaction.updates is not working on iOS 15.2 (my device, or simulator) from what I've seen so far.
Post not yet marked as solved
I am trying to test paymentCanceled use case using SKTestSession. Here is the code I am using:
var session = try? SKTestSession(configurationFileNamed: "PurchasesWithProducts")
session?.disableDialogs = true
session?.failTransactionsEnabled = true
session?.failureError = .paymentCancelled
The problem is whatever value I set to failureError the returned error is always:
Error Domain=SKErrorDomain Code=0 "UNKNOWN_ERROR" UserInfo={NSLocalizedDescription=UNKNOWN_ERROR, NSUnderlyingError=0x60000138ee50 {Error Domain=ASDServerErrorDomain Code=9999 "The server encountered an error" UserInfo={NSLocalizedDescription=The server encountered an error}}})
To me it seems like failureError property is not respected.
Also the docs are a bit misleading:
You can force an error by setting failTransactionsEnabled to true and setting failureError value to one of these supported error codes: SKError.Code.unknown, SKError.Code.invalidOfferIdentifier, SKError.Code.invalidSignature, SKError.Code.missingOfferParams, SKError.Code.invalidOfferPrice. At first I would think that I can only use those error codes but even by using those codes I am getting the same error.
Post not yet marked as solved
Hi, i would like to ask if there is a good way to build or setup an app with a lite version and premium version. Can't look up for good tutorials or ideas.
Post not yet marked as solved
Hello,
I have setup an App in App Store as a free app. Not yet submitted.
I added an in-app purchase as auto-renewable subscription
Trying to implement/test this using https://github.com/jamesmontemagno/InAppBillingPlugin
This returns true- await billing.ConnectAsync(true);
This then breaks- var prodInfo = await billing.GetProductInfoAsync(ItemType.Subscription, prodIds);
UNKNOWN ERROR returned.
My only thought is that the prodId for the in-app purchase is not available (yet).
QUESTION:
Does the app have to have been submitted for the target in-app purchase to be exposed in the app store for testing with a sandbox appleId account?
Thanks
Post not yet marked as solved
I have created the in-app purchase demo using store-kit before 1 year and also validate receipt. for that time it's working fine.now I purchased product and i am getting receipt validation status code is "21002". Can you please let me know how can i solve?
Thank you!
Post not yet marked as solved
Hi,
My app in-app purchase downloading from TestFlight or debug Xcode making purchase works correctly but it reject in apple review because during the test purchase didn’t work and occurred error:SKErrorDomain with code 2. This error in general appear when during the purchase user click Cancel. I have contacted apple board, they said that Your app does not comply with App Store Review Guideline 2.1. So how can i try in production since in TestFlight and debug it works? I really confused how to try solution for it?
Hi All,
I am using x code Version 12.5.1 (12E507)
I make application using flutter
I build IOS success and run on simulator is ok,
every thing is fine but in Xcode I face the problem,
Failed to create provisioning profile.
There are no devices registered in your account on the developer website. Plug in and select a device to have Xcode register it.
No profiles for 'com.company.myapp' were found
Xcode couldn't find any iOS App Development provisioning profiles matching 'com.company.myapp'.
also if I try to change I get
Failed to register bundle identifier
The app identifier "com.example.myapp2" cannot be registered to your development team because it is not available. Change your bundle identifier to a unique string to try again.
in store connect I create com.company.myapp
but also failed to avoid message
I need to upload my apps using xcode
I have company account, not free account
please help
Post not yet marked as solved
When we request the current entitlements for a user using the Transaction.currentEntitlements static method, does StoreKit provide transactions for subscriptions with a Product.SubscriptionInfo.RenewalState set to .inGracePeriod or only .subscribed?
I'm asking because as a developer we need to give access to content to a user if its subscription is in .inGracePeriod. So in my opinion, the user is still entitled to this subscription.
I've not found any information in the documentation, WWDC videos or Apple sample codes. The documentation explains
The latest transaction for each active auto-renewable subscription
Is .inGracePeriod considered an active subscription?
When testing In-App Purchases in Xcode with a .storekit file, I can delete past purchase transactions, so I can re-test the purchase experience.
I've switched to using a Sandbox tester and made purchases. However, I cannot find how to delete previous purchase transactions made in the sandbox so I can re-run the tests.
Is this possible?
Let's imagine an app with two plans, one for individual (level of service 2) and one for family (level of service 1).
If a user is subscribed as an individual, but if someone in his family shares a family plan with him, will Transaction.currentEntitlements show both subscriptions?
Or only the transaction where the user is the owner (in this case the individual subscription)?