1

I want to build cocoa framework project, but when I build the project I get the .a file not .framework.

What setting is needed for this?

picciano
  • 22,341
  • 9
  • 69
  • 82

1 Answers1

1

First, when you are creating the project, be sure that you are selecting the "Cocoa Touch Framework" template.

enter image description here

After you build the project, the .framework file will be created and will show up in the "Projects" folder in the project navigator.

enter image description here

picciano
  • 22,341
  • 9
  • 69
  • 82
  • in fact, I cloned https://github.com/pili-engineering/pili-librtmp to get .framework with "Enable Bitcode" setting as YES. –  Mar 23 '18 at 15:17
  • Is this not the cocoa touch framework type project? Can you see the above repository? how can I get the .framework file from there? –  Mar 23 '18 at 15:19
  • 1
    The project you cloned in not a framework project. It is a static library. Converting a static library to a framework would be best asked as a separate question in Stack Overflow, rather than in comments to this question and answer. Maybe try this question: https://stackoverflow.com/questions/33087900/convert-a-static-library-target-into-a-framework-target-in-an-xcode-project – picciano Mar 23 '18 at 15:21
  • In fact, I'm usingLFLiveKit pod, but I got the error like LFLiveKit/libpili-librtmp.a, file was built for archive which is not the architecture being linked (armv7): /Volumes/Work/Task_History/2018_01_05_livestreamApp with MH/live-ios/Pods/LFLiveKit/libpili-librtmp.a ld: bitcode bundle could not be generated because '/Volumes/Work/Task_History/2018_01_05_livestreamApp with MH/live-ios/Pods/LFLiveKit/Vendor/pili-librtmp.framework/pili-librtmp(amf.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build for archi... –  Mar 23 '18 at 15:23
  • So, I'm trying to replace pili-librtmp.framework (as bitcode enabled state) –  Mar 23 '18 at 15:25