Search code examples
provisioningudid

How to create .ipa expiration for particular UDID


I want to make a .ipa and that .ipa should be work only for 15 day, after 15 day that .ipa should expire. How can I do this . using date I can do this but user can change the date and that .ipa will work but I don't want that.


Solution

  • You can implement this in your app using date from server side that will gave you proper data. It will need internet connection but I believe that is not a big problem.

    I mean you can do it the next way:

    • When you compile, build and sign an app you insert necessary expiration date to your app as constant
    • When application started it should get correct date from the server and check if current date bigger than expiration date. And you will be able to decide should app still work or not.

    Still there is a problem with using your app without internet connection. In this case you will not be able to get correct current date. To build a protection from this "hack" you can implement logic that will count days left before expiration even without internet connection using local date to count days that passed from last run.

    And related article about servers that you can use to obtain correct current time: Free Rest API to get current time as string (timezone irrelevant)

    Hope it helps you.