Search Unity

Scripts can be decompiled

Discussion in 'iOS and tvOS' started by festival, Jun 9, 2011.

  1. festival

    festival

    Joined:
    Feb 3, 2011
    Posts:
    80
    Just found out that even on iOS the scripts can be decompiled. Which I don't like that much :razz:
    I thought this is safe on iOS since it's ARM bytecode and not the regular .NET bytecode?!

    I'm on iPhone Basic just for the record .
     
  2. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    any solutions to it? I'd like to make it useless if they do decompile it.
     
  3. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,835
    You could some type of obsuscation every time . Meaning it would turn every variable and function into some nonsensical variable names/function names.
     
  4. 2dfxman

    2dfxman

    Joined:
    Oct 1, 2010
    Posts:
    178
    Recommend any?
     
  5. festival

    festival

    Joined:
    Feb 3, 2011
    Posts:
    80
    Can someone clarify this?

    Why the heck the iOS compiled project (on iPhone basic) can be decompiled. Not only the functions names even the implementation's. I really thought it's not regular .NET bytecode on iPhone. But it looks like it is?

    Maybe the iPhone Pro Version does more during the stripping build phase ( which I know is for stripping unused stuff )
     
    Last edited: Jun 9, 2011
  6. festival

    festival

    Joined:
    Feb 3, 2011
    Posts:
    80
    Reading thru the doc reveals the iPhone Pro strips the .NET bytecode and the iPhone Basic not.

    Edit: The above is not true regarding Unity Support. Both Versions should NOT have any .NET bytecode in the .app build. Might be a bug for iPhone Basic?
     
    Last edited: Jun 22, 2011
  7. festival

    festival

    Joined:
    Feb 3, 2011
    Posts:
    80
    After a hint from support - just ran mono-cil-strip across your script .dll after Xcode build and the .NET bytecode is gone - at least from implementations which is like i wanted to have even on iPhone Basic

    mono-cil-strip can be executed from MonoDevelop as external tool
     
  8. robotive

    robotive

    Joined:
    Apr 17, 2009
    Posts:
    59
    hi festival,

    can you share some more info on this?

    Thanks.
     
  9. gambit

    gambit

    Joined:
    Dec 26, 2010
    Posts:
    57
    I wouldent wast your time worrying about people decompiling your code, there is no solution to stop it. If there was one and I was the person who came up with the solution,I would be really rich. The only thing you can do is make it harder for them and that's it.
     
  10. festival

    festival

    Joined:
    Feb 3, 2011
    Posts:
    80
    So you mean getting rid of .NET bytecode in an iOS build and having smaller binarys and not exposing source code is a waste of time ?
     
  11. festival

    festival

    Joined:
    Feb 3, 2011
    Posts:
    80
    My problem was that the iPhone Basic does not get rid of the .NET bytecode. You can strip bytecode manually across the .dll in an iOS build with mono-cil-strip. Which is part of Unity3d. Execute it from MonoDevelop as an external tool then the iPhone basic is safe regarding .NET bytecode. Why should a iPhone Basic license should exposure .NET bytecode and thru this the Source code of your app? The Unity Supporter gave me the hint . Thx
     
    Last edited: Jul 11, 2011
  12. robotive

    robotive

    Joined:
    Apr 17, 2009
    Posts:
    59
    thanks a lot.