can't get In-App-Purchase hosted content to be actually hosted - iphone

I have an iPad app with In-App Purchase that used to host its content with Urban Airship (a pox upon their house). Now I'm trying to convert this to use Apple's hosted content.
I've created a .pkg file for one of my content items, and used Application Loader (multiple times now) to upload the content. The package passed validation, I clicked "Deliver," and I watched the progress bar as it was "Uploading package to the iTunes Store." In the "Hosted Content" tab for this item, "Host Content with Apple" is clearly checked, and the "Hosted Content Package:" well shows the standard package icon.
Yet, when I look at the same app on iTunes Connect, and go to In-App Purchases and view the same content item, it says: "Hosting Content with Apple: This feature is turned off." (And no hints are provided here as to how one might turn it on.)
In my code, when I get back the SKProduct from StoreKit, I find that downloadContentVersion and downloadContentLengths are both nil. And when I purchase it anyway using a test account, I get a SKPaymentTransaction whose .downloads is also nil. And if I quit and relaunch Application Loader, the "Host content with Apple" checkbox is now unchecked. This is all probably related to the fact that Apple doesn't realize they are now hosting this content.
Perhaps life is more difficult because this is not a new app or new content item; both of these were approved long ago, and I'm trying to update them to the new model. But I certainly don't want to create a new app just for this. What's the key step I'm missing that makes the Apple servers actually host this content?

I had to "review" my "iOS Paid Applications Agreement". This means going to iTunes connect - then "Contracts, Tax, and Banking" click the "Request" button and accept all the changes...
After this every problem was gone. Got the answer from this stackoverflow site:
Updated iOS Applications Agreement
My problem wasn't similar to yours but I have read similar so posts with the same solution that did it for me. Try it out. Hope it helps you or anyone else :)

Related

InAppPurchase invalid product identifiers - Possible Reasons

