Can I delete the file StoreKitTestCertificate.cer if I have a published app that uses StoreKit 2?
This is how I was using it earlier to do receipt validation but it's no longer in my released app:
#if DEBUG
let certificate = "StoreKitTestCertificate"
#else
let certificate = "AppleIncRootCertificate"
#endif
Source: https://developer.apple.com/documentation/xcode/setting-up-storekit-testing-in-xcode/
Can I safely delete StoreKitTestCertificate.cer in my next version this file without affecting the released app or TestFlight?
StoreKit
RSS for tagSupport in-app purchases and interactions with the App Store using StoreKit.
Posts under StoreKit tag
200 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
I have a VPN application published in the app store. Used Ikev2 for this personal VPN. There are two in-app purchases. One is 'Monthly' and another is 'Yearly' with 3 days free trial. We have seen something strange for the yearly subscriptions which has free trail, the cancellation reason through the billing issue is too high like 70-80% due to billing retry state. Some other apps which have billing issues under 10% always. We have done some research and found that if the user doesn't cancel and Apple is unable to charge then it goes to a billing retry state.
If users don't like the app, they could cancel their subscription/free trail easily but they are not doing this and why Apple unable to charge the bill after the trial ends. Am i missing something in the developer end?
As apple mention that it tries to collect payment up-to 60 days if a user has billing issue. Does enabling grace period for my apps changes anything regarding collecting payment or it's just used to reduce involuntary churns?
Hello developers,
I'm trying to add an in-app purchase to my app that costs more than $1000, which is the max price that I can set. I read that is possible to request access to prices up to $10,000, but I didn't find the via to make the request.
Does anyone know where I can make this request?
Thanks
I want to test SKPaymentQueue.default().restoreCompletedTransactions() for a non-consumable in-app purchase.
But when I delete the app in simulator, and reinstall (i.e. recompile it), all the transaction data in Xcode > Debug > Storekit gets deleted/cleared out, so how am I supposed to test restoring data for the scenario of when a user deletes and reinstalls the app?
Hi Everybody,
I'm making an app that has 4 in app purchases in it, but all of the tutorials I have found don't work in beta testing. Is it just that in app purchases don't work in the TestFlight app, or am I doing something wrong?
If it helps, here are the tutorials I have followed:
https://www.youtube.com/watch?v=YPQG0adwioA
https://www.youtube.com/watch?v=q7iBq-GMNd4
The second one works in the Simulator, but the other dosent.
Plese Help!!
I'm noticing that when I build for development and switch Apple accounts while the app is running, the device receipt isn't updated even after I call SKReceiptRefreshRequest.start(). The app behaves as expected if I install fresh. Is this a known issue if we're running from Xcode?
In my Xcode I have created a Product.StoreKit and within that I have a subscription with which has 3 Offer Codes.
In PaymentView I am trying to open a Redemption Sheet as follows:
if #available(iOS 14.0, *) {
paymentQueue.presentCodeRedemptionSheet()
}
But the Redemption Sheet is Pre-populated with Offer Codes and instead of having a text field to enter Offer Code, user can simply choose from the list of offer codes.
Hi,
I'm working on moving an app's in-app purchases from Store Kit to StoreKit2 and whilst running in TestFlight I'm getting a "There is no information for In-App Purchases" error every two out of three purchase attempts.
The third attempt usually throws up a "You've already purchased this" dialog and finishes purchasing the subscription within my app.
From what I can see, I'm not getting this back as an error from a call to anything, the error is being displayed by the OS.
I'm not sure if it's something in my code, something in my product setups which is causing it, or something-else.
Any help would be useful, I don't want o push out the update if the in-app purchases aren't working.
Cheers,
Rich
I have an app using in app purchase to buy diamonds And to buy diamonds i want to use in app purchase, Paid Apps agreement activated. I already defined product_id from API
[self.delegate applePayShowHUD];
NSDictionary *dics = @{
@"uid":[Config getOwnID],
@"coin":[dic valueForKey:@"coin_ios"],
@"money":[dic valueForKey:@"money"],
@"changeid":dic[@"id"]
};
[YBToolClass postNetworkWithUrl:@"Charge.getIosOrder" andParameter:dics success:^(int code, id _Nonnull info, NSString * _Nonnull msg) {
if (code == 0) {
NSString *infos = [[info firstObject] valueForKey:@"orderid"];
self.OrderNo = infos;//订单
//苹果支付ID
NSString *setStr = [NSString stringWithFormat:@"%@_testing",[dic valueForKey:@"product_id"]];
NSSet *set = [[NSSet alloc] initWithObjects:setStr, nil];
self.request = [[SKProductsRequest alloc] initWithProductIdentifiers:set];
self.request.delegate = self;
[self.request start];
}
else{
[self.delegate applePayHUD];
dispatch_async(dispatch_get_main_queue(), ^{
[MBProgressHUD showError:msg];
});
}
} fail:^{
}];
}
- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response
{
[self.delegate applePayHUD];
self.products = response.products;
self.request = nil;
for (SKProduct *product in response.products) {
NSLog(@"已获取到产品信息 %@,%@,%@",product.localizedTitle,product.localizedDescription,product.price);
self.product = product;
}
if (!self.product) {
dispatch_async(dispatch_get_main_queue(), ^{
[self showAlertView:YZMsg(@"无法获取商品信息")];
});
return;
}
//3.获取到产品信息,加入支付队列
SKPayment *payment = [SKPayment paymentWithProduct:self.product];
[[SKPaymentQueue defaultQueue] addTransactionObserver:self];
[[SKPaymentQueue defaultQueue] addPayment:payment];
}
and i already put the product in app store connect like this
i put configuration too in xcode
<SKProduct: 0x2833d8890>: Skipping product "coin_3000_testing" because no price was available
I always get skipping product, Am i missing something here ?
I test this in real device directly from xcode, not testflight
When I test the sandbox payment, Apple often prompts me the following error:
<SKPaymentQueue: 0x280602000>: Payment completed with error: Error Domain=ASDServerErrorDomain Code=2040 "目前無法購買此項目" UserInfo={NSLocalizedDescription=目前無法購買此項目}
device infomation:
iPhone X, iOS 14.4;
Xcode 14.2
I'm building app for iOS with flutter and I encountered some problem implementing the IAP function.
What I Encountered
I made a purchase in simulator. The product list was load successfully, the storekit poped up, and I finished purchase successfully as well. But I cannot see transaction detail in the Storekit Manager in xcode, neither can I see notification send from Apple.
I'm sure I configured the server URL in App Store Connect, and both chose V2.
I'm sure I enabled Storekit in Edit Scheme, and sync with App Store Connect
My server can receive Test Server Notification.
What I Expected
I want to receive the notification from Apple when make purchase from both develpment(simulator) and production(physical device). Otherwise I cannot verify the user's purchase.
I am trying to test an app with InApp purchase in TestFlight. I have also been testing in the Sandbox. In either environment I can not see purchases made on one machine, on a second machine. In TestFlight I am using my real Apple ID in the Test Flight app. In the Sandbox I am using a Sandbox user set up in AppStoreConnect.
Should purchases be recognised on two machines? I am trying to test functionality or purchasing a non-consumable on one machine and then also having access to it on a second. This is just extra functionality enabled on time only.
Should I be able to see purchases across the machines in SandBox or TestFlight or are they just simulating locally?
I have the same problem with Key values in iCloud which I can not see between two machines with the same user.
Hello I'm working on IAP with StoreKit2. In app is everything finished and OK, so I've started an implementation of server side. I'm using App Store Server Notifications API. If user subscribe something everything looks fine and I receive a notification with signedPayload body https://developer.apple.com/documentation/appstoreservernotifications/signedpayload.
Payload contains field like transactionId, originalTransactioId... but there is missing some information about user. I have to pair "subscribed" transactions with user to know what he bought, because I have also web version of iOS app so I need to pair stuff paid by IAP with web version. For example if I buy premium version of account by IAP, so I want premium version of account on the web.
Do you have any idea how to solve this problem?
Description
When I try to use SKStoreProductViewController to display the product page, the parameters parameter of the loadProduct method passes in an illegal SKStoreProductParameterITunesItemIdentifier, but the result in the completionBlock still shows success, and the error is nil.
Actually I noticed this problem exists from the first beta version of iOS 17 to the current latest beta version (beta 6).
code
Here is the minimal reproducible code:
var parametersDictionary = [SKStoreProductParameterITunesItemIdentifier: "***"]
let store = SKStoreProductViewController()
store.delegate = self
store.loadProduct(withParameters: parametersDictionary) { (result: Bool, error: Error?) in
print("Result : \(result), Error: \(error)") // Result : true, Error: nil
}
environment
iOS 17.0 beta ~ iOS 17.0 beta 5
iPhone 12 Pro
Xcode 15.0 beta ~ Xcode-15.0.0-Beta.6
Dear Apple Developer Support Team:
Our product is currently using the Original StoreKit to provide subscription services to our users, and we are using "https://buy.itunes.apple.com/verifyReceipt" to verify the subscription status of users. Everything is done within our mobile app, and we do not have our own server.
However, we have recently discovered that verifyReceipt has been deprecated, and during our TestFlight testing of our subscription service, we often encounter issues such as slow subscription callbacks and lengthy subscription status verification times.
Therefore, we are reaching out to seek your assistance. We hope that you can provide us with some help in resolving the issues we are facing with our subscription service development. This will enable us to have a more sustainable collaboration in the future.
We look forward to receiving your response as soon as possible. Thank you!
Best regards,
Avocado Development Team
Assume user purchase a auto-renewal subscription through apple, and send our server his receipt. What if our server doesn't call apple verifyReceipt endpoint, will this purchase be refunded automaticlly after a while?
And how about consumable, non-consumable sku?
Looking forward to receive your response. Thank you :)
We add some new consumable in-app purchase items in our game. These items has submitted and became available in iTune Connnect like other elder items.
But when I test purchasing in the game, just got a pop up window shows 'Purchase of this item is not currently available This item is being modified. Please try again later'.
It might went through when I try again sometimes yesterday, but it never success today.
This it's not releative to iCloud backup or relogin App Store account, I have tried but not working.
I though it's Apple's serverside bug.
Please help me to fix this.
"Purchase of this item" message happening on a Unity IAP project with PlayFab in the Apple sandbox. We have made no changes to our IAP items. Worked to begin with but started failing last week. Now we have 100% failure rate two weeks in.
Very frustrating.
I encountered an error with the following message while attempting to make an in-app purchase on iOS:
"Error Domain=SKErrorDomain Code=2 "(null)" UserInfo={NSUnderlyingError=0x281ec3840 {Error Domain=ASDErrorDomain Code=907 "(null)" UserInfo={NSUnderlyingError=0x281ec3720 {Error Domain=AMSErrorDomain Code=6 "Payment Sheet Failed" UserInfo={NSLocalizedDescription=Payment Sheet Failed, AMSURL=https://p41-buy.itunes.apple.com/WebObjects/MZBuy.woa/wa/inAppBuy?guid=00008101-001539DC0C8A001E, AMSStatusCode=200, AMSServerPayload={
"cancel-purchase-batch" = 1;
customerMessage = "Sign in with Apple ID";
dialog = {
cancelButtonString = Cancel;
defaultButton = Buy;
explanation = "Enter the password for %%appleId%% to authorise this transaction.";
initialCheckboxValue = 1;
kind = authorization;
"m-allowed" = 0;
message = "Sign in with Apple ID";
okButtonAction = {
buyParams = "";
itemName = "IAP_id_02_1500_product06";
kind = Buy;
};
okButtonString = Buy;
paymentSheetInfo = {
caseControl = true;
confirmationTitle = Pay;
countryCode = ID;
currency = IDR;
designVersion = 2;
flexList = (
{
value = (
{
style = priceMain;
value = "Rp\U00a0249ribu";
},
{
style = priceSub;
value = "One-time charge";
}
);
},
{
style = account;
value = "Account: %%appleId%%";
}
);
images = (
{
type = itunesgames;
value = "17+";
}
);
price = 249000;
requestor = AppStore;
salableIcon = "";
salableIconType = app;
salableInfo = ();
styles = (
{
bold = true;
name = priceMain;
size = large;
},
{
color = gray;
name = priceSub;
},
{
color = gray;
name = account;
}
);
suppressPrice = true;
title = {
type = text;
value = "App\U00a0Store";
};
};
};
failureType = "";
"m-allowed" = 0;
metrics = {
actionUrl = "p41-buy.itunes.apple.com/WebObjects/MZBuy.woa/wa/inAppBuy";
dialogId = "MZCommerceInAppBuy.ConfirmationNeededForBuyOneItem.CPS.Auth";
eventType = dialog;
message = "Sign in with Apple ID";
mtEventTime = "2023-07-11 12:38:00 Etc/GMT";
mtTopic = "xp_its_main";
osloTitleType = text;
osloTitleValue = "AbstractSalableInfoModule.AppStore";
topic = "xp_its_main";
};
pings = (
"https://xp.apple.com/report/2/xp_its_main?code=MZCommerceInAppBuy.ConfirmationNeededForBuyOneItem.CPS.Auth&buttons=Buy%3ACancel&baseVersion=1&dsId=8381620277&eventVersion=1&storeFrontHeader=143476-2%2C29&eventTime=1689079082059&eventType=dialog&message=Sign%20in%20with%20Apple%20ID"
);
"tid-dialog" = {
cancelButtonString = Cancel;
explanation = "MZCommerceInAppBuy.ConfirmationNeededForBuyOneItem.CPS.Auth.TID_explanation";
kind = authorization;
message = "MZCommerceInAppBuy.ConfirmationNeededForBuyOneItem.CPS.Auth.TID_message";
paymentSheetInfo = {
caseControl = true;
confirmationTitle = Pay;
countryCode = ID;
currency = IDR;
designVersion = 2;
flexList = (
{
value = (
{
style = priceMain;
value = "Rp\U00a0249ribu";
},
{
style = priceSub;
value = "One-time charge";
}
);
},
{
style = account;
value = "Account: %%appleId%%";
}
);
images = (
{
type = itunesgames;
value = "17+";
}
);
price = 249000;
requestor = AppStore;
salableIcon = "";
salableIconType = app;
salableInfo = ( );
styles = (
{
bold = true;
name = priceMain;
size = large;
},
{
color = gray;
name = priceSub;
},
{
color = gray;
name = account;
}
);
suppressPrice = true;
title = {
type = text;
value = "App\U00a0Store";
};
};
touchIDButtonAction = {
buyParams = "";
itemName = "IAP_id_02_1500_product06";
kind = Buy;
};
};
}, NSLocalizedFailureReason=Payment sheet dismissed with neither an error nor a result}}}}}".
I would like assistance in understanding and resolving this issue.