Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

yaniv92648

macrumors member
Original poster
Oct 26, 2009
96
0
Hi,
i searched the web but didn't find it. it's simply a tool for scrambling/encrypting the code so that it is compilable but not readable/understandable (classes, methods, etc.. cannot be copied to other uses).
Thanks!
 

yaniv92648

macrumors member
Original poster
Oct 26, 2009
96
0
because..

i'm selling my app to someone and i don't want him to use my code for other purposes.
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
i'm selling my app to someone and i don't want him to use my code for other purposes.

If you are selling the source code then I would expect that he has the rights to do whatever he wants with it. I would expect to pay significantly less (well under 50%) for scrambled source. What if there is a bug in the code, or the code needs to be updated for a new Apple API and it's scrambled. That's a whole lot more work.

Have you agreed with the buyer that the code will be scrambled so almost unmaintainable?
 

yaniv92648

macrumors member
Original poster
Oct 26, 2009
96
0
the agreement

The agreement we had is on that i sell my app to him and he uploads it to the appstore. the agreement didn't include that he can use the code for other purposes, only for the purpose of uploading the app to the appstore.
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
Well then why don't you send him a compiled but unsigned binary. He should then be able to sign the binary for upload (I think, I've never had to do this).

The issue I see with scrambling the code is that you can only scramble your own method names: you cannot scramble any delegate method names as the name is actually used at runtime. The same applies to the names of table datasources.

Even with scrambled method names it would not be all that tricky to use the debugger to find out what each method does.

So, basically, there is a limited amount you can gain from scrambling anyway...
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
Yes, but it must be unsigned. The will then sign with their distribution key. Of course if they just gave you the key you could sign it yourself and send them the signed binary.
 

skunkworker

macrumors regular
Sep 9, 2007
182
20
Why don't you just get him to sign a legal document saying that he won't use the source code for any other purposes and if he does legally sue him for it?
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
Why don't you just get him to sign a legal document saying that he won't use the source code for any other purposes and if he does legally sue him for it?

I was hoping he already had a legally binding contract covering the sale and this was just added protection...
 

firewood

macrumors G3
Jul 29, 2003
8,109
1,346
Silicon Valley
To scramble your C code, just compile it, with optimization turned on and debug symbol generation turned off, into a static library.

Then send the static library to your customer with instruction on how to compile the library code into an app.

To scramble your Objective C code, you might need a script that will go into the source code and replace all the object and method names, as these appear in plain text in your app bundle. (e.g. you probably want to change "[registrationCheckObject isRegistered] == YES" into "[x328974274 y934204] == 2938.7434985", etc.)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.