iOS Question Users unable to restore purchase

JonPM

Well-Known Member
Licensed User
Longtime User
I have received a few emails from users unable to restore their previous in-app purchase. Version 1.0 of this app was developed with a different framework, and version 2.0 was recently released built on B4i. There is only 1 IAP (pro upgrade). I'm not sure if the issue is arising from my code, due to using new certificates, or another issue. Any help would be appreciated.

B4X:
Sub msgPurchase_Click(sel As String)
    Select sel
        Case "Upgrade"
            If MyStore.CanMakePayments = False Then
                hd.ToastMessageShow("Device unable to make purchases at this time",False)
            Else
                MyStore.RequestPayment("com.my.unlock")
            End If
        Case "Cancel"
            Log("Canceled")
        Case "Restore"
            MyStore.RestoreTransactions
        End Select
End Sub

Sub MyStore_Purchase
   
    Msgbox2("msgPurchase","Upgrade for $0.99","Locked", Array As String("Upgrade","Restore Purchase","Cancel"))
   
End Sub

Public Sub MyStore_PurchaseCompleted (Success As Boolean, Product As Purchase)
    If Success = True Then
        unlocked = "Yes"
        imgLock.Visible = False
        Map1.Put("unlocked","Yes")
        File.WriteMap(File.DirDocuments, "Map.dat", Map1)
        hd.ToastMessageShow("App unlocked!",False)
    Else
        unlocked = "No"
        hd.ToastMessageShow("Purchase/Restore failed",False)
    End If
End Sub
 

JonPM

Well-Known Member
Licensed User
Longtime User
Yes it works fine with the test account. I suspect that's because I am purchasing and restoring the 2.0 version of the app. The users complaining are the ones who bought the 1.0 version and are now unable to restore. I had regenerated all certificates and profiles for 2.0 as I lost the previous ones. One thing I noticed is I had a different name for the Distribution Provisioning Profile then the 1.0 version. So I just changed that and submitted an update. Hopefully that was the cause...
 
Upvote 0
Top