我怎样才能阻止Xamarinbuild立我的应用程序启用位码?
在我的iOS版本的configuration中,没有选项来禁用位码。 在Xcode中,可以设置ENABLE_BITCODE = NO
我需要这个,因为我的链接的框架不是用bitcode构build的,现在Apple不允许再使用半码编译的应用程序。
在您的iOS应用程序的.csproj
中,searchPropertyGroup
的版本configuration,您需要closures位代码,即:
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
在该组中,查看MtouchEnableBitcode
已经存在并编辑它,否则添加:
<MtouchEnableBitcode>false</MtouchEnableBitcode>
我可以通过在closures</Project>
标记之前立即在iOS应用程序项目的.csproj文件中添加以下行来构build禁用了bitcode的应用程序。
<Target Name="BeforeCodesign"> <Exec Command="$(_SdkDevPath)\Toolchains\XcodeDefault.xctoolchain\usr\bin\bitcode_strip %(_Frameworks.FullPath) -r -o %(_Frameworks.FullPath)" /> </Target>
我和我的团队已经完成了Vittal Pai和SushiHangover的build议,但是我们遇到了另一个错误:
命令“\ Applications \ Xcode.app \ Contents \ Developer \ Toolchains \ XcodeDefault.xctoolchain \ usr / bin \ bitcode_strip PathToOurFrameWorks -r -o PathToOurFrameWorks”以代码3结束
^这是从法语翻译,所以请不要咬我太难:)
我们做到这一点的唯一方法是将项目从我们的GitHub导入带有VS 2017的Mac,然后在那里重build。
该错误仍然存在于Windows版本中,但在Mac版本上已经消失。