Xcode 11: Building a static framework which includes other frameworks/libs into its binary in iOS

為{幸葍}努か 提交于 2021-01-29 18:26:48

问题


I have a framework target in Xcode 11.x to build a Dynamic framework with statically linking some 3rd party libraries using pod file.

platform :ios, '9.0'
#use_frameworks!

target 'Framework' do
pod 'DeviceUtil', '~> 2.0'
end

Now I have a requirement to build a Static framework, and for this I changed the "Mach-O' type to Static Library in 'Framework's' target build settings and able to create Static framework. The generated framework shows all architectures correctly (for architecture i386): current ar archive random library for all architecutres x86_64, armv7 & arm64). But the Static framework does not included 3rd party libraries within the Framework binary.

How to generate a Static framework using Xcode11.x which includes other 3rd party libs in its binary? Also changing "Mach-O" type is good enough to generate a Static framework or is there any other way that I am missing?

I have referred few SO posts and couldn't find an answer. Some of them are old and I feel not relevant as per latest Xcode build settings and some of them does not have an answer. Xcode 9: Linking a static framework against another static framework

来源:https://stackoverflow.com/questions/64074890/xcode-11-building-a-static-framework-which-includes-other-frameworks-libs-into

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!