In-App-Purchase sandbox testing - Purchasing Not Supported in your region - ios

I developing an App for Ukrainian people with In-App-Purchase. When I add sandbox tester with Ukraine location and try purchase I am getting this alert .
If I use some other location, Russia for example - thats good. My App is for Ukrainian people and I am disturbed by this.
Does anybody know how to resolve this issue?

Apple is a US company and are therefore they are prohibited from carrying out business transactions with the Crimea region of the Ukraine as per executive order 13685 section 1 (a) (iii)
(iii) the exportation, reexportation, sale, or supply, directly or indirectly, from the United States, or by a United States person, wherever located, of any goods, services, or technology to the Crimea region of Ukraine;
I suspect that since you don't enter an address, just a store, when creating a sandbox user, they don't know which region you are in and they default to blocking the purchase. In production, a user has a registered address which lets Apple block purchases more selectively.
It looks like you will need to complete your testing with a user from another store.

Note: iOS 12+ Only
Sign in into your main account. Then you will see option for SANDBOX ACCOUNT.
Use not Ukrainian test account and test your purchases.
Sandbox Account Image:

You need to create the sandbox tester, related to not Ukrainian Itunes Store. Something like this:
Many thanks to Mike form Cherrypie Studio

I had the same error that was caused by using test user with Ukrainian country. But that error didn't go away even after I logged out from that account, created new non Ukrainian one, logged in(many times), logged out (many times), deleted an app, restarted the phone...
The only thing that helped was device reset. Only after that system stopped showing me that error and I finally saw App Store login window again.

Related

Sandbox User Login - Invalid Address

Basically I was trying to purchase subscription with developer mode certificates using Sandbox account details. Up to now I have used around 100 times same Sandbox user details and it was worked perfectly.
But from last 2 to 3 days its not get able to success in making purchase. At the end of purchase, I was getting following kind of dialog box then after no success in purchase.
Still application was not live in market so I can't use real apple account for making purchase so I was using sandbox user details for testing purpose.
Subscription as well normal product purchase also not working with same reason.
So what is running wrong in this? Please share some idea regarding this.
For this I found ad hoc solution at present.
I belong to India and up to now I used India country sandbox user account for testing purpose but from last few days its completely stopped working.
So I have created US sandbox user account and within Settings of iPhone, I selected US as country as Apple Store also selected as US user.
Then after I can able to test with sandbox user but still Indian user sandbox account not working so not sure what is going wrong into that but temporary solution I have so adjusted with that.

In App Purchase sandbox - Invalid address

I have implemented In App Purchase in so many applications and tested all of them in Sandbox environment. Right now I am working on one of the app's In App Purchase, which i tested yesterday and was working fine, but by today morning none of the existing sandbox accounts working for In App test.
I followed one of the apple thread to solve issue but nothing seems to be working.In this thread so many developers faced same issue, some of them come with solution, but none of them works for me.
I have tried below solutions till now:
Add new product with all meta data and tried with new product Id.
Created fresh demo app to test In App Purchase with new certificates and profiles.But not working.
Created new sandbox tester, verify it from mail account.
I am able to fetch product info like Product name and price but not able to complete purchase. At first when OS ask to enter Apple ID and Password for Sandbox user I entered it, it accept credential and iTunes logged in with sandbox user.But then suddenly another OS alert prompt with Invalid Address.
Find below screen shot of that alert.
When I tapped Continue, then it redirects to iTunes Store and after some loading, it display another alert with iTunes account creation not allowed. Below screen for that alert.
I have tried all possible solution but nothing worked for me. If any of you ever faced same problem then please update here.
I tried sandbox account with App Store Territory as United States and United Kingdom and it works, but with Indian Accounts not working.
Follow below steps to create Sandbox Account:
Open itunesconnect.apple.com
Select Users and Roles
Select Sandbox Testers
Select + button
From App Store Territory , you can create Sandbox Account for any country and test In App Purchase
Select country as United States or United Kingdom, works for me.
The "technerd" solution works properly in current situations, by using territory as "United States"
In case of Indian account, we need to follow the following extra steps.
1) After signin to iTunes Store message, we will get error in case of Indian Account.
"This apple ID is only valid for purchases in the U.S. iTunes Store. You will be switched to that Store." Touch OK
2) This will take us to iTunes store link, and come back to same view.
3) Sign - in again.
4) Success message will appear as
"You're currently subscribed to this. ..."
Hope this helps to persons like me.
Apple server looks like inappropriate, Wait for some time & try again.
Please logout with your sandbox account from your phone.Then make another account with App Store territory as United States, not as India.
I am sure it will works.
I am facing same problem ,as soon as i change Country ,it works like a charm.

