A warm greeting to the whole forum, on December 15th I made a StoreKit 2 post asking how to sell my app on the Apple store through an annual subscription.
I had found on the Apple store that I had to use StoreKit 2 and in that post I asked how to use it. Erel replied:
It will be difficult to use Store Kit 2 as it is a Swift + Swift UI SDK. I think that it is only a wrapper above the standard StoreKit.
From Alexander Stolte I had this Link where I found
a fairly complicated procedure, but perhaps not insurmountable by my little knowledge, for example I have already created the trial account,
I hope I can continue without problems
but what I can't understand is how to set the code shown on the link
the first part of the code is easily understandable
Dim MyStore As Store 'declare it in Process Globals
...
MyStore.Initialize("MyStore")
If MyStore.CanMakePayments = False Then ...
but the second and most important part
MyStore.RequestPayment("product.id")
Sub MyStore_PurchaseCompleted (Success As Boolean, Product As Purchase)
Log("Purchase completed")
If Product.IsInitialized Then
Log("Product: " & Product.ProductIdentifier & ", date=" & DateTime.Time(Product.TransactionDate) & _
", Transaction identifier=" & Product.TransactionIdentifier)
End If
Log("Success = " & Success)
End Sub
I can't understand the only part that I managed to understand "product.id" which
is equivalent to the number that I will enter for the App I remain with it I understand;
Erel, replying to another person who asked for a complete example, replied that the code was the one he posted.
I would like the app to work for a year once paid and downloaded, then it will have to be repurchased to make
it work for another year and so on in the following years. At the beginning I had entered a key that had to be
replaced every year, I would have sent the key via SMS or WhatsApp after receiving the transfer from the
customer without going through Apple but I was told that this is not possible, I have to make the purchase in the App.
How do I have to change that code to do all this? in date=" & DateTime.Time(Product.TransactionDate) What do I have
to enter?. Once I have entered the correct code, and downloaded the app, how do I test it?
Excuse my ignorance, it's the first time I've done this and excuse me for the bad English (Google translate)