Forum Xamarin.iOS

Obfuscation needed for iOS app target?

Marc_Marc_ USMember

I'm wondering if the compiled iOS assembly/target can be easily reversed engineered and therefore needs obfuscation, like with a Windows .NET assembly?

I have searched for an existing Q&A on this, but couldn't find it. If it has been answered before, then please provide me with the link.

Tagged:

Best Answer

Answers

  • Marc_Marc_ USMember

    @DaveHunt said:
    iOS applications are compiled to native code prior to uploading to the device. The assemblies that get generated and uploaded to the device don't contain any actual code, so it should not be necessary.

    One additional question, if I may: What about PCL's?

  • DaveHuntDaveHunt USMember ✭✭✭✭✭

    @Marc_

    If you're referring to a PCL that you create and distribute for other developers to use, then it is like a regular .NET assembly.

    If you're linking to a PCL in an application, then it would get compiled to native code and linked to the application before uploading to the device.

    iOS doesn't support dynamic code generation, so no JIT. Everything has to be native code when it is deployed.

  • nobbiehesters.1945nobbiehesters.1945 USMember ✭✭
    edited January 2017

    So all of the class names, method names, no longer exist in native code ? But when an exception is thrown from my app uploaded to my real device I still see the .Net stacktrace with the original method and parameter names! Or is this only because it's the debug version ?

  • Just found this one "Note that .NET assemblies will still be inside the IPA package because the metadata is still required by System.Reflection." from nullskull.com/a/10477393/obfuscating-xamarin-applications.aspx

    So, @DaveHunt: This quite differs from your statement ?

  • DaveHuntDaveHunt USMember ✭✭✭✭✭

    No, that's exactly what I said. The assemblies don't contain any actual code, only metadata.

    The metadata is there for reflection, so, yes, the symbol names will be there, but without the IL, there's no easy way to put it back together.

Sign In or Register to comment.