iOS in app purchase - "this account does not have permission.." - ios

Ok here goes trying to explain this as clearly as possible:)
I have developed an app for a partner.
They wanted to submit the app under their company so I was given the certs and profiles. I packaged the app ...they submitted and all was fine.
Now I need to update the app with new content. So all this is done and the client has set up new in App purchase products for the app.
The Problem:
When I am testing all of the "product requests" are successful and it displays the description of the product etc.
However when I come to test purchasing with a iTunes test account it does not work. It says
"This account doesn't have permission to make in app purchases. You
can change account permissions in iTunes Connect."
However to try and work out the problem, as a test I quickly set up a "test" app in OUR iTunes account and a new bundle id etc and set up same IAP products. I then changed the app ID for the actual client app to point at this. And this works fine no problem what soever when testing via Xcode on device.
I am at a loss at what is wrong here as when I did the original app all worked as expected as in I was able to use a iTunes test account I had set up to test their app.
Any ideas what might be going on?
regards
ade

Apparently the test user account needs to be on the same apple developer account as your app!

Related

iOS In-App-Purchase Sandbox Environment Product issue

I’m new for IAP feature in iOS. I sent my couple of day to test IAP for learning purpose bur did not get success.
Something I’m missing to implement or whatever I don’t know exactly thats why I’m asking here. Basically I wrote code from this tutorial and my system is iOS 9/10 and Xcode 7/8 actually I tried with both.
I did all the step correctly Make “Test User”, Remove iTunes account from the device etc and also test cases from this web link but still facing “In Valid Product ID” don’t know why? but did not get list of product(s) from iTunes.
Just clear me for below point
1) Do I need upload app on AppStore (temporary then reject it) for first time test IAP in sandbox environment or no need to do?
2) Do I need to add ”Contracts, Tax, and Banking Information" in iTunes for sandbox environment or no need to do? (Right now added in my iTunes Account)
I added product on iTunes with and without screenshot uploaded but each time when I upload screenshot with product in iTunes then status was “Ready to Submit” and and without screenshot status was “Missing Metadata”
Is it correct status? and can we test IAP purchase with this status in Sandbox Environment?
1) No. There is no need to upload an App and reject it in order to test In-App purchases. You only need to create a sandbox account.
2)Yes, add the required information.
Make sure you have properly submitted each In-App purchase AND added them to the app - both steps required.

iTunes account creation not allowed when trying to test In-App Purchases

I have an app in the App Store and I want to test in-app purchases. I followed the steps described on the Apple website but I'm facing some problems.
When I try to log in in the iTunes in my application or in Settings/iTunes & App Stores, I receive the error:
iTunes account creation not allowed.
This Apple ID cannot be used with the iTunes Store at this time. Please try again later
I searched the internet but I found nothing about this. It seems like I am the first to encounter this kind of error.
Looks like Apple has this poorly documented. Basically, you shouldn't log in with your sandbox user from that screen. Log in when actually prompted by your test IAP.
Source: Unable to log in with sandbox test users on device
I just had the same problem. Here's how I solved it:
Don't try to sign in Settings > iTunes & App Stores
Log out of iTunes & App Stores (make sure you're not logged into any account)
Just open the app you're trying to test
Your app will promt you to sign in
Enter your credentials for your sandbox test account
Et voilà! You're done. Worked for me. I hope it works for you.
For those who are still facing an issue, here is the solution:
From settings main screen, select "iTunes & App Store", as seen in the picture
now scroll to bottom and you will find your previous apple is still there, sign out of that, see picture for reference, and now when doing in app purchase, it will ask for both apple id and password, use your sandbox tester apple id and password there.
I had this issue. I tried changing existing Sandbox tester account password and tried to login on device...but didn't worked.
Even iPhone device restart didn't worked [last option that most developer follows ;-) ]
I thought it takes time to update this newly created Sandbox testing on DB. So left the login option as it is on device
Now, after launching app that contains In App purchase. Press on button that is responsible for In App purchase. This will prompt for Apple credentials. Enter the Sandbox tester credentials here.
Voila this worked for me!
This has changed... again. Here's how to fix it in 2020:
0) On your test device, go to Settings.
1) Click your account name at the the top, the one with "Apple ID, iCloud, iTunes & App Store" under it.
2) Click "iTunes & App Store"
3) Scroll all the way to the bottom and find the option: "SANDBOX ACCOUNT". It will have defaulted to your AppleID. Tap it and sign out.
4) Tap "Sign In" under SANDBOX ACCOUNT.
5) Add your Sand Box Account credentials. You will probably have to have verified your email address before this will work.
The top answer is correct, but if you're still having the issue:
Make sure that the app you're trying to log into is a development app installed with Xcode. You'll get the same error if your version was installed from the App Store.
(I got confused because I have 5 versions of almost the same app.)

