Search code examples
xamarinxamarin.iosxamarin-studio

How to disable bitcode in Xamarin iOS Project?


I tried disabling bitcode in xamarin project using MtouchEnableBitcode variable as False in iOS csproj file. Still i am getting frameworks are not built with bitcode enabled errors while doing app store submission.

Anyone know how to disable bitcode in Xamarin iOS project?


Solution

  • I got this answer from Microsoft Support. Now i am able to build the application with bitcode disabled by adding following lines to the iOS app project's .csproj file immediately before the closing </Project> tag.

    <Target Name="BeforeCodesign">
      <Exec Command="$(_SdkDevPath)\Toolchains\XcodeDefault.xctoolchain\usr\bin\bitcode_strip %(_Frameworks.FullPath) -r -o %(_Frameworks.FullPath)" />
    </Target>