1

I want to enable bitcode in my project as well a framework. I know how to enable it but question is how to add it so that my Project do contain bitcode. I am having issue with archiving where the project is bitcode enabled so as the framework it is using BUT the framework is not compiled without bitcode actually in it.

DeveloBär
  • 673
  • 8
  • 20
djay
  • 375
  • 2
  • 18

2 Answers2

0

All the frameworks you use in your project must be compiled with bitcode on in order to have a bitcode enabled project. Otherwise you will get an error. Frameworks compiled without bitcode cannot be converted to frameworks with bitcode, you must recompile them. If all your frameworks are copiled with bitcode, also enable bitcode in your project and everything should be fine.

Jelly
  • 4,522
  • 6
  • 26
  • 42
  • I am aware of it. please tell how to add it to project – djay Mar 25 '16 at 10:17
  • Well you add them as you add any other framework. Remove the current one and add the one with bitcode instead. To compile a framework with bitcode select the target you use for compiling in `Project settings` and go to `Build settings` and enable bitcode. Then compile the framework and put it in your project. If your framework code is already in your project you only have to change the setting from the framework's `project settings`. – Jelly Mar 25 '16 at 10:25
  • Enabling BitCode does not **ADD** bitcode to the project. – djay Mar 25 '16 at 10:55
  • Yes it does. Why do you say it does not? – Jelly Mar 25 '16 at 12:04
  • Well I am facing this: Built an Framework and enabled BITCODE YES in that. Added that framework to other one of my projects which too have BITCODE ENABLED. error comes while archiving: missing bitcode, your framework wasn't complied _full bitcode_ – djay Mar 25 '16 at 19:54
  • Something is wrong with you framework compilation. Please make sure you set `Enable Bitcode ` to `YES` in the target that you use to compile the library (not other target). Also make sure that you add the newly compiled framework to your project. Make sure that you deleted the old ones from `Link binary with libraries` and that all your libraries from your project are compiled this way. Make sure that bitcode is enabled for the build configuration you use (debug/realease). – Jelly Mar 25 '16 at 20:01
  • okay i will carefully follow that as well. Plus I did something like setting c/c++ and other linker flags to -fembed-bitcode. Can you tell whats that for and hows that different from only enabling bitcode. Thanks:) – djay Mar 25 '16 at 20:04
  • 1
    I don't think there is any difference between ` -fembed-bitcode` and just enabling bitcode. What enabling bitcode does is actually adding that flag, so you are passing is twice if you use both approaches. – Jelly Mar 25 '16 at 20:09
  • okay thanks, I was actually doing that so every time Xcode compiles , it must emits bit-code otherwise it only does during archiving i guess. – djay Mar 25 '16 at 20:15
0

you can set bitcode no as in image display enter image description here

Birendra
  • 623
  • 1
  • 5
  • 17