Should in-app purchases be present after logging out of iTunes?

I am developing an iOS app. It will have non-consumable in-app purchases.
Q1. Let's say that a user is logged in on their iPad or iPhone to "iTunes & App Store" with "account1", then purchases the in-app purchase, and then logs out of "iTunes & App Store". Then they return to the app.
Should their in-app purchase still be present? Not will it, but should it?
If not, my questions are answered. On the other hand, let's say it should be present. Then I have a follow-up question.
Q2. After following all the above-mentioned steps, the same user logs in to "iTunes & App Store" with a different account, "account2". Should the in-app purchases they made with "account1" still be present while logged in as "account2"?
If you can enhance your own clear and succinct answer with an official statement from Apple, that would be awesome and much more likely to be marked as the solution! If not, thanks in advance for your personal thoughts, ideas, and opinions regarding the best user experience... if Apple doesn't have a clear position on this, then whoever makes the best case will have their answer marked as the solution.
Certainly an unusual case for two users to enter their App Store credentials on the same device. That said, the closest I can see to Apple having something to say about this is:
"Non-consumable products. Items that remain available to the user
indefinitely on all of the user’s devices. They’re made available to
all of the user’s devices. Examples include content, such as books and
game levels, and additional app functionality."
If you take this literally, and if you consider the device still being the same user's even if they have logged out, then I suppose you should make sure you award the non-consumable to the new user as well.
In my experience, many apps store locally when an IAP has been purchased so if the app has not been deleted, any user will see the unlocked content. Your app won't necessarily know that a new iTunes user is using the app, so it would be hard to detect that a new user was using it and revoke the content.
Additionally if you didn't want two users to potentially share a purchase, it would make more sense, in my opinion, to make the purchase a consumable and enforce some sort of log-in mechanism in your app such that it is credited to an individual authenticated account.
Purchases are literally stored in a file in the app bundle on the device. The path or url to the file can be accessed using appStoreReceiptURL. This documentation states:
In OS X, if the appStoreReceiptURL method is not available (on older systems), you can fall back to a hardcoded path. The receipt’s path is /Contents/_MASReceipt/receipt inside the app bundle.
While this is quote specifically mentions OS X, the same is true for iOS with the exception that the result is a localised app url. To support this further, the documentation for NsBundle (which is what appStoreReceiptURL returns) states:
An NSBundle object helps you access the code and resources in a bundle directory on disk.
So with this understanding, we can conclude that purchases are not stateless. They remain within the context of the app. If a user signs out of iTunes, the file isn't deleted.
If an app listens to the SKPaymentQueue, new transactions will come in from time-to-time, particularly when a user buys an auto-renewing subscription. If the user is signed out of iTunes they will receive a request to sign in with the account they originally subscribed with in order for the app receive and save the new receipt. But I digress.
By retaining the purchase state in the app, it allows the purchases to be used without an internet connection. Since an offline device can't authenticate with Apple, keeping the purchase state anywhere else would break this functionality. So yeah, it should be present.
As for Q2, the receipt for account1 is replaced with account2 once a transaction for account2 is received. However until account2 has their made first transaction account1's receipt will still be on disk. This can be used as an exploit to share purchases between users and AFAIK, no good solution exists without using your own user accounts. There are a bunch of stack posts describing this problem.
Should it happen? I wish it didn't, but it seems it is an unintended consequence of the stateful design of the purchase receipts.

Apple App Store - bypass listed purchase price?

