Question regarding the iPhone In App Purchase capabilities - iphone

I am working on releasing an app that will greatly benefit from using the in app purchase model. The app is a sort of book viewer, and the content I would like to make available for purchase will be more books in various languages. Each book is stored in sqlite format, in separate .db files. Now, the way that my developer has set it all up is that he added a line onto the bottom of the info.plist file called databases. Inside that database section, I can type in 'es' as the key, and for the value the name of the spanish database, and it populates in a uitableview in spanish, using NSLocale. So it is very easy to setup and implement different databases, which is great, but now I am confused about how I can implement my in app purchase model. Sorry about the long winded intro, here is my question: Is it possible to have an in app purchase add a line to my info.plist file? Or if not, is it possible to have the purchase reveal a new and updated plist file altogether that I would have already setup correctly? Any help here would be appreciated. Thanks

You can not edit you're info.plist file dynamically. When you submit your app to The App Store, your app bundle, which includes info.plist, can't change because the signature created when you compile you app is based on the bundle.
You can have an in-app purchase do whatever you want. You could have the data already stored in the app and just unlock it with an in-app purchase, or you can have the app download the new data in plist format or any other format you want. Services like ilime and Urban Airship make this really easy for you.

Related

How to update iOS app with exception of a file

I'm making my first iOS app. And I have a question.In my app I want to save the current state of the app: levels completed, score reached, money, in-App purchases, etc. in a Settings.plist. The problem is, how can I place this plist so that if the user updates the app, he/she not to lose these settings. I read about The app sandbox, but I don't understand
how it works, and how can I manage that from Xcode.
You should store these settings in the NSUserDefaults. They are kept when new app versions are installed, so you won't have any problems.
Two points:
a) When you update your app after its in the app store by submitting a new version of the same app the files created by the old version will not be lost. So you can store whatever you like in the app's Document or Library directories and expect it to still be there after an update. The Library/Caches directory will not be backed up or restored by iTunes so don't put anything there that you can't re-create. If you submit a different version of the app (not an update but a new app, so you have two separate apps in the app store, perhaps free and paid) there is no way that I know of for the new version to get to the files that the first version created.
b) It's easy for the user to read, delete, or change whatever files you create in Documents/ or Library/. It can be done with an app on his/her Mac such as iExplorer (downloadable from macroplant.com). So be aware that if the file is human-readable, which a .plist file is, the user can change it to improve his/her score, get more consumables, or whatever. You can prevent that by encrypting the data, or somehow obscuring the meaning, or by some kind of checksum scheme so you can at least detect that it was changed. Any of those measures involve complications of course and may not be worth the trouble.
BTW... if you're developing an app that uses data files iExplorer is a great debugging tool. I have no vested interest in it except that I've learned how to use it and want it to continue to be supported. There are probably other apps that do the same thing but this one works great and is fast and easy to use.

iPhone : Manage localization from server not from bundle

Adding strings localization files in iPhone bundle is very simple and perfectly fine but there is only one drawbacks every time we need to upload new build on AppStore when we add new language in app.
Is there any other way like we can manage Localization from server, when we start app we download all label string and Localiza image from server and stored in document directory and run accordingly. Download data according to language...
So can we do like this and the main things Apple can reject that kinds of scenario ?
Yes. Actually we used that way and there were no issues with Apple.
I confirm no problem with Apple too, just note that you won't be able to override the localizable.strings file. You have to create your own way to store and read the strings. It means if your app is already in development, there will be some effort for an application-wise refactoring.

Advice: Challenges while implementing iPhone In-App Purchase

I want to create an ebook store app which has in app purchase.
All the ebooks will contain images, sounds, text and XML file and will be stored on a web server.
XML file will contain mapping on what sound to play and what text to display on particular page.
1) Being a newbie for in-App Purchase, I would like to know whether I should download all images, sounds, text and XML together or one after another. Or what would be a better mechanism to download all these items?
2) I have read that Apple requires that if a user purchases an item through in-App purchase, all his devices should be able to access that purchased item. How do we ensure that?
Also, if you have experience related to similar project, can you please share the challenges that I might face and possible solution to it.
I really appreciate your advice.
Thank You.
I would compress all the files into one archive and then decompress them on the device. This will speed up the download and will also make your code a little simpler as you'd only need to download one file per ebook.
The StoreKit framework has methods for determining if a user has already purchased an item. If an ebook has already been purchased, then just have the app download it to the device. This is all documented in the StoreKit documentation.

Iphone: Application feasibility

I am very new to developing apps on the Iphone (In-fact I am new to application development all together). I would like to know what the feasibility for an idea for a app on the iphone is.
1)The application would allow users to download content (audio or if possible video files) onto the device.
2)Each of these files will need to be purchased before downloading, at a fixed price.
3)The user can then play the downloaded files on the device.
Is such an app possible to be made on the Iphone?
If so can anyone give me pointers on how the payment procedure should be, and how revenue will be shared with apple?
From what you described, that sounds very possible.The users would pay you directly through a credit card for the files.
If you are already a registered apple-Developer, have a look at the InAppPurchase(IAP) ProgrammingGuide in the iOS-Devcenter.
The purchase of any content must be handled through IAP.
This is written in the App Store Review Guidelines, Item 11.2 (Because I'm new, I can't provide a link. Sorry for that)
It is not possible that users pay you directly.

Creating a magazine issue model to sell via in-app purchase

We have developed a magazine style app for a client. Even though we're pretty happy about it we want to migrate to a in-app purchase version ASAP. The idea is to have an app much like Wired or Popular Science where you can purchase issues on a monthly basis.
We have read the in-app purchase programming guide, but the problem we're having is not related to the in-app purchase process at all. The real problem is the issues themselves, since they are made of View Controllers, assets, and so on.
I guess the question is how do we package a magazine issue and make it available to an app? Does anybody have an idea how to do this?
You could create your content with Interface Builder put the compiled nib files with their linked assets into a bundle and ship that. May you need to add a plist to the bundle that contains information about the content.
You will not be able to ship executable code (ViewControllers) via in-app purchase. There's no way (and your contract with Apple forbids) to get executable or interpreted program code into your app after the user downloaded it.
So you will need to define possible functionality upfront and include all code into your app. Only assets and nibs can be loaded afterwards.
In fact I am not quite sure about the nibs. From all I know and understand they are just a document format without any code, but I maybe wrong.
As a web page, displayed in a UIWebView?