美文网首页
制作framework

制作framework

作者: 龙之天下 | 来源:发表于2021-04-08 17:46 被阅读0次

1、创建iOSPaletteSDK文件夹包含的文件如下

1)、iOSPalette-Release-iphoneos.framework
2)、iOSPalette-Release-iphonesimulator.framework

2、合并文件

 lipo -create iOSPalette-Release-iphonesimulator.framework/iOSPalette iOSPalette-Release-iphoneos.framework/iOSPalette -output iOSPalette.framework

3、合并失败

xctoolchain/usr/bin/lipo: can't create temporary output file: iOSPalette.framework/iOSPalette.lipo (No such file or directory)

4、方案二合并:

lipo -create iOSPalette-Release-iphonesimulator.framework/iOSPalette iOSPalette-Release-iphoneos.framework/iOSPalette -output iOSPalette

5、出现的问题:

fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: iOSPalette-Release-iphonesimulator.framework/iOSPalette and iOSPalette-Release-iphoneos.framework/iOSPalette have the same architectures (arm64) and can't be in the same fat output file

6、解决方案:

设置Build Setting --> Excluded Architectures --> Release --> 添加上 arm64(Any iOS SimulatorSDK)

7、可以打包成功

8、真机,可以正常运行

模拟器:ld: in /xxx/iOSPalette.framework/iOSPalette(Palette.o), building for iOS Simulator, but linking in object file built for iOS, for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

相关文章

网友评论

      本文标题:制作framework

      本文链接:https://www.haomeiwen.com/subject/bagztltx.html