Bitcode bundle could not be generated (while archiving) because Static Framework (.framework) was built without full bitcode
I also had this problem with a framework I built.This is what worked for me:
In Build Settings of the framework project set
Other C Flags
to-fembed-bitcode
In the Build Settings of the framework target add a user defined flag called
BITCODE_GENERATION_MODE
with the value ofbitcode
Both in the framework project and target,
Enable Bitcode
should be set onYes
This problem has been bothering me for a long time and like you I did everything I could and it still didn't work. Finally I found out it was a stupid configuration I made in Podfile
:
target 'MySDK' do project 'Src/MySDK.xcodeproj'endtarget 'Demo' do project 'Demo/Demo.xcodeproj' pod 'MySDK', :path => $spec_pathend
Since my SDK doesn't have any dependencies, I added such a target to automatically add my SDK project to the workspace created by cocoapods.
As a result, even though this target doesn't have any dependencies, this action creates libPods-MySDK.a
in my SDK and adds it in Build Phases - Link Binary With Libraries
.
This causes the same problem as yours.
The solution is simple, delete the empty targets in the podfiles, delete the invalid Pods
and Frameworks
directories, and delete the pod-related config in Build Phases
.