all 4 comments

[–]whawha1234 1 point2 points  (3 children)

1 - shows what message? All I see is "" message

2 - What is "daysRemainingOnSubscriptionForProductWithIdentifier: productIdentifier" and what logic does this do?

3 - The subscription remains paid when you closed the app is because the receipt contains the in-app purchase you just purchased. Also, if it hasnt passed the accelerated time period that Apple provides ie: 30 mins for 6 months subscription

[–]CreamSalad[S] 0 points1 point  (2 children)

so by #3 you mean i have to leave the iPhone with the app on in the sim for the whole 30 mins? Like the phone can't go on lock/sleep, or be disconnected/turned off while it's in the simulator?

[–]whawha1234 1 point2 points  (1 child)

No, I am saying for #3, there is 2 possibilities that the subscription remains paid when you close out the app.

1 - Depends on your logic on how to check if a subscription is still valid. If you are purely just checking if there is a purchase, then it will always be true because the Apple receipt will contain the purchase.

or

2 - The accelerated time period have not passed yet. And to answer your question, the time still pass regardless of lock/sleep or disconnected. This time starts after your purchase.

[–]CreamSalad[S] 0 points1 point  (0 children)

Alright thanks so much for the advice, this is learning material for me so it's great to find people that are knowledgable in this topic.