frameworks - Compiling iOS library with bitcode enabled -


i need release framework bitcode enabled turns out hassle. set 'enable bitcode' in project's settings 'yes' , builds cleanly both real device , simulator.

i wanted test library integrated new app created purpose build simulators. when try build real device get:

ld: '/path/to/framework.framework/company(file.o)' not contain bitcode. must rebuild bitcode enabled (xcode setting enable_bitcode), obtain updated library vendor, or disable bitcode target. architecture armv7 clang: error: linker command failed exit code 1 (use -v see invocation) 

like said, had built bitcode enabled i'm not sure why happens.

any ideas? thanks

afaik, when build app xcode includes bitcode when make archive, reason - decrease compile time when want debug or test app/library.

to ensure xcode emits bitcode @ each build can add -fembed-bitcode flag other c flags , other linker flags:

enter image description here

enter image description here

also, easiest way check if binary contains bitcode use otool , grep:

otool -l binary_name | grep __llvm

you see 1 or more segname __llvm entries if have bitcode or empty output if not.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -