How To generate License key for Mobile SDK iOS

Viewed 673

We have developed on iOS SDK. Now We want to distribute to our Vendors. For restricting the misuse of the SDK we want to have a License key for SDK. My Question is that How can we generate unique Licence key from APP iOS bundle ID and developer certificates and again in run time check the validity from the app that my Licence key , bundle ID and app certificates are correct.. Can you Please guide me on this?

1 Answers

One approach is

  1. Generate a public/private key pair
  2. Create a string with the client name, the bundle ID and a UUID that you create
  3. Hash this string
  4. Sign the string using your private key

Then, in your SDK framework:

  1. The client adds a file with their client name, the UUID you generated and the signed hash (a hex string)
  2. Your framework reads the file and obtains the application bundle id from the main bundle
  3. You can then generate (what should be) the same string and the same hash from that string.
  4. This hash and the signed hash can then be verified using your public key (which you also include in your framework)
Related