1

I have Non-Consumable Purchase and want to host it with Apple.

It like a book, that contains from images and manages with JSON. How can I upload it?

Nirav Bhatt
  • 6,940
  • 5
  • 45
  • 89

2 Answers2

6

What is not clear from Nirav's answer is that to get to the point where you have a valid package, you need to do two additional things after creating the In-App Purchase Content Project in Xcode (i.e. After Xcode -> New Project -> Other -> In-App Purchase)

Once you have added your content files, you must Firstly Archive the Project, then locate the In-App Purchase in the Organizer: Archive in Organizer

then,

EXPORT the project using the "Export as an Installer Package" option

Export Package

This exports the archive as a PKG file into a folder on your Desktop. Inside the folder is a .pkg file - this is what you need to add as the "Hosted Package Content"

Apple's documentation on this is scant and not very clear that there is multiple steps in creating the PKG file

ferdil
  • 1,259
  • 11
  • 24
3

With newest XCode (6.x) Application Loader you can manage all your in app purchases from within application loader apart from itunesconnect portal.

  • Open XCode.
  • Go to XCode Menu->Open Developer Tools->Application Loader.
  • Enter credentials for itunesconnect.
  • (See below image) Select New In-app purchase

enter image description here

  • On the next screen choose your app (it should have been created from itunesconnect portal.
  • (See below image) It will show various tabs. It will also show if any in-app purchases have been previously added.
  • Select Hosted Content tab. Then select the in-app purchase you want to upload your content.
  • Check the box 'Host Content with Apple'.
  • You can see the file chooser interface.
  • Follow the rest of the Application Loader workflow and you are done.

enter image description here

Nirav Bhatt
  • 6,940
  • 5
  • 45
  • 89
  • 1
    I have the error: The archive for In-App Purchase is invalid. The archive does not contain a valid In-App Purchase content package. – adsjfkasjdflkasjdflk dalfjsdlf Jul 03 '15 at 09:41
  • This screen usually expects an in-app purchase target built using XCode - you can create it using XCode -> New Target -> iOS -> Others -> In-app purchase. This target will include xib and other resource files. When you build, the resulting file should be uploaded to loader. – Nirav Bhatt Jul 03 '15 at 09:53
  • sku is for your internal product tracking purpose - can be anything. – Nirav Bhatt Jul 03 '15 at 09:53
  • How can I add content to that target? I have error: The archive for In-App Purchase 'se.nok.lteteen.matte5000bc' is invalid. The package contains an executable at 'Contents/Matte5000_TEST0/style.css'. – adsjfkasjdflkasjdflk dalfjsdlf Jul 03 '15 at 11:07
  • You can right click the target -> show package contents and modify it. If it's not allowed, it's not permissible. If there is a workaround, you need to raise it separately to get specific answer. – Nirav Bhatt Jul 03 '15 at 11:16