1

My goal is to build a universal framework that can be use in iOS devices and simulators. I want to be able to distribute this framework using cocoapods which also I was able to do successfully.

My framework has some external dependancies, the main one being AWSLambda which I included in my podspec which seems to give me the issue.

I was able to build and embed my framework into a test project by manually dragging the framework into the test project or by installing it via cocoa pods. On both occasions, running the project on a device or a simulator had no issues and everything worked fine.

However, when I tried to archive the test project to submit it to TestFlight, the process failed with the key warning being FrameworkName was built without full bitcode.

A popular solution which came up is to set enable bitcode to no, however I don't think this is the right solution for this project at least as I am building a Framework which will be integrated into other projects and asking client applications to disable bitcode does not seem the right way to go. If it was a personal app I may have taken this route.

So to resolve this, I took some help from stackoverflow and here is what I tried This stackoverflow answer first

  1. In Build Settings of the framework project set Other C Flags to -fembed-bitcode

  2. In the Build Settings of the framework target add a user defined flag called BITCODE_GENERATION_MODE with the value of bitcode

  3. Both in the framework project and target, Enable Bitcode should be set on Yes

Similar answers were repeated here which I tried.

Here is another answer which I tried where the person recommends to set Skips Install to No and archive the framework instead of building it.

While trying this standalone or in combination, the building of my framework still fails however, this time it is not referring to my Framework but it is referring to my pod dependency AWSLambda.

Adding this to the podfile seems to solve the problem of building the framework, however again I am faced with the challenge of asking the user's to include this into their podfiles which does not strike me as professional or I could be wrong ?

I wanted to know what were my options when it came to such errors with dependancies and is there any way to overcome this ?

I am not sure if such things can be added to the podspec to overcome these challenges.

I probably will have to make a compromise somewhere but it would be nice to get some advice on how to solve this issue.

Thanks

Shawn Frank
  • 4,381
  • 2
  • 19
  • 29

0 Answers0