Can there be multiple entry points for showing 1 In-App Purchase for iTunes?

122 views Asked by At

I am implementing the In-App Purchase (IAP) functionality for the first time. I am using Soomla to implement IAPs in Unity3D for iOS/Android, and I have started for the iOS version...

I am developing a game where the 1st level is unlocked while to access the other levels users have to pay, hence if any user clicks on the other level buttons then the IAP will come up. This is our 1st 'entry-point'.

For our 2nd entry point, if the user plays the 1st level and crosses it, at that point an IAP should come up. It is the same IAP (pay to play the other levels).

However after testing the app on iOS devices, the IAP at our 2nd 'entry-point' does not turn up. No errors or crashes turn up. Have checked using different Sandbox Testers as well, logging in/out from iTunes in Settings, etc.

Now I'm wondering whether this is allowed at all? Have read Soomla & iOS IAP documentation but I couldn't find anything. Even searching on Google doesn't show anything. So I'm looking if anyone here can help me out?

Thanks

2

There are 2 answers

0
Beto On

I will hope understand your situation.

In some point you must have an array for each IAP that have your app, then you must mark internal variable as TRUE and control after purchase

Inside my IAP code I have this (this code was taken from Ray Wenderlich tutorial a long time ago):

+ (IAPHelper *)sharedInstance {
    static dispatch_once_t once;
    static TTL_IAPHelper * sharedInstance;
    dispatch_once(&once, ^{
    NSSet * productIdentifiers = [NSSet setWithObjects:
                                  @"com.myCompany.myApp.IAPLevel01",
                                  @"com.myCompany.myApp.IAPLevel02",
                                  nil];
        sharedInstance = [[self alloc] initWithProductIdentifiers:productIdentifiers];
});
    return sharedInstance;
} 

This is the link of Wenderlich tutorial "is oldie but goodie".

I hope this help you.

1
Andrei Bazanov On

So you are OK when the player presses the button to unlock the the next level? Your problem is just simulating the functionality of that button press at the point where they have completed the first level? If I understand the question correctly, then I would probably use two methods:

1 - At the point where the level is complete you can write the SoomlaStore.Buy("item_id");

2 - Use the NotificationCenter to fire a notification when the level is complete and catch that notification in another class and there have the SoomlaStore.Buy("item_id"); line of code.