Post not yet marked as solved
I'm not a member of any Family in iCloud. I want to understand what happens when a user is subscribed through Family Sharing but also how to use StoreKit when the user is subscribed twice: as an individual who purchased the product and as a member of a family when the purchase is shared with him.
How can I test Family Sharing for an app offering a product with Family Sharing enabled? Is it possible to create a fake Family in App Store Connect and add testers to it?
Post not yet marked as solved
Hello,
When a user cancels a subscription during a free trial, we should stop providing access to content. How can we know that? From the in app management in Xcode, when I cancel a subscription during free trial period (cancelling in the few seconds after the purchase), the currentEntitlements still provide the subscription.
How to know when a user cancelled the subscription during free trial?
Thanks
Post not yet marked as solved
I use StoreKit test in Xcode to test Consumable Project. I want to test the refund of Consumable Project. When I open the Manage StoreKit Transactions of Xcode 13, when I select Non-Consumable Project, I click the Refund Purchases button to purchase There is no refund for items, but when I click on the Consumable Project, I cannot refund. I test the refund function of Consumable Project.
We know that the relevant document is 'https://developer.apple.com/documentation/appstoreservernotifications/responsebody', but we don’t know how to trigger a refund in a sandbox environment
Post not yet marked as solved
I feel like this might be a bug with how Mac apps use StoreKit Configuration and the Transaction Manager.
I've got a Catalyst app that, while testing, will not call paymentQueue:updatedDownloads: from a restoreCompletedTransactions when built for Mac but does call it when tested on iPad.
The app seems to work in production though and is able to restore purchases successfully.
Can anyone confirm this behavior? Is this a bug with Xcode or am I working under incorrect assumptions?
Post not yet marked as solved
The Testing Ad Attributions with a Downloaded Profile page, from which we download the IA Pingback delay profile that reduces the wait time for an SKAdNetwork pingback, says:
This testing profile expires two weeks after you install it on the device. To continue testing, download the latest profile and reinstall it.
In my experience, this seems not to be the case at all. As of this moment, the profile itself was last updated on June 8, 2021. I periodically re-install it just to be safe, but it seems to continue to work longer than 2 weeks from the installation date.
Are the docs correct? Do I need to keep refreshing my test devices with the same profile?
If the profile really does expire two weeks after installation, can we get one that lasts longer? Having to keep updating the profile on multiple devices is a hassle, and it introduces unnecessary uncertainty into a process that already has a lot of moving parts.
Post not yet marked as solved
If User A comes and purchases an AutoRenewable subscription now his subscription is already running and he logs out
now User B registers in the same application on the same device and tries to purchase the same plan which User A previously did
In the above case How InApp will behave? and How we can detect that Apple id is already occupied with another user.
Post not yet marked as solved
I want to set 1 month free trial period in one of my application so whether apple will provide an exact 30 days trial period or it is 31 days trial period according to the calendar month.
could you please reply
Thanks
Post not yet marked as solved
Is there any way in iOS we can test in-app purchases by doing real payments without publishing applications on the app store?
Is there any way for real payment then please let me know it will be really helpful
Thanks
Post not yet marked as solved
Hey,
Currently we have few separate App Store vendors that we're developing apps for and the problem that we're facing is payment testing with sandbox user.
Apple doesn't allow to create sandbox user with email that has been used for sandbox testing for other vendor. Is there any kind of solution to ease up our QA process - switching sandbox payment accounts between every QA testing lane doesn't seem very efficient and not even remotely close to what I'd call convenient.
Creating emails with +1 is advised, but then sign up form results with an error.
Thanks!
Post not yet marked as solved
Can't create a sandbox test use, by warning that has a simple password. no matter how strong the password I used. Including 1 punctuation , 1 Upper, 1 Lower, 1 Special and at least 1 number, more than 8 characters. It still gave an error of a simple password and i can be easily guessed.
Post not yet marked as solved
Hello,
I implement redeem code inApp with this code :
let paymentQueue = SKPaymentQueue.default()
if #available(iOS 14.0, *) {
paymentQueue.presentCodeRedemptionSheet()
}
}
Before this I make every setup about subscription in my application. Now I just want to implement Redeem Code in-app.
And generate 1 redeem code for test in AppstoreConnect. I'm logged in with sandbox account in my application and enter that redeem code, I got : "The code you entered could not be found." at the top of RedeemCode screen.
I wait 24h and again same error.
Can someone to help me about testing of Redeem Codes and check my implementation?
Post not yet marked as solved
I'm trying to test a declined "Ask to buy" transaction and it runs but I'm getting a result I didn't expect: after the decline, the transaction's status shows as .pending, not .failed, which is what my mental model of the transaction cycle expects.
Here's the test code:
func testAskToBuyThenDecline() throws {
let session = try SKTestSession(configurationFileNamed: "Configuration")
// We clear out all the old transactions before doing this transaction
session.clearTransactions()
// Make the test run without human intervention
session.disableDialogs = true
// Set AskToBuy
session.askToBuyEnabled = true
// Make the purchase
XCTAssertNoThrow(try session.buyProduct(productIdentifier: "com.borderstamp.IAP0002"), "Couldn't buy product IAP0002")
// A new transaction should be created with the purchase status == .deferred. The transaction will remain in the deferred state until it gets approved or rejected.
XCTAssertTrue(session.allTransactions().count == 1, "Expected transaction count of 1, got \(session.allTransactions().count)")
XCTAssertTrue(session.allTransactions()[0].state == .deferred, "Deferred purchase should be .deferred. Instead, we got a status of \(session.allTransactions()[0].state)")
// Now we decline that transaction
XCTAssertNoThrow(try session.declineAskToBuyTransaction(identifier: session.allTransactions()[0].identifier), "Failed to approve AskToBuy transaction")
XCTAssertTrue(session.allTransactions()[0].state == .failed, "Declined purchase should fail. Instead, we got a status of \(session.allTransactions()[0].state.rawValue)")
// Why is transaction.state set to .pending instead of .failed?
My mental model looks like PurchaseFlow1, where there are two separate transactions that occur. The result of my unit test, though, seems to imply PurchaseFlow2. Are either of these models correct?
PurchaseFlow1
PurchaseFlow2
In the SKDemo app (sample code project associated with WWDC21 session 10114: Meet StoreKit 2, the code to handle deferred transactions is
func listenForTransactions() -> Task.Handle<Void, Error> {
return detach {
//Iterate through any transactions which didn't come from a direct call to `purchase()`.
for await result in Transaction.updates {
do {
let transaction = try self.checkVerified(result)
//Deliver content to the user.
await self.updatePurchasedIdentifiers(transaction)
//Always finish a transaction.
await transaction.finish()
} catch {
//StoreKit has a receipt it can read but it failed verification. Don't deliver content to the user.
print("Transaction failed verification")
}
}
}
}
It seems to me the catch section should try to handle declined transactions but we don't get a transaction to handle unless we pass checkVerified. But we failed to pass checkVerified, which is how we ended up in the catch section.
I'm obviously thinking about this wrongly. Can anyone help me understand how it all actually does work?
Thanks
Post not yet marked as solved
I’m trying to build an application which has a feature to tip other users. I was initially using stripe connect so it was pretty easy to send money to the tip receiver. But Apple said I cannot use stripe and I need to use in app purchases. Now, I want to implement the tip jar feature using the in app purchases but I’m not sure how I’m going to send the money to the person receiving the tip. In stripe, I was creating stripe connected account of the person and them sending him the money. How can I send money using Apple’s in app purchases?
Thanks in advance .
Post not yet marked as solved
Trying to test StoreKit purchases in our existing game from Xcode ends in failure. I have created a couple of consumable purchases which mirror the real ones, but an attempt to buy any one of them on a device (not simulator) ends in error "Purchase failed: unable to communicate with a helper application". This happens right after payment confirmation screen.
This is on the first iOS 14 beta and first Xcode 12 beta.
Any suggestions on how to work around that are welcome.