zoukankan      html  css  js  c++  java
  • 错误记录笔记(持续更新)

    记录自己碰见的疑难杂症错误处理

    错误一 : 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 不一致导致。  

  • 相关阅读:
    ssd笔记
    深度学习 参数笔记
    NVIDIA驱动安装
    下载大文件笔记
    vue中使用echart笔记
    torch.no_grad
    暑期第二周总结
    暑期第一周总结
    第十六周学习进度
    期末总结
  • 原文地址:https://www.cnblogs.com/xiongwj0910/p/7225910.html
Copyright © 2011-2022 走看看