So I'm testing out an in-app purchase in my app. I've got the code set up properly and everything, but when I do attempt to buy or restore in the sandbox environment, I get this error:
MZCommerceInAppBuy.App BuyInfoDataAccessFailure_message
[Environment: Sandbox]
I've never seen this before, and I am finding only one Google search result from someone else who has. It never was solved. Has anybody seen this?
I figured out a solution. The problem was coming because I was adding an in-app purchase to the current live version of my app. I created a new version of my app and changed it on my target to the update version.
I also downloaded a new development provisioning profile. I'm not sure if this is necessary, but I wanted to add that I created a new one just in case.
When you add in-app purchases to an app, you must create a new app version even for testing.
Note:
Just a side note. I noticed while I received this error I also wan't receiving any in-app purchase products. You will not receive any products until you create the new version.
I have an odd problem on my hands with in-app purchases and any insight or help would be appreciated. I have in-app purchases setup for my app and have been using them regularly during testing; however, every once in a while the SKProductRequest will return with 0 products and won't load any products until I completely remove the app from the device and re-install it. Then everything shows up again and purchases can be made.
I'm not sure what is causing this problem. It may have something to do with the test environment for in-app purchases? I know everything is configured correctly seeing as I can normally use the in-app purchases without any errors. Thanks for any help.
There may be several causes to Product Requests failing on a device. Basically, the StoreKit environment is very picky: if something in the app seems weird (like the code signature, or the embedded Provisioning Profile, or multiple app with the same profiles), it will not sent the request, or receive invalid data.
A common cause of silent failures is having multiple Provisioning Profiles installed for the same app. You can try to:
Uninstall all Provisioning Profiles from your device (in Settings),
Remove the app from the Device (to remove the embedded Provisioning Profile),
Re-install the app.
I wrote a small blog post about this issue a few months ago, you may find more detailed informations there : http://kemenaran.winosx.com/?2011/12/02/180-ios-developer-what-to-do-if-in-app-purchases-stop-working
I'm trying to implement in app purchases in my App using MKStoreKit. I've followed all the steps and I'm getting the error:
Problem in iTunes connect configuration for product:
I've recreated the provisioning profiles, checked the product id is the same as in itunes connect, sent and rejected a binary, trying to delete everything and set it up again and nothing is working.
Any idea?
I know this is a late reply, but somehow I could not find the answer to this problem elsewhere so I decided to post my experience in hopes it might help other frustrated people with this issue.
I have recently added an In-App purchase to my Free app and I faced the same problem during the testing phase and also once it was launched on App Store.
The answer is Patience. For some odd reason, after doing everything correctly, you need to wait for around a day before your product is recognized. So once you finish your Manage In-App product ID, you will only see it working the following day - so don't delete and recreate it again - just wait.
Furthermore, after submitting your app for approval with the first In-App product, even when your app is approved and available in the App Store, the In-App might not work at first and you will feel you did something wrong. Wait another day or so, and magically, it will start to work.
It didn't work in my case cause the phone was jailbroken. After restoring it worked like a charm.
my ipad was jailbroken. it was given this "Problem in iTunes connect configuration for product: xxx" i changed my ipad with regular(no jailbrek) ipad and it's working now.
I found this information on a blog which talks about invalid product ids.
http://troybrant.net/blog/2010/01/invalid-product-ids/
I tried everything suggested in the
Apple forums and here, and still
couldn’t get it to work. Found the
solution – your app needs to be
transferred by Xcode for the sandbox
to be enabled.
Obvious, right? Well, if you are
working with an update to an existing
account, the device will still treat
it as an App Store-installed app.
Delete it, then transfer it again. It should work now :)
i am also getting invalid product ids.i am not able to get clear in the above said point...
i am not able to understand what i need to do when transferring the application into device...
Kindly guide me out and thanks for your help
That point just means that you need to run the app from Xcode in order for the sandbox to be available. (Build and Run)
Invalid product ids are a major pain to debug. If you're sure you've gotten everything on that checklist, then you just need to wait. Then only other problem that I've seen is that you might need to remove the app from the device and redeploy in order to get good products back from the store.
I had trouble getting the app store to recognize my sandbox test account. I had to log out wit iTunes, sync, then log in again with iTunes. Just using the device itself to log in/out didn't help.
I'm trying to test In App Purchase within the sandbox environment.
In order to test the code I did the following:
Created an In App Purchase Test User account under 'Manage Users' in iTunes Connect
Created some in app purchase products under 'Manage Your In App Purchases'. I used numeric values and alpha-numeric values for the Product IDs.
Loaded the app onto the iPhone, went to Settings->Store and logged out of the regular store and into the test account created in step 1
Set a breakpoint in the
(void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response
callback
All the submitted Product ID's are in the response.invalidProductIdentifiers property.
When submitting the request I first tried the exact Product IDs created during step 2. I also tried prefixing them with the Bundle ID:
NSString *id2 = #"com.super.duper.8";
NSSet *productList = [NSSet setWithObjects:id2, #"8", nil];
SKProductsRequest *request= [[SKProductsRequest alloc] initWithProductIdentifiers:productList];
Am I missing something obvious?
Any help is appreciated.
Achim
If you are still getting invalid product ids, I've been accumulating a checklist of all of the various causes:
http://troybrant.net/blog/2010/01/invalid-product-ids/
I spent two days struggling with all my productsRequest (for AppID) ended up in response.invalidProductIdentifiers list, instead of in response.products list. Apple definitely did an F grade job in dealing with their storekit. It is confusing, intertwined and complex.
I did finally resolved it. One very important lesson I learned as indicated by few in the forums: It may take many hours for what you entered on the itunesconnect.apple.com to take affect.
There are two parts: application name and AppID in your xcode and what you entered in itunesconnection, they have to match exactly (case sensitive). If you registered or modified your in-App AppleID (I also completed all my contracts and bank information as suggested by some that the purchase actions won't work without getting this part done), you may as well go to bed before testing it again because it really takes hours in my case to take affect. I was so frustrated battling with this issue before my 9 year old dragged me for bed time story then surprised to find the issue disappeared when I woke up.
I found the suggestions by Eddy71 in http://www.iphonedevsdk.com/forum/iphone-sdk-development/21035-problems-creating-test-user-app-purchase.html really helpful. Before resolving it I did everything I possibly could do in Eddy's check list and still got zero products, one of my fears was that whether without uploading the binary code to complete the application registration in itunesconnect was ok (no need to go live as taught in http://blog.mugunthkumar.com/coding/iphone-tutorial-%E2%80%93-in-app-purchases/). It is indeed ok. Make sure the "cleared for sale" is check and in the icon is green (you need an extra step to approve it after filling out the form). The other fear was that whether I can use developer provisional (not distribution provisional) in debug mode, it is also indeed ok. I hope this may help some of you. Good luck and have faith. It will work eventually.
Our issue was the last bullet point from Apple's FAQ, "Why are my product identifiers being returned in the invalidProductIdentifiers array?":
You did not complete all the financial requirements (see the "Contracts, Tax, and Banking Information" section of this document).
You did not use an explicit App ID.
You did not use the Provisioning Profile associated with your explicit App ID.
You did not use the correct product identifier in your code. See Technical Q&A, QA1329, 'In App Purchase Product Identifiers' for more information about product identifiers.
You did not clear your In App Purchase products for sale in iTunes Connect.
You might have modified your products, but these changes are not yet available to all the App Store servers.
If you or App Review rejected your most recent binary in iTunes Connect.
I changed the most recent version (which had been rejected) to "Waiting for Upload" by clicking "Ready to Upload Binary" in iTunes Connect and the problem was resolved after about 10 minutes.
it's OK that the phone is jailbroken, you just have to uninstall appSync in Cydia, then it works
Apple has a fantastic document which is not well known that covers this at the end. It also dispels some myths about things that don't help (eg. submitting a binary).
Technote 2259 "Adding In-App Purchase to your iOS and Mac Applications"
We ended up creating a new provisioning profile, there was a line somewhere (can't recall where, not in the docs for in app purchase) that stated that you have to enable in app purchase in the provisioning profile. We couldn't do that with our existing profile, so we created a new one and then we could enable it.
Try resetting the iphone settings and delete the app from iphone and use the request product id directly without the Bundle ID
For anyone else that has these issues, I highly recommend reading this thread on the Apple Forum.
I tried everything suggested in the Apple forums and here, and still couldn't get it to work. Found the solution - your app needs to be transferred by Xcode for the sandbox to be enabled.
Obvious, right? Well, if you are working with an update to an existing application, the device will still treat it as an App Store-installed app.
So delete the app from your device. Then install the app back onto the device using Build & Run with your device tethered to your Mac. It should work now :)
In my case, I didn't complete the bank info, tax info, and contact info.Once I finish this, I can get my productID, hope this will help someone.
This is where you are going wrong, you need this in your code:
NSSet *productList = [NSSet setWithObjects:product id]
You can get this product id from iTunes connect.
And you need to make sure that you have created a test user, and have signed out of your original iTunes account. Please see do not sign in with test user account, regardless of what apple documentation says, just use it when a pop up appears.
What's that #"8" for? your product is named as com.super.duper.8 right?
http://blog.mugunthkumar.com/coding/iphone-tutorial-%e2%80%93-in-app-purchases/
Another issue I had was that I had to go to Window > Organizer in Xcode and delete my app and the provisioning profile(s) and re-add my development provisioning profile. I restarted the device and xcode as an extra measure.
I have tried every solution that available on the internet, and nothing worked, absolutely nothing. My problem: My device was jailbroken and had Cydia on it. I restored the device to factory defaults (Not jailbroken) and it worked the first time and returned the product ID no problem.
For me the problem was that I had chosen "Turn on Content Hosting" when set up the In-App purchase. So I had to turn it off and the problem was resolved.
It takes the store some time to make the products available to all server (see documentation). So you might experience a delay between creating a product in iTunes Connect and seeing that product id as a valid one when testing on device. For me it took around 12 hours till my products showed up.
A note for others: do not use an NSMutableSet for the product IDs. It has to be an NSSet!
If you want to keep your app data but you want to try deleting your app to fix this issue, sync your device first. Then delete your app and reinstall from Xcode -- this fixed the issue for me. Once it's working, you can restore your device from its backup -- this only takes a few minutes and the product requests still work after the restore.
Not exactly sure why, but when I changed the request's product ID from 'com.mycompany.myapp.product' to 'product' it started working. Maybe it's because of how I have the product configured in iTunes Connect.
Give it a try, might work for some of you...
replace:
NSSet *productList = [NSSet setWithObjects:id2, #"8", nil];
with:
NSSet *productList = [NSSet setWithObjects:#"8", nil];
Another problem that might be. If the name of your xCode project is not written of English, or has other characters in it, bundle ID will have "------" where the name of your app should be. I thought it is just a convention for bundle id, to have this in xCode. Turns out, this was my problem, so name your xCode project on English ) I know this is not the case for the most, but anyway)
I tried everything everyone is talking about. I ended up making a guest account first to see if the product ID could be found.... It was. So then I started quitting everything in activity monitor and found the problem. I had to quit the "store" processes below. All of a sudden I stopped getting the invalid product ID. Hope that helps someone out there.