I'm getting this error
error: Invalid bitcode signature
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am using cocoapods and I have verified that all enable bitcodes match, I've tried all options Yes, No and ${inherited} for the enable bitcode field.
Not sure how to debug this further, how to I use the -v option / will that even give me more information.
Some back ground, I'm merging two code bases together iPhone and iPad so that it's a universal app.
In my project I fixed this by setting all "Bitcode enabled" options to "No". That includes all targets and all projects in the workspace (main project, Cocoa Pod project).
error: Invalid bitcode signature clang: error: linker command failed with exit code 1 (use -v to see invocation)
Note: If you are building for the target phone 9 or 10 the following solution solves the issue
Solution
Hope this solves the problem
如果您有一个静态库(以.a结尾),则其bitcode设置可能与您的工作区/项目不一致。
Using pod deintegrate and pod install again resolved my problem. It might be helpful to other who have this question.
执行pod update
后我得到了同样的错误 - 重新启动Xcode为我做了伎俩。
清理派生数据文件夹对我有用。
对我而言,它有助于“将项目更新为推荐设置”并清理,归功于Rocksaurus: https ://stackoverflow.com/a/47336130/1884907
I was having this problem since adding Cocoapods (actually added to start using ResearchKit).
I had gone through and ensured bitcode enabled was set to NO, but thought it odd that the 'Pods' project (within the project workspace) didn't have a definition for 'Bitcode Enabled' under Build Settings. After lots of frustration, I tried adding the 'Bitcode Enabled' setting for the ResearchKit project (I just cut&pasted the key/values from my main app project for accuracy).
Hey presto! This got me past this error, and I just had to fix some arch related things and I was up and running again.
I guess if there isn't a Bitcode Enabled key/value defined, it defaults to YES.
Maybe the issue because of a third party SDK integrated into your project using Cocoapods.
do the following:
Archive the new project, and see if it succeeds, if not repeat step 4 till you are able to archive.
(you can also try something like binary search, wherein you delete the first half pods in your Podfile and see if the new project archives)
Once you've figured out the library causing the issue, keep downgrading the library by explicitly specifying the version in Podfile, until the project archives successfully.
Or if you don't mind disabling bitcode: Go to build settings search bitcode and change "Enable Bitcode" to "No".
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.