Testing In-App purchasing Iphone - iphone

I am writing an app for newsstand with free subscription but the product identifier i am using always comes back in the invalid set when making the request.
I have used this tutorial:
http://troybrant.net/blog/2010/01/in-app-purchases-a-full-walkthrough/
I have:
1) created an Appid (fsfe4.com.myapp.myappdesc)
1a) signed the paid ios app contract and filled in the banking/tax info
2) put that appid as the bundle id (com.myapp.myappdesc) in the plist
3) downloaded developer and distrubtion provisioning profiles (developer profile does not have wildcard)
4) updated the code signing identity (both the Debug and 'Any IOS SDK' has the iPhone developer referencing the developer profile i created and downloaded)
5) added the code
6) created and added info for the app on itunes connect (turned newsstand on, uploaded photos and filled out all the info)
7) compiled and archived the xcode project, uploaded it to itunes connect, rejected the binary.
8) created the in app purchase (free subscription), and attached it in the 'view details' part of the application.
I get this notice:
The first In-App Purchase for an app must be submitted for review at the same time that you submit an app version. You must do this on the Version Details page. Once your binary has been uploaded and your first In-App Purchase has been submitted for review, additional In-App Purchases can be submitted using the table below. Note that free In-App Purchase subscriptions may only be submitted with a version that is enabled for Newsstand.
I am not entirely sure what that means.
9) waited 24 hours
10) tried again with no luck
I have re-archived,uploaded and rejected my app a couple of times. I haven't changed the version # in itunes connect but i don't think that should matter.
According to Apple's guide it specifically says that I should not have uploaded the binary and rejected it:
Important DO NOT upload the development binary to iTunes Connect until the application is ready for App Review approval. If the binary is present in iTunes Connect and it is not
fully functional, App Review will review the binary and likely reject the development binary. Testing In App Purchase will fail if you or App Review reject your most recent
binary in iTunes Connect. The workaround in this case is to upload a binary without In App Purchase features that can get approved by App Review.
Once the binary is approved, resume testing the binary with In App Purchase features.
That goes against every other tutorial i have seen. Is there a way to remove the binary to get it back to the pre uploaded binary state so that I can test? should i just delete the app and start over? if I do delete it can I use the same bundle id and same app name?

The problem was that I didn't delete the app from the device and reinstall it after i had gone through the checklist here.
So much time wasted. Sigh.

Are you running your app with development provision or distribution provision?
Are you running your app with same app id / provision for which you have uploaded the in app purchase?
Follow this article - http://www.raywenderlich.com/2797/introduction-to-in-app-purchases

Related

Testing Non-consumable In-App Purchase

I am trying to create my first non-consumable in app purchase for my ios app and I just uploaded the .pkg to iTunes Connect (via XCode) but I still see this warning...
This In-App Purchase is not currently available for testing in the sandbox environment because you have chosen to host your content with Apple, but have not delivered your content. Upload your content to test this In-App Purchase in sandbox.
and the status is still
Waiting for Upload
I have not yet submitted my App's binary yet however.
How do I get rid of the message above and move on with testing in the sandbox env? Do I need to submit my app's binary?
Nevermind! I guess I was just being impatient. I checked back after a couple of hours and now the warning message has changed to
Your first In-App Purchase(s) must be submitted with a new app version. Select them from the In-App Purchases section of the Version Details page and then click Ready to Upload Binary.
For those who also got confused because they did not notify you directly, just make sure that you:
Archive your in app purchase, distribute it through XCode (Open organizer) and wait 1-2 hours.
This error came up for me when I edited an in-app purchase.
I have not received a reply from Apple but found that when I changed the image, I got this on saving.
Instead of being an edit, it turned into an add new.
As I have quite a few apps, I decided to add the in app-purchases to them and found that there was an issue with the graphic. There is no need to change the old one but thought it would be nice.
It is buggy.
I resolved the problem by deleting the new in app purchase and the edits were still saved into the original configuration except for the image.

Inapppurchase invalid product id - iPhone StoreKit

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

Export iPhone App for WWDC Submission

I will shortly be applying for the WWDC Student Scholarship. I have been working on an app that I would like to link to in my application. The app is not currently on the App Store.
When I export the app by exporting the .ipa file through Xcode, and email it to a friend for testing, he is unable to transfer the app from iTunes to his iOS device.
I can set up an Ad Hoc profile for him so that he can test it, but I obviously don't have information affiliated with iPhones Apple will use to review the app once I submit it to them.
What must I do to allow the app to run on any iOS device without setting up Ad-Hoc accounts for each?
Have you looked at the submission page? Login required: https://developer.apple.com/wwdc/scholarships/application/
It says your app must be on the App Store. First submit it to the App Store, then once it is approved you can apply for the student scholarship.
Without the device ID of the test phone, you can't distribute your app in development mode. One thing you could do is setup a free TestFlight account, include TestFlight in your app (takes about 10 mins to setup), and then include the TestFlight tester signup link with your application. Then if they want to try your app they can follow that link to register their device with TestFlight, then you'll get alerted when they do that and you can recompile your app with their device id and push it to them via TestFlight.

invalid Product Id's in In App Purchases iPhone application?

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.

Can I change the Bundle Identifier in my app after it's been approved?

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.