Is there a way to offer a purchase free of charge for in-app purchases? I'd like to give a free download as a promotional item and not charge the normal price that is listed in iTunes.
You have to code for this in your app. In my app all purchases are registered on parse.com and sync'd between user's devices. I can add a purchase to the class on parse.com for a user and then they get the IAP for free when the data sync's to their device.
Apple don't have any mechanism for this like they do with app purchases unfortunately. The best way I've found is a custom URL scheme, so you can generated a code/string of your custom URL type ://myApp/123456promoCodeFooBar12999 etc, then your app, in response can connect to your server and check this code off against your database (confirming that it has not been used before, and can't be used again on a diff device) before unlocking the feature. This circumvents needing to get UUID's off people etc (which you can't do in code anymore to check against anyway), you just need an email address, send link, user clicks in it, your app opens and away you go :)
edit addition 28 Feb 2014..
an alternate approach might be to submit an separate paid version of the application in which all upgrades are unlocked because they are paid for upfront at purchase time. You may choose to keep this off the iTunes shelf but occasionally put it up, perhaps at a prohibitively high price, $1000 etc, because you can get the normal promo codes off Apple for this one to give to journalists etc, just explain what you are doing to them in your cover letter and I'm sure they'll be more than happy to play ball

iOS App rejected due to wrong purchase type

I am stuck with one of the in-app purchase rejection issue in my app and need some help on this.
What this in-app for?
In our app we have options for user to become premium user. A user can become premium user to enjoy some benefits and it is tied to time. There are two in-app products which defines them
One month premium service.
One year premium service.
Since these are time based service, user expects these service should be made available for that user once he/she purchase the product for the specified time, from all his/her other devices. In order to track whether the user is premium service user or not, once the purchase is done, the app writes a entry in server about premium service. So when user uses other device and logs in, he/she can enjoy the premium service without any issues. For this reason I created the above mentioned products as "consumable", thinking that it is controlled by our server there will be no issues. But apple came back with rejection and asked me to change the products to "non-renewing subscription".
Here is what apple says about this
We found that the Purchasability Type for one or more of your In App Purchase products was inappropriately set, which is not in compliance with the App Store Review Guidelines.
"Premium account service for 1 month and 1 year" IAPs are set to Consumable.
However, based on product functionality, it would be more appropriate to use the Non-Renewable Subscription In App Purchase type because the service offered by your application requires the user to make an advance payment to access the content or receive the service.
The Purchasability type cannot be changed once an In App Purchase product has been created. Therefore, you will need to create a new In App Purchase product with the correct Purchasability Type. To create a new In App Purchase in iTunes Connect, go to Manage Your In App Purchases, select your app, and click "Create New". The current product will show in iTunes Connect as "Rejected".
Non-Renewable Subscription content must be made available to all iOS devices owned by a single user, as indicated in Guideline 11.6 of the App Store Review Guidelines:
11.6 Content subscriptions using IAP must last a minimum of 7 days and be available to the user from all of their iOS devices
If you choose to use user registration to meet this requirement, please keep in mind that it is not appropriate to require user registration. Such user registration must be made optional. It would be appropriate to make it clear to the user that only by registering will they be able to access the content from all of their iOS devices; and to provide them a way to register later, if they wish to access the content on their other iOS devices at a future time.
For more information about Purchasability Type, please to refer to the iTunes Connect Developer Guide.
Now I have created new in-app products which are non-renewing. But this works the same way as I mentioned earlier, i.e. the server keeps track of whether user is premium user or not, expiry date. When user goes to other device and does login, the app comes to know whether user is premium or not and based on that app works.
But I have couple of questions on this,
Should I need to provide the "Restore" button in the app? If so what is the purpose and how it works?
Since the user can access this service only after doing login to the app (it is different from app store account). Will these two logins make any issue?
Please share your valuable inputs.
It is highly unlikely that the user will end up in a situation where they won't be able to use your app unless they restore their purchases, however it is still possible. Imagine your server goes down for a day and during that day some user purchases a subscription, gets a new iPhone, installs your app on the new device and then wipes their old iPhone. I can think of a couple of other, equally unlikely, but still possible situations (Apple receipt validation server going down, etc) in which the purchase receipt will get lost in transit. It's best to provide the button, and if Apple thinks that you need it in your app, you will have a hard time convincing them otherwise.
If by "two logins" you mean user having to log in to your system and then log in to the App Store to purchase the subscription, that should not be a problem.
I recommend you make the changes Apple requested to the Purchasability Type and then re-submit. If you need to clarify a lack of a restore button put it in the notes for the reviewer

Resources