Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I stop Xamarin from building my app with bitcode enabled?

In the configurations from my iOS build, there is no option to disable bitcode. While in Xcode it is possible to set ENABLE_BITCODE=NO

I need this because my linked frameworks are not build with bitcode, and nowadays Apple does not allow half-bitcode-compiled apps anymore.

like image 940
Jelle Avatar asked Jun 07 '16 15:06

Jelle


2 Answers

In your .csproj for your iOS application, search for the PropertyGroup for the release configuration that you need to turn off bit code for, i.e.:

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">

Within that group, see if a MtouchEnableBitcode already exists and edit it, otherwise add:

<MtouchEnableBitcode>false</MtouchEnableBitcode>
like image 154
SushiHangover Avatar answered Nov 14 '22 21:11

SushiHangover


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>
like image 29
Vittal Pai Avatar answered Nov 14 '22 20:11

Vittal Pai