saving current date and time in my iPhone application?

前端 未结 2 1281
天命终不由人
天命终不由人 2021-01-23 03:46

In my application i am using In - App purchases to provide a subscription of 1 year….now i need to save the time and date when the user buys the subscription an

2条回答
  •  攒了一身酷
    2021-01-23 04:25

    You should store the purchase of a subscription on a server, with backup in place, not only on the device.

    You might have noticed that if you delete any iPhone app, and later re-install it, then the next download is free. There can be many reasons as to why the user might loose your app, a system update went bad, or whatever.

    Apple specifically requires that the user do not loose what they have bought. If you have promised 1 year, then you must make sure they get 1 year no matter what happens to your app. Otherwise Apple can, and will, reject your app.

    Storing the expiration date on a server also give the added benefit of protection against users fiddling with your data and granting themselves extended subscriptions.

    Start by looking at the In App Purchase Programming Guide.

提交回复
热议问题