I have a xcode swift project which I will be sending to someone.

is there a way to make it locked with a licence key or time expiration so that they won't misuse my code?


No - there is no provision for locking or expiration of files and Xcode is even designed to archive parts of builds so don't give your code to anyone you don't trust or can't realistically enforce violation of an agreement to not use/disclose your work. Also, macOS has time machine so there's that way to go back and look at files as they existed in the past.

The typical way to control this is to upload the program / results of a build to TestFlight for testing or valuation. Those apps generally expire after 60 days. That's much harder to reverse engineer than the source code.

  • ok if thats the case, can I Obfuscate my code?.. its in swift 3. – rolling Ztoned Apr 4 '17 at 12:00
  • @rollingZtoned sure. Keep in mind, if the person you hand it to can fully understand and use your existing swift code, won't they be able to de-obfuscate is as well? Seems you lose either way trying to make your code harder to understand, but maybe you have a good obfuscation plan. – bmike Apr 4 '17 at 12:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .