zoukankan      html  css  js  c++  java
  • Lipo Making a fat static library for iOS device and simulator

    Some third party iOS library providers provide separate static library archives for simulator (i386) and device (armv6 and or armv7).

    That's a pain since you either change them manually or set the linking flags on different Xcode targets to use the appropriate library (whereas normally with libraries and frameworks you just drag it into your project and you're done).

    Instead, you can build your own fat (multi-architecture) library from the provided archives and Xcode will link against the appropriate architecture segment. 

    We achieve this using the lipo tool, eg: 

    lipo -output lib_fat.a -create -arch armv6 lib_device.a -arch l386 lib_sim.a

    If they provide two archives—one regular i386 archive (with no fat header) for the simulator and one fat archive for the device with armv6 and armv7 segments. Since the device archive headers now specify the archives already, we don't need to tell lipo anything other than the archive file name.:

    lipo -create lib_device.a lib_sim.a -output lib_fat.a

     

  • 相关阅读:
    iphoneX 兼容
    app 判断网络状态
    app 版本升级
    express 安装
    app打开QQ与陌生人聊天
    app项目中几个常用的cordvoa插件
    axios请求拦截器和相应拦截器
    vue中MD5+base64加密
    想啥写啥
    react canvas圆环动态百分比
  • 原文地址:https://www.cnblogs.com/simonshi2012/p/3046186.html
Copyright © 2011-2022 走看看