Testing In-App Purchase on iPhone

I have setup my app to use In-App Purchases. All the necessary steps have been done and everything works except for one thing, the final step for completing the purchase transaction i.e. SKPaymentTransactionState always completes with Failed every time.
So I did some research and found another post that said not to test this in the simulator and do it on a physical device as it seems there is a limitation placed on making purchases in the simulator by Apple on purpose.
So I went back to try to run this on my physical iPhone instead. The problem I'm having now is that my physical iPhone is linked to my active iTunes account. When I try to make a purchase on it, the User ID is already defaulting to my active ID and it only asks for my password.
So my question is (1) How do I force the phone to ask for me to enter a new User ID and Password so that I can use the Sandbox User I created in iTunes Connect? (2) I am a little nervous about even entering a secondary iTunes credentials, can anyone validate what the behavior is like? I do not want my active iTunes account to have any issues, it is possible to run both my active iTunes account and the sandbox user on my physical device with no issues?
Log out of iTunes on the phone via Settings, but wait for the app to prompt you to log in before entering your sandbox account credentials. NOTE that I'm referring to iTunes, not iCloud. It gets more interesting if you need to do that.
When you're done testing, log out again via Settings but differently than before, go ahead and re-log in via Settings to your "regular" Apple ID to return to production use.
You can't run them "simultaneously" as such but you can use your regular device to sandbox test without problems.

Testing of In-App-Purchasing in ios

I am using In-App-Purchasing first time in ios,for this i have follow the steps which is given on following links.
http://www.raywenderlich.com/21081/introduction-to-in-app-purchases-in-ios-6-tutorial
and
http://www.tutorialspoint.com/ios/ios_in_app_purchase.htm
I have add two consumables product in my application on itunes connect.
create and download new provisioning profile and configure it with my project.
create test user for testing in-app-purchase
my issue is
"response.products.count" is empty on device AND on simulator it returns 2(which is correct product).
I don't know why it is not working on device.
(1). Can we test In-App-Purchasing with sandbox mode on "unlock devices" ?
(2). Can we test In-App-Purchasing with sandbox mode on "Jailbreak Devices" ?
Can you please help me to resolve this issue.
Thanks.
This is a bug from apple server side. because from last couple of days many test accounts are not working.
fix this issue, I simply registered a new user in iTunesConnect, but I set their store to 'USA'.
for testing in app purchase check that in device you are not logged in to app store from apple id
if you are logged in App Store then sign out all of account and then test in app purchase within application..
Some times there will be problem while fetching products from server if your application works in simulator then it will working fine with your Device ....just checkout your certificate that you used for testing in device and also checkout sandbox account ..it working try thanks...

In App Purchases - empty product list

I'm trying to understand how to work with In App Purchases. I've read many documents and seen a lot sample codes but I can't understand why product list is empty. According to documentation and forums I made this:
Setup contracts on iTunes connect.
Create AppID on provision portal with unique bundle ID
Create and install provision profile for this AppId and enable In App Purchases
Create application on iTunes connect.
Create purchases for this application.
Submit application.
Reject application.
In code, I've tried to receive product information by product ID and as result I can see empty list. However, I can see an array of invalid product IDs.
Could you help me to understand what is wrong?
Thanks.
According to Apple documentation:
Follow these steps to test your application in the sandbox.
- Log out from your iTunes account on the test iOS device.
- Before you can test your application, you must first log out of your regular iTunes account. iOS 3.0 includes a Store category in the Settings application. To log out of your iTunes account, exit your application, launch the Settings application and click the Store icon. Sign out from the currently active account.
- Important: Do not sign in with your test account in the Settings application.
- Launch your application.
- Once you have signed out of your account, exit Settings and launch your application. As you make purchases from your application’s store, Store Kit prompts you to authenticate the transaction. Log in using your test account to approve the payment. No financial transaction takes place, but transactions complete as if a payment was made.
I've tried it and can't see "Store Kit prompts you to authenticate" when I ask for products. Maybe I need to setup project in xCode?
Hm...
I can see products in Simulator of iOS 5 but can't buy it. Magic.
Try to delete your build and app on your device. I think this one should work.
It can take a good few hours for Apple's server to get round to enabling the in-app buys. I had the same problem that you did, but then it just started working half a day later.

Resources