.NET MAUI & Xamarin obfuscator

A mobile app ships your compiled C# onto a device anyone can unpack. Here is where obfuscation helps, what the iOS build changes, and the one thing to test.

A mobile app is shipped code

A .NET MAUI or Xamarin app is the clearest case for obfuscation: you package your compiled C# into an app and hand it to users, on devices you do not control. Pull the app package apart and your managed assemblies are right there — the same metadata-rich IL a decompiler turns back into readable C#. If your app holds logic worth protecting, obfuscating those assemblies raises the cost of reading it.

Android and iOS are not the same picture

Which build you are shipping changes how much obfuscation does, so treat the two targets separately:

  • Android ships your assemblies as IL inside the APK/AAB. They can be extracted and decompiled directly, so this is where obfuscation earns the most — obfuscate the assembly before it is packaged.
  • iOS is ahead-of-time compiled to native code, so there is far less .NET IL for a decompiler to read — a genuine barrier, closer to reversing a native app. But it is not obfuscation and not absolute: strings and data are still recoverable, and renaming applies to the assembly before AOT runs. The relationship between AOT and obfuscation is covered in obfuscation with single-file, trimming and NativeAOT.

Because most MAUI/Xamarin projects target Android and iOS from one codebase, the practical answer is to obfuscate the shared assemblies: Android gets the real benefit, and iOS loses nothing.

The caveat to test: XAML binds by name

MAUI and Xamarin.Forms bind their XAML to your properties by string name, exactly like WPF. Rename a bound property and the binding silently stops resolving — no compile error, just a blank field at runtime. The same goes for anything reached by name: x:Name references, converters, and Type.GetType lookups.

  • Keep bindable properties and any member referenced from XAML intact.
  • Keep serialization attributes explicit for models that round-trip to JSON or storage.
  • Concentrate protection on the internal logic — licensing, pricing, proprietary algorithms — which is what you want to hide anyway.
  • Test every page on the obfuscated build. The workflow is in how to test your obfuscated build, and the binding failure modes in obfuscation and reflection.

What it protects — and what it does not

Renaming makes the decompiled output unreadable; it does not make your app a vault. A licence check that runs on the device can still be defeated, and string literals stay visible unless you enable string encryption (Pro). Keep secrets off the device and validate anything that matters server-side — what obfuscation actually protects against sets honest expectations.

Free vs Pro for mobile

The free tier renames symbols in the browser with no account. Pro adds string encryption, control-flow obfuscation, call-reference proxying and optional method virtualization, plus larger files, batch mode and a CI/CD API you can wire into your mobile build. The layer decision guide matches each to the threat it answers.

See also the .NET obfuscator overview, C# obfuscator and the guide to protecting a .NET desktop app.