0

I want to add an In App Purchase functionality to my iOS app (for the first time) where i can enable users to download more content - a set of images.

I have already read many articles, but as long as i understand how to manage IAP, i'm not clear how do i access downloaded content? Do i just use that files as they were a standard resources like

[UIImage imageNamed:@"xyz.jpg"];

or i need to manage them other way? What's the best practice for that purposes?

cyborg86pl
  • 2,597
  • 2
  • 26
  • 43
  • Do you Want to sell Images as IAP? – Pranav Jaiswal Jan 10 '14 at 11:14
  • @Pranav i will be using those images in app functionalities (like UI themes, textures), files won't be available for sharing etc. There are so many of them i don't want to attach them to the bundle - too much weight. – cyborg86pl Jan 10 '14 at 11:26
  • 1
    Hosted content works only for Non-Consumable purchases, which cannot be free. If you are planning to sell your content through any other modal(Consumable, Subscriptions, etc...) you need to host content on your development server to avoid increasing bundle size. – Pranav Jaiswal Jan 10 '14 at 12:08

1 Answers1

1

If you are downloading the content, it will not be the part of application bundle. So you can not directly access those images via [UIImage imageNamed:@"xyz.jpg"];

You will have to save them in documents directory. You can then access it via referring to the path of documents directory.

One can not change the bundle once application is shipped. The only editable part is documents directory. So, you will need to download and access the new resources from and to documents directory.

Apurv
  • 17,116
  • 8
  • 51
  • 67