错误记录笔记(持续更新)
2017-07-23 20:16
211 查看
记录自己碰见的疑难杂症错误处理
错误一 :
把生成的framework工程使用cocoapod依赖的时候,报这么一个错误,尼玛莫名奇妙。后来在stackOverFlow中找到了解决办法。
So basically I found out that I just need to follow these simple steps.
So the directory structure now becomes:
Now open terminal and cd to the Desktop. Now start typing the following command:
and that's it. Here we merge the simulator and device version of MyFramework binary present inside MyFramework.framework. We get a universal framework that builds for all the architectures including simulator and device.
Now, creating a pod for this framework doesn't make any difference. It works like a charm. Please also note that there are run scripts available too to achieve the same functionality, but I spent a lot of time in finding the correct script. So I would suggest you use this method.
链接 :https://stackoverflow.com/questions/38670976/how-to-build-cocoa-touch-framework-for-all-architectures-dependent-on-other-fram。
仔细看最后lipo 合并命令是MyFramework.framework/MyFramework. 否则会报错 lipo: can't map input file:XXX。 .framework实质是一个文件夹。
错误二
Pods was rejected as an implicit dependency for 'libPods.a' because its architectures 'x86_64' didn't contain all required architectures 'i386',这种情况其实就是pods的工程与主工程的valid Architectures 、 build active architecture Only 不一致导致。
错误一 :
lipo: -remove's specified would result in an empty fat file
把生成的framework工程使用cocoapod依赖的时候,报这么一个错误,尼玛莫名奇妙。后来在stackOverFlow中找到了解决办法。
So basically I found out that I just need to follow these simple steps.
1. Create a cocoa touch framework. 2. Set bitcode enabled to No. 3. Select your target and choose edit schemes. Select Run and choose Release from Info tab. 4. No other setting required. 5. Now build the framework for any simulator as simulator runs on x86 architecture. 6. Click on Products group in Project Navigator and find the .framework file. 7. Right click on it and click on Show in finder. Copy and paste it in any folder, I personally prefer the name 'simulator'. 8. Now build the framework for Generic iOS Device and follow the steps 6 through 9. Just rename the folder to 'device' instead of 'simulator'. 10. Copy the device .framework file and paste in any other directory. I prefer the immediate super directory of both.
So the directory structure now becomes:
- Desktop - device - MyFramework.framework - simulator - MyFramework.framework - MyFramework.framework
Now open terminal and cd to the Desktop. Now start typing the following command:
lipo -create 'device/MyFramework.framework/MyFramework' 'simulator/MyFramework.framework/MyFramework' -output 'MyFramework.framework/MyFramework'
and that's it. Here we merge the simulator and device version of MyFramework binary present inside MyFramework.framework. We get a universal framework that builds for all the architectures including simulator and device.
Now, creating a pod for this framework doesn't make any difference. It works like a charm. Please also note that there are run scripts available too to achieve the same functionality, but I spent a lot of time in finding the correct script. So I would suggest you use this method.
链接 :https://stackoverflow.com/questions/38670976/how-to-build-cocoa-touch-framework-for-all-architectures-dependent-on-other-fram。
仔细看最后lipo 合并命令是MyFramework.framework/MyFramework. 否则会报错 lipo: can't map input file:XXX。 .framework实质是一个文件夹。
错误二
Pods was rejected as an implicit dependency for 'libPods.a' because its architectures 'x86_64' didn't contain all required architectures 'i386',这种情况其实就是pods的工程与主工程的valid Architectures 、 build active architecture Only 不一致导致。
相关文章推荐
- Android错误笔记---持续更新
- Linux学习之错误与解决记录(持续更新)
- 我的 CSDN 博客目录索引(主要记录了我学习视频、书籍的笔记,持续更新中)
- 点滴记录笔记_持续更新
- yii2学习笔记,错误总结,持续更新
- mdk错误记录(持续更新)
- 将在这里持续更新记录IT学习笔记
- C语言遇到的错误和解决方案~~~持续更新,记录成长的过程
- android仿新浪微博项目一路上碰到的错误笔记(持续更新)
- 记录手边的一边错误(持续更新)
- 《C#高级编程》笔记系列--点滴记录(持续更新中……)
- Objective-C Reflection(Objective-C 反射机制)实用随笔笔记(持续更新)
- 错误汇总~持续更新中
- MySQL命令记录(持续更新...)
- android个人错误,持续更新
- 关于JAVA集合类的源代码的一些记录(持续更新)
- 《程序员面试宝典》之错误纰漏(持续更新。。。)
- Mysql操作笔记(持续更新)
- 那些学完 Java 在学 C 才会犯的错误(持续更新)