Good ways to distribute iOS framework?

Hi everybody,

I’ve got some code I want to package up into a framework and sell (its an object recognition app for iOS). Never done this before. Can anybody please pass on some advice as far as how to protect the source code while distributing it, while keeping things relatively simple?

So far I’ve managed to get Xcode to convert my code into a dynamic framework (with the toolbox symbol). I am curious how in people in general keep tabs on their code once its out in the world and prevent people from stealing/reselling it.

Hi @rhomas_dathomas and welcome to the forums!

This can be a tricky question :stuck_out_tongue: it really depends on how much effort you want to put into securing your code this but at the end of the day there will always be a way to work around it depending on how smart and determined they are.

Because your framework needs to be distributed to developers before its uploaded to the App Store, you lose out on the FairPlay encryption that is applied preventing people from reverse engineering the code of an app.

This means that if somebody gains a copy of your compiled library then they can technically try to patch it in a way that bypasses any measures that you put in place.

I’d personally suggest that you focus on ensuring your distribution channels are secure and that you have the correct legal and licensing contracts in place between your clients to reduce the potential exposure of your framework.

I’d recommend that you read the answers to this Stack Overflow question because they pretty much cover everything that i’d suggest :blush:

Good luck with your product! I hope this helps :blush: