Transfer In-App Purchase Content
I have hosted content with apple (.pkg file and within are short videos
available as IAP to the user) so far using RW tutorial the code goes as
far as allowing the user to purchase the content and all it does is mark
it with a TICK.
Within the tutorial
(http://www.raywenderlich.com/21081/introduction-to-in-app-purchases-in-ios-6-tutorial)
ray provides the code beneath however it doesnt seem to do anything as
when testing the IAP (non consumable) within my app using a test user....
all it does is let me login with my test user credentials and mark that
purchase with a tick. Now how does the user know what has happened? where
is the content? how can it be accessed by the user within the app?
- (void)provideContentForProductIdentifier:(NSString *)productIdentifier {
[_purchasedProductIdentifiers addObject:productIdentifier];
[[NSUserDefaults standardUserDefaults] setBool:YES
forKey:productIdentifier];
[[NSUserDefaults standardUserDefaults] synchronize];
[[NSNotificationCenter defaultCenter]
postNotificationName:IAPHelperProductPurchasedNotification
object:productIdentifier userInfo:nil];
}
It seems like this code above is unfinished as Ray mentions in the
tutorial that the tutorial is too long and because of that he didnt wanna
add the process of how to download and access the content purchased by the
user.
What can i add to the code so that it shows the downloading progress, and
after the download has finished it transfers the downloads/content
purchased by the user back into the app or specific view controller so
that its accessible to the user?
Please all suggestions are welcome, i have been stuck on this for over two
weeks and have looked everywhere but everyone uses different methods which
when i try them just lead me to having errors upon errors.... if someone
is also willing to help me through chat that would be awesome. Thanks in
advance to the kind soul who does.
No comments:
Post a Comment