It has been a long night chasing the problem within my in-app purchase trials yet I can not seem to solve this issue.My product identifier keeps returning as "invalid product identifier". Hopefully someone will point it out;
(With current provisioning profile and appId I got push notifications working)
My App ID is generated (with no wildcards) - inApp purchase is enabled
My IAP(In-App Purchase) is added in "Manage your in-app purchases" and cleared for sale.
My IAP is added 24 hours ago ( maybe couple of hours more) and is in "Waiting For Review" state
My App itself is developer rejected > and it is state "ready to upload", in-app purchase is added to the App.
My phone is not jailbroken (at least not anymore, didn't worked either way)
I am working with a 3GS, 5.1 iOS.
My current provisioning profile is a "Developer Profile" not a "Distribution Profile". "Distribution Profile" is used only while uploading the Application Binary.
I am building for iOS 5.0 and build configuration is set to Debug.
I deleted the app like 100 times now, literally.
All details are set in iTunes Connect, including bank details.
I have created a test user, and I logged in from "Settings > Store" on my device.
My SKProductRequest:
SKProductsRequest *productRequest = [[SKProductsRequest alloc]initWithProductIdentifiers:[NSSet setWithObject:#"com.my_site.my_app.my_product"]];
Any other information can be supplied.
I don't know how, and don't know will it remain valid. But here is the interesting solution which let me solve my problem.
According to the documentation, SKProductRequest should be;
SKProductsRequest *productRequest = [[SKProductsRequest alloc]initWithProductIdentifiers:[NSSet setWithObject:#"com.my_site.my_app.my_product"]];
Your product request should be like this;
com.my_site.my_app.my_product
but in my situation I just sent my product id, just like this and it WORKED;
SOLUTION #1
SKProductsRequest *productRequest = [[SKProductsRequest alloc]initWithProductIdentifiers:[NSSet setWithObject:#"my_product"]];
While digging in, I found that for some people this notation also worked;
SOLUTION #2
SKProductsRequest *productRequest = [[SKProductsRequest alloc]initWithProductIdentifiers:[NSSet setWithObjects:#"com.my_site.my_app","my_product",nil]];
There was nothing wrong with my setup, and the above listed things should be supplied, if anyone having problems with invalid product identifiers, I recommend them to visit Troy Brant's "Cause of Invalid Product ID's List", here . Also you can find his detailed walkthrough about implemeting and setting up IAP, here.
If you get desperate, I strongly recommend you to try both solutions, and they can save you from hours of frustration.
Please make sure you have not missed anything from below list.
Please remove the Existing application from the Device and Install
the fresh build from Xcode.
Have you enabled In-App Purchases for your App ID?
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 a 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.
If you answered No to any one of these questions, there’s your problem.
Please refer Reference
My paid applications agreement wasn't valid in iTunes Connect. As soon as I agreed to the new one, it fixed the problem.
In my case the problem was that I had previously created "StoreKit Configuration file" and then made change in Product Scheme:
Go to Product > Scheme > Edit Scheme and in Run/Debug tab under
Options I chose StoreKit configuration file.
Apparently this config was used instead of my App Store Connect IAP. So, the solution was to uncheck that option. You don't have to delete StoreKit Config file if you still need it for some reason.
You are using the latest provision profile right(which is downloaded after setting up in-app purchase).
Things ended up working for me:
I use Xcode automatic profiles and I got a bit confused on the app store connect webpage with the profile. I made sure ids matched on Xcode and on the webpage.
I just needed the product id, not the full com.company.app.product
took me like 2 hours to have things work, so maybe some refresh time on Apple's servers
Spends a couple of days at this. Here is what was missing from mine:
Make sure the BundleID in iTunes Connect matches that in your Xcode project.

Tracking the Reseller of the iPhone -App from inside the App

I have been stuck in a strange situation, according to my requirement, I need to track the resellers of my app, i.e. I will be publishing link of my app in the iTunes-Store on 3 or more different sites(The re seller's sites).
According to my promise which I made to these resellers, I will provide a share of my profit.
So here I have to track from which link did the user came to the APP-Store.
Any suggestions or solutions will be Thankful.
I think the only way to do it will be server-side. Links at your resellers should point to your server, where you log the source of link (resellers web page) and redirect request to AppStore. But you'll have no way of knowing, which of this requests ended up with a purchase.
The only way to do this for real is to get them to become iTunes affiliates and provide reports back to you. They should use the iTunes referral to make the sale (they will get a small cut from Apple) -- Apple will report that back to them, and then they can prove to you that they made a sale, and then you pay based on that.
Reserve the right to audit them -- meaning that they will have to show you the report directly from the iTunes affiliate site.
I assume that iTunes actually tells them what they sold, but you would need to check that.
Another idea (which may or may not make sense based on what your app does) is to make personalized versions of your app for each reseller. If there's some way to incorporate a very simple feature that is personalized (and makes sense), then you can upload the same app multiple times and assume all sales are coming from that reseller.
So, for example, if the app were an exercise tracker, and the resellers were gyms -- you could customize the app for each gym and add their schedule and contact info to it. Then, sell the app as an Excerise Tracker for XYZ Gym and let them promote it and get a cut of sales.

Add In-app Purchase Item after app available on App store without updating app

I uploaded one of my app before couple of weeks and it is available on the App store now. It has 2 In- app purchase. In app purchase logic is totally from remote server as we wanted to add new pack without updating binary file so we did everything on server side.
So, here is my actual question. Now I want to add new pack. so here is my confusion/question.
I made on inventory.xml file for all the In app purchase id for validating in app id. and I am displaying only those Items which are valid from App store.
Also, when user purchase any pack I am downloading contents from the server and they will have new pack after successful purchase.
So, how do I make it available to Apple for submission purposes without also making it available to the general public? That is, if I add the new pack to the inventory.xml file which lists all the packs, everyone will be able to see it before Apple even approves it. But if I don't add the new pack to inventory.xml, then Apple will have nothing to look at in order to approve it.
Thanks in Advance.
When you submit new in-app purchases to Apple, you upload screenshots and descriptions of the new content to iTunes Connect. That should be all they need for review, and you can wait to update your inventory.xml file until they have approved the new content.
I found answer for this question from other sources. So I am posting it here what I have found and I believe that is the correct answer. This is my opinion it may be wrong..
So, in my situation I can add new item in my inventory.xml file as well as in iTunes account and put it new item for the review.
The reason why General public (users) will not see my new pack because I have only show valid products which I got from SKProductResponse. So in the review process it will not be valid product and it would not show in the list of available items to the users.
Now, We and Apple tester can see it because we both are using In-app test user account to test new items and I believe In-app test user account returns all the product as valid.
So, from this flow I decided to move forward with this and hopefully it should work.

In-app Purchase Loop Hole

OK so have a problem with the whole in-app purchase review process and hope someone can shed some light/experience on it.
We have a project which is a magazine for the ipad. Each issue requires an in-app purchase before it is downloaded. The issues are served from an XML feed when a new one is published.
The problem is, how can we have Apple review an in-app purchase without displaying the new issue. They wont be able to see it in the live binary. If we publish the issue we have to say "unavailable", which looks extremely unprofessional to the customer, until the in-app purchase is reviewed.
We dont want to have to publish a new binary each time a new issue is published as thats a pointless exercise for the customer
Thanks, any suggestions apart from change message to "coming soon" would be apprciated. The only other thought we had is a flag in the app settings which displays "unavailable issues"
If you login to your iOS developer account, you'll find this Getting Started with in App Purchase pdf file, which has information that you'll need in your setting up with your iAP item.
Specifically, I think what you need is an item belongs to the category named Subscriptions. This should solve your problem.
You can use consumable purchases, i.e. right to download 1 article. 5 purchases - 5 articles.
Or, give a user subscription for month or so.
You could always just keep some kind of "sample" issue available for the purposes of the user demoing the software.
That, or a few select pages from the active issue could be specified as "demo pages", as in they would be viewable from a demo version of the software.

Can you automate the new product registration in iTunes Connect (In App Purchase)?

I am considering using In App Purchase for our iPhone app. But since we will offer a larger quantity of content items (>10 video items each day added), I would like to automate the new product registration in iTunes Connect.
Is this possible ?
If not: how long does it typically take before Apple approves a new registred product in iTunes Connect ? Since the content looses quickly it's 'freshness' (news broadcasts...), it is crucial to be able to have new content available ASAP.
Would you recommend using In App Purchase for this scenario or would you recommend developing our own payment & account system ?
As far as I know, it is not possible to automate it, unless you develop your own script (in AppleScript, for example, to operate safari and I am not sure if it will work as expected.
A new app will be reviewed and approved typically in 7 days. In-app purchases will go live when the app is approved.
In-app purchases can operate in two ways:
you include the content inside the app
you put the content on your severs and include the mechanisms to make the magic work. When the user buy the app, Apple server will communicate with yours and vice-versa, and a signal must be sent to Apple servers, during the process, so they will know the content was delivered. You will have to read the docs, as this is too complex to explain here.
I automated the input of a large number of in-app purchases using the Firefox extension iMacros. The free version is absolutely sufficient for this.
You have to create a CSV file containing all the data, then record the workflow in iTunes Connect and press start!