I created Android app with Xamarin Forms. For release I use option \"Bundle assemblies into native code\". My apk have size - 17 Mb, without this option 33 Mb. Do I need to
Bundle Assemblies into Native Code means:
When this option is enabled, assemblies are bundled into a native shared library. This option keeps your code safe; it protects managed assemblies by embedding them in native binaries.
Keep it safe :
These will bundle the .dll files into a .so file so that they are harder to tamper with on a rooted device. As BobFlora said : it will be moving IL code in with the native binaries(.so file) so it's harder for hackers to mess with it. There's no performance issue here.
Reduce apk size :
This option will reduce apk size dramatically since .so files are compressed and dlls are not.
I create an empty project, we could find the difference when use this option :
Bundle Assemblies into Native Code :Bundle Assemblies into Native Code :Do I need to use obfuscation for my libraries or my code is protected?
It is helping increase code obfuscation (specifically on Android), and there are other ways to increase security/cryptography. If you had tighter security requirements, you could use this option, it depends on your requirement.