I have used "product id" like this "ADR123" in my application. I am getting "invalid product identifier" in-app purchase not working, whether this product id is valid or not?
u need to ensure that the bundle identifier is the one which is for the same app you have on itunesconnect which is having this product id added in in-app-purchase
Follow the checklists of http://troybrant.net/blog/2010/01/invalid-product-ids/
Also refer to this blog.
Checklists:-
Have you enabled In-App Purchases for your App ID?
Have you checked Cleared for Sale for your product?
Have you submitted (and optionally rejected) your application binary?
Does your project’s .plist Bundle ID match your App ID?
Have you generated and installed a new provisioning profile for the new App ID?
Have you configured your project to code sign using this new provisioning profile?
Are you building for iPhone OS 3.0 or above?
Are you using the full product ID when when making an SKProductRequest?
Have you waited several hours since adding your product to iTunes Connect?
Are your bank details active on iTunes Connect? (via Mark)
Have you tried deleting the app from your device and reinstalling? (via Hector, S3B, Alex O, Joe, and Alberto)
Is your device jailbroken? If so, you need to revert the jailbreak for IAP to work. (via oh my god, Roman, and xfze)
Related
Well, I'm having this issue now. I'm using MKStoreKit in my in-app purchase. This are my errors:
Failed transaction: <SKPaymentTransaction: 0x136a62e0>
error: Error Domain=SKErrorDomain Code=2 "Cannot connect to iTunes Store" UserInfo=0x13654a90 {NSLocalizedDescription=Cannot connect to iTunes Store}
Any idea?
You may remove that error via cross checking this check list.
If your answer is no for any of the points then it may be causing the problem
Have you enabled In-App Purchases for your App ID?
Have you checked Cleared for Sale for your product?
Does your project’s .plist Bundle ID match your App ID?
Have you generated and installed a new provisioning profile for the new App ID?
Have you configured your project to code sign using this new provisioning profile?
Are you using the full product ID when making an SKProductRequest?
Have you waited several hours since adding your product to iTunes Connect?
Are your bank details active on iTunes Connect?
Is your device jailbroken? If so, you need to revert the jailbreak for IAP to work.
For iOS7 and Xcode 5 Try doing this:
You have to test on a physical device as apple restrict IAP testing in the simulator.
Go to setting -> iTunes & App Store -> and log out of your account.
Remove app from device and clean all data.
Most importantly do logout from your current iTunes account in your device before trying to do any purchase.
Make sure you have done all necessary steps for in-App purchase testing.
As of September/October 2013, iOS7 simulators cannot process app store inapp purchase requests.
You need to use a real device
Imagine, you created new app profile in My Apps of itunes connect. Added in-app. All correct.
Now you want to test purchases. It shows list of products but stops on buy button with "Cannot connect to iTunes Store" error in log.
This is because you try to buy not approved and not existing product!
You can test only sandbox product right now.
So, you have to
create sandbox user (in itunes connect - users...)
logout you real itunes login on device
try to buy under sandbox login (it will ask you)
Had same issue and I just remembered not any apple id will work. You have to create a testing apple id in itunes connect / manage users/ test user / add new user.
Try putting a build number in. Target > General > Identity > Build.
This solved it for me.
I'm building an iPhone app and having a really hard time testing my support for in-app purchase using StoreKit.
Specifically, I am unable to retrieve a product ID using SKProductRequest, and so I can't get far enough to even try to attempt the purchase.
Here's what I have done so far:
- Created an App in iTunes Connect
- Created an App ID will a valid Bundle ID in the Provisioning Portal, and configured it to Enable In-App Purchase (I see a green ball for this App ID)
- Created a Provisioning Profile using the App ID above for my iPhone 3GS that I use for development (iPhone is updated with the latest current firmware) and imported it into XCode
- Set the Bundle ID for my application in Info.plist to match the Bundle ID (full Bundle ID, like "com.company.myapp")
- Created an In-App purchase associated with my iPhone app above, set its ProductID to "com.company.app.feature", set the type as Consumable and marked it as "Cleared for sale". The current status is "Pending Developer Approval"
- Updated my code to use the ProductID of the in-app purchase created above when requesting Product Information using SKProductRequest
- Signed out of my iTunes Store account on my phone, and enabled In-App Purchases on the device
- Built a Debug build of my app targeted for my phone with the Provisioning Profile above
- Deployed my app on my device using XCode and tried to run the StoreKit code with the USB cable attached.
When I issue a request for the product from the store, the productsRequest:didReceiveResponse: delegate is invoked, but the productID I request shows up as invalid.
Next, I also tried to upload a binary for my app and see if that made a difference, but it didn't. The current status of my binary is "Developer Rejected", if it matters.
It has been well over 24 hours since I created the app/in-app purchase
Thinking that it might have something to do with my device, I reset an iPod touch to factory settings updated with the latest firmware. I created a provisioning profile for the iPod touch and deployed the app to it using XCode. That didn't help either - I see the same "invalidProduct" problem.
Any suggestions of what I should do next?
Here you have many possible causes of Invalid Product ID
i just created In App Purchases for my new application and checked Cleared for Sale option.
But when i test my application after 2 days its still giving me invalid product id's..
I didnt Approve them earlier. Do i need to approve the App Purchases too before testing them...Will that affect my application when i upload my final binary and apple starts testing it??
I had the same problem.
It turned out I had to increment the version number of my app in my bundle. This was an app already on sale on the app store for which we decided to add in-app purchase.
Also make sure your bundle Id matches the one in iTunes Connect.
You don't need to approve the in-app purchase to test it only to clear it for sale.
I've got my app approved a while ago and used the * provisioning profile so I created somehting like:
com.mydomain.MyApp
but now I have the necessity of adding push notifications and I can't due I am using the * provisioning profile and it needs to have its own app ID and profile.
How should I proceed in order to achieve an app update without breaking anything
The bundle identifier for an app must always remain the same between updates, but the AppID can actually be different. So all you need to do is create a new AppID that used the same bundle identifier as the original app instead of a wild card.
Apps that use a wildcard still need a normal bundle identifier. The wildcard AppID lets you use any bundle identifier you like, but it still needs one.
There used to be an Apple article about this:
but it is no longer available online However, an archive is available.
You can't change the CFBundleIdentifier of a released app if you want to release updates for it, the App Store will automatically reject it when you upload. So...
I needed to enable iAds on an app previously developed with a wildcard App ID. Here's what I did:
I have a wildcard App ID of <AlphaNumeric>.* which my app currently uses, and my app has a CFBundleIdentifier of com.companyname.mygame.
Created a new App ID of <AlphaNumeric>.com.companyname.mygame.
Created new development and distribution provisioning profiles that include the new App ID.
Download the new provisioning profiles to Xcode and my devices.
I was then able to compile the App with the new non-wildcard distribution profile, which meant on upload I could enable iAds (or Push for you). The CFBundleIdentifier didn't change so the new compilation appears as an update to the existing app.
I can confirm this process worked without issue.
Under Frequently Asked Questions in the document entitled "Technical Note TN2259," which is "Adding In-App Purchase to your iOS and Mac Applications," there's this bit
Question: My iOS application is currently signed with a Provisioning Profile
that uses a wildcard App ID. How do I enable my App ID to support
In-App Purchase?
Answer: Read the Creating and Configuring App IDs section of
the iOS Team Administration Guide to learn how you can enable your App
ID to support In-App Purchase.
The link points here, and there's a section called, "Updating Your App to Include APNS, iCloud, In-App Purchase, or Game Center Requires an Explicit App ID"
That said, I don't know (yet) at what point the app takes on the new App ID. Is it when you upload for review, before that, or when it has been approved? I am working on this problem now, so I might be able to add to this answer soon.
Edit: The explicit app id only affects the piece of software you are testing and has, essentially, nothing to do with iTunes Connect whatsoever. This means that if you are testing in-app purchases, the piece of software that's running (your app) has to have a provision profile based on a cert that is app specific. What happens in iTunes Connect is totally irrelevant.
I would like to change the app id of an iPhone app that I am selling.
Is it possible to do so, update it, maybe add in-app purchases and have no problems?
EDIT
I did not change the bundle identifier. What I did was to create a new App Id in the iPhone Developer Program Portal. I first used a wildcard one and then to add the in-app purchase I created a specific one just for this app. I used the same id as I used first time I posted to the AppStore.
So, I did not change the App Id of the app. But this was how I solved this problem.
--
I did just that with one of my apps, "Nya Öl"
I added a in-app purchase for a Favorites List in version 1.1