iOS Question Question about In-App-Purchases

Discussion in 'iOS Questions' started by Filippo, Jan 31, 2019.

  1. Filippo

    Filippo Expert Licensed User

    Hi,

    Apple has these 4 options. The 4.Option looks like the Google option "ConsumeProduct".
    If it is, is there an option like "manager.ConsumeProduct"?
    Where can you set the duration of the subscription?

    inapp.JPG
    The translation:
     
  2. tufanv

    tufanv Expert Licensed User

    Everything is manual for non renewing subscriptions. You need to implement your own backend for storing the subscriptions, check if they are still active etc..

     
    Filippo likes this.
  3. Filippo

    Filippo Expert Licensed User

    Thanks @tufanv ,
    I thought apple had a new option inserted comparable to the google option.
     
  4. Filippo

    Filippo Expert Licensed User

    Saving the subscriptions is no problem, problem is how can the subscriptions be restored.
    The sub "MyStore_InformationAvailable" shows no info about date of purchase and "TransactionIdentifier".
    So I can not check what and when was bought.

    Code:
    Private Sub MyStore_InformationAvailable (Success As Boolean, Products As List)
        
    Log("InformationAvailable Success = " & Success)
        
    If Success Then
            
    For Each Product As ProductInformation In Products
                
    Log(Product.Title)
                
    Log(Product.ProductIdentifier & ": " & Product.LocalizedPrice)
                
    Log(Product.Description & ": " & Product.Tag)       
            
    Next
        
    End If
    End Sub
     
  5. Filippo

    Filippo Expert Licensed User

    I found this info under In-App Purchase Programming Guide.
    The problem is, how can you restore the product if you do not know the buyer user-id?
     
  6. tufanv

    tufanv Expert Licensed User

    You need to implement a user registration system. Or I will save you time, once I implemented a system like this: no user registration, give a pin number to user after purchase and save the pin number with subscription start end dates, give an option to restore with pin number, increment a restoreused int in the database for each successful restore and if it is restored for more than 3 times do not accept restore.( to avoid sharing of pin)
     
    Filippo likes this.
  7. Filippo

    Filippo Expert Licensed User

    Hi @tufanv ,

    How should I imagine that?
    In the sub "SyStore_PurchaseCompleted" I show a dialog with a random pin, which the user should note / remember.
    Thereafter, the random pin is saved with date of purchase and product name in the database.
    If the user needs to restore the app, then it must enter the pin.
    Did I understand it correctly?

    Have you already implemented something like that?
     
  8. tufanv

    tufanv Expert Licensed User

    Yes totally correct. They have accepted my restore mechanism for my app coinwatch. There is nothing wrong with this system. User has to save his pin and use it on another device if needed.


     
  9. tufanv

    tufanv Expert Licensed User

    By the way, leave the pin visible on some user control panel screen for example, because probably they wont save their pin and will have problem. So they should be able to look up their pin while their account is active.
     
    Filippo likes this.
  10. Filippo

    Filippo Expert Licensed User

    Yes, that makes sense. :)
     
  11. Filippo

    Filippo Expert Licensed User

    Hi @tufanv ,

    I have now implemented my own user registration system.
    It cost a lot of work, but I think it has paid off.

    upload_2019-2-6_20-21-1.png
     
    tufanv likes this.
  12. tufanv

    tufanv Expert Licensed User

    Looks perfect! well done !
     
    Filippo likes this.
  13. Filippo

    Filippo Expert Licensed User

    I want to do something that Apple does not like very much. :D
    When license time has expired, the user can usually buy a new license in Apple Store.
    But I want to give the user a possibility to buy the license directly from me. He should only send me his old license key via e-mail and I say in how the payment should be made.
    If the payment has been successful, then I simply change the license time into my database (internet) and the app can continue to be used.
    What do you think Apple would have something against it?
     
  14. tufanv

    tufanv Expert Licensed User

    They will certainly close your account.

     
    Filippo likes this.
  15. Filippo

    Filippo Expert Licensed User

    o_O
     
  16. Filippo

    Filippo Expert Licensed User

    I found you explanation.

     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice