ksnowlv

回顾过去,总结以往;立足现在,铭记当下;技术为主,笔记而已.

Swift-framework的合并

| Comments

swift framework如何支持合并呢?以YKBaseFramework.framework为例。

1.lipo合并静态库。

1
 lipo -create Release-iphoneos/YKBaseFramework.framework/YKBaseFramework Debug-iphonesimulator/YKBaseFramework.framework/YKBaseFramework -output YKBaseFramework

生成YKBaseFramework,查看支持架构

1
2
bogon:YKBaseSwiftFrameworkLib ksnowlv$ lipo -info YKBaseFramework
Architectures in the fat file: YKBaseFramework are: armv7 i386 x86_64 arm64

2.把debug库中的swiftdoc与swiftmodule文件拷贝到release库对应目录下。

image

3.把合并后的YKBaseFramework文件拷贝到release库对应目录下.

image

4.大功告成,可以支持swift/objective-c调用

Comments

comments powered by Disqus
Included file 'custom/after_footer.html' not found in _includes directory