How to done payment option through inapp - iphone

I have done a bible application in iphone,there is a last section called database download,there are 10 buttons each buttons have diffrent language database to download,the database is bible database,if the user tap the hebrew button it will have to download the hebrew database from the server through Inapp.I know there is no other direct payment option available in ios,but we can use the store kit framework for acesses the inapp purchase.But i didnt know how to do this.If anyone have an idea for doing a inapp payment purchase and download within the app,please share with me,it will be a great help for me to do this.
Thanks regards.

You don't handle the download through StoreKit (the framework for performing in-app purchases). You do that yourself, however you'd like.
One you download it, it'll need to be stored in the app's Documents folder.
Use this for performing the financial transaction:
https://github.com/MugunthKumar/MKStoreKit

Related

Can an IOS in-app Non-consumable purchase be modified after it is available?

If I offer an in-app Non-consumable purchase (say a book, or a song) within my app and then 2-3 months after it has been released I realize that there is something wrong with my digital content, Can I do an update of the digital content? So if I had a digital article as an in-app purchases for $1.99 and sold 1,000 copies, then I realized that I have a spelling error on page 3. Would I be able to upload an updated article that would go out to all the people who bought the article and prevent people from downloading the old copy? If not, how is this situation handled in the real world? I have looked in apples doc, but cannot find an answer.
Edit: Assume I am using the new io6 feature of hosting the content through apple.
Yes, as a matter of fact, provided that you do a few steps, you can keep track and systematically, efficiently keep track of what is downloaded.
1.Yes it's possible. Provided you keep a track of who has bought what pack (ie. keep a bool value as an NSUserDefault), then they will still have access to it (even if you add more stuff/levels to it).
2.It depends what you mean by notified; they will know if they read the update comments when they install the update. Also you could just choose to alert them when the load the app after the update - your call.
3.If you're submitting the code Apple will review it. Just think of it like any other update to an app.
This is taken directly from here: Update in-app purchase content for iOS app?
After you have updated your content for the app store, you can allow your users to Restore Purchases and obtain the updated content!
Overall, have a mechanism to keep track of the version of the in-App purchases' version and then update when needed!
There is always, apple's own documentation:
Here you go! :)
I hope this is clear and helpful!
EDIT:
After checking the user's content version number and finding that it's outdated, you would call the method (by the way, you would probably implement this checking mechanism in your app delegate.
[[SKPaymentQueue defaultQueue] restoreCompletedTransactions];
This would restore the transactions, but make sure you also need to include the rest of the implementation code!
I assume you know the code to restore in app purchases, but if not, here are a couple good links!
Restore already bought in-app-purchases on iPhone?
http://www.iosdeveloperguide.com/in-app-purchase-heads-up-to-avoid-app-rejection/
http://appotography.com/2011/07/06/restoring-purchases-on-iphone-and-ipad/
About AppStore Hosted Content
I have not tried, but browsing inside Apple doc, I've found this which confirms that you can upload multiple versions of a digital content hosted by Apple.
"You can have multiple versions of hosted content, but each one needs to be approved by Apple before it can be purchased by users."
Also, you can check this and this tutorials, that shows that you have to specify the Content Version and IAP ProductIdentifier in the ContentInfo.plist when you create an App Store Hosted Content with Xcode.
How to notify the users that content has changed
This depends of how you implement your purchase system, the content delivery, and how you keep track of the "state of your purchased products". Usually we keep track of the version of the purchased products, thats means, we save the product_id with the content version when the purchased content is downloaded. We can save this data in files or inside a DB locally. Also, you don't have to worry about non downloaded (and non purchased) products, those do not need an update. When you update your in-app store with the last information of your available products (via update button, or app launch, or whatever you implemented) you should compare the last content versions with those you have downloaded, then you can notify the user that an update of his purchased product is available. Finally, you have to enable the download for that product.
This all depends on how you make the content available to the user. When the user makes their original purchase of the in-app content, where does the content come from?
If it is part of the app bundle, then the only way to get updated content to these users is to submit an update to your app that includes the updated content. When the user installs the updated app, they will see the updated content.
If, upon purchase, the app downloads the content from your server then you can build in a mechanism in your app that checks your server for updated versions of the content. If it detects there is an update, and the user has the IAP, then the app can download the updated content.
Edit: This doesn't cover the new iOS 6 feature of Apple hosted downloadable content.
For the above problem:
please have a look at the following urls for separate things:
Following link is the link to the SKDownload API:
http://developer.apple.com/library/ios/#documentation/StoreKit/Reference/SKDownload_Ref/Introduction/Introduction.html#//apple_ref/doc/uid/TP40011851
Following link is the link to a great post which explains the working of SKDownload API:
How to download In-App hosted content?
Now in your position we can follow the following steps:
Push another package on the Apple Account which is to be hosted (with corrections).
Push an update the app on the App store with the following changes: (This handles any new download from the new users.)
a. Update your code of the InAppPurchase with the new identifier of the file
Now we have to handle the old users, we can consider the following two approaches:
a. We can show the user a restore button, by tapping which the user would be downloading the article again.
b. In iOS for things to go automatically to all existing users we do have a mechanism of push notifications, on the receiving of this the user would be triggering the event to again download the data from the Apple Hosting.

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.

iOS in-app purchase metadata

I am about to create my first iOS app with in-app purchase. I read documentation and everything, but I can't find anywhere how to append some metadata to in-app purchase object. I would like to add some additional information to each item, like category, sub-title e.t.c.
iBooks uses this for category, author and other stuff, so it should be possible. I presume they are using in-app purchase in iBooks, is that correct?
Only solution I came up with so far is to have all metadata on my server and retrieve them when items from store load. Is there any other way?
I need to add new items (and possibly new metadata) after app is online, so I can't put them inside app
Nope. That's what you're supposed to do. Metadata and the like is entirely up to you, and Apple provides no inbuilt mechanism in StoreKit or iTunes Connect for supplying it.

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.

InApp Purchase rejected in App Store

I just got rejected on my Free app from app store. I uploaded 3 apps, HD(iPad), PayedIphone and freeiphone. In the free-version I had a link to the fullversion.
Apparently I need inAppPurchase in the free-version rather than linking to the fullversion.
How should I implement this in the easiest way? All I want is a button that says Buy full version and then the free-version becomes the full version. Is it possible to use just those two or do i need to create another full version for this purpose.
I have no idea how to make the inAppPurchase except the tutorials Google give me, any recommendations or example code I can use?
I found this site very helpful in setting up an in-App purchase:
http://troybrant.net/blog/2010/01/in-app-purchases-a-full-walkthrough/
I got it working after watching this tutorial on u-tube. I can really recommend it.
http://www.youtube.com/watch?v=xGDGO5P95Dg
All you need is this: http://blog.mugunthkumar.com/coding/iphone-tutorial-%E2%80%93-in-app-purchases/
By far the easiest In-App storekit to implement... He walks you through the whole thing and then there is a link at the bottom with the source code zip file. Make sure you read it and get a good understanding. Rule of thumb: Never implement any one else's source code without understanding it first. You will save yourself a lot of headaches with debugging later.
Remember though: Now you have to build in a network check to see if a network exists prior to them clicking the "upgrade" button or else your app will get rejected once again. Luckily, I have just the thing for you: How to check for an active Internet connection on iOS or OSX?
Also, I agree that NSUserDefaults are the best way to go, and luckily that source code link above does all of that for you! It seriously doesn't get any easier. Props to this guy
No way. The proper way to do that is to include all the functionality of the fill version in the free version and only unlock those functionalities whenever the user buy your inApp purchase item.
start by attentively (details really matters when inApp purchase is concerned) reading the inApp purchase developer guide at developer.apple.com
There is a sample project here..
http://www.theapptree.com/samples