7

Last week i was able to upload my ipa to iTunesConnect just fine. But as of today I am getting the following error when uploading via Application Loader:

ERROR ITMS-90635: "Invalid Mach-O Format. The Mach-O in bundle "Application.app/Frameworks/PSPDFKit.framework" isn’t consistent with the Mach-O in the main bundle. The main bundle Mach-O contains armv7(machine code) and arm64(machine code), while the nested bundle Mach-O contains armv7(bitcode and machine code) and arm64(bitcode and machine code). Verify that all of the targets for a platform have a consistent value for the ENABLE_BITCODE build setting."

I am aware of the solutions proposed here: Xcode - Error ITMS-90635 - Invalid Mach-O in bundle - submitting to App store and in many others.

I have however no idea how to apply any of the proposed solutions to a Xamarin iOS project. I am not using any pods, instead I am using a Binding library for PSPDFKit, which I have created as described in the official documentation https://pspdfkit.com/guides/ios/current/other-languages/xamarin/.

As far as I can see there are two ways for me to go, either to enable bitcode in my project (which I have no idea how to do) OR to disable bitcode in the binding project for PSPDFKit (which I have also no Idea how to do).

I am grateful for any help or propositions.

Community
  • 1
  • 1
Eugen Timm
  • 744
  • 6
  • 13
  • Disable bitcode for your project. Build Settings > Build Options > Enable BitCode > set to NO - thats for Xcode, have no idea how to do that in Xamarin IDE. – Evgeny Karkan Jun 07 '16 at 20:50
  • Seems Apple made a recent submission change. Since your library has bitcode, try this in your main application `.csproj` but set it to `true` http://stackoverflow.com/a/37684483/4984832 – SushiHangover Jun 07 '16 at 21:51
  • Thanks for the suggestion. I set the MtouchEnableBitcode property to true but apparently Xamarin iOS does not support that, as I am receiving this error message during compiling. /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets: Error: Error executing task MTouch: Bitcode is currently not supported on iOS. – Eugen Timm Jun 08 '16 at 06:26
  • Pretty strange when I set that property, I don't get that error. Are you sure you're on the latest version? Xamarin pushed a new stable release yesterday I believe. – Jelle Jun 10 '16 at 23:08

1 Answers1

0

I finally was able to do it, with one of the solutions from this post https://stackoverflow.com/a/37624641/2702513

What I had do do, was stripping the Bitcode from my library, which can be done with this command:

$ xcrun bitcode_strip -r {PATH_TO_LIBRARY} -o tmp.dylib

The command extracts the machine code from the library into the tmp.dylib file which then can be used instead of the library itself. In case of PSPDFKit the library is inside the framework.

Community
  • 1
  • 1
Eugen Timm
  • 744
  • 6
  • 13