3

I am currently building a dynamic framework for iOS and tvOS. Therefor I lipo simulator and device binaries to one fat library via script. Bitcode is enabled in Build Settings, as you can see here:

Build Settings

I verified the library after creation with otool. Bitcode is definitely enabled. When I now try to add this library to my Main App via Cocoapod and validate this App with Archive -> Validate, I am getting the following error message:

XCode error

Build Settings Demo App

Somebody has a clue why the AppStore is complaining?

davidOhara
  • 1,008
  • 5
  • 17
  • 39
  • It's difficult to see what target that `ENABLE_BITCODE=YES` is affecting with all the names redacted. Why not set it at the project level instead? – trojanfoe Sep 27 '19 at 08:31
  • Same error if I enable it on project level @trojanfoe – davidOhara Sep 27 '19 at 08:45
  • I think [this](https://stackoverflow.com/a/36296331/299924) is the issue. It looks like `lipo` might be stripping-out the bitcode. Try keeping it simple. Generate the framework with no `lipo` script and have the app target depend on the framework so it embeds it within the bundle and see where that gets you. – trojanfoe Sep 30 '19 at 07:47
  • But I verified the framework which was created by lipo with otool. And otool showed that bitcode is inside the framework... And how can I have a framework with device and simulator binaries inside without using lipo? – davidOhara Sep 30 '19 at 09:28
  • Well the approach would be rather than keeping the framework and app projects separate, put them together in the same workspace and see if that makes it work. I assume your end-goal is to the provide the framework as a deliverable to other projects, but I am trying to see if it works in a simple manner first. – trojanfoe Sep 30 '19 at 09:31
  • I just tried it without the lipo command. I created my framework and checked it with otool... Everything fine. After that tried to upload to app store and got the same error again :/ @trojanfoe – davidOhara Sep 30 '19 at 11:35
  • Hmmm, not sure then :-| – trojanfoe Sep 30 '19 at 11:54
  • Ok, if I add both in one workspace and add the framework directly to my main App, I can upload it without a problem... So it only not works if I add my framework via Cocoapods... – davidOhara Sep 30 '19 at 11:59
  • If you add your framework via CocoaPods then your must enable bitcode on Pods project – Alexander Ushakov Oct 06 '19 at 14:32
  • @AlexanderUshakov I also tried that. Same error... – davidOhara Oct 07 '19 at 12:49

0 Answers0