iOS merge several framework into one

后端 未结 3 793
日久生厌
日久生厌 2021-01-31 10:14

After watching the WWDC 2016 video optimizing App Startup time, Apple suggested developer can merge several frameworks (dynamic library not static) into one to improve the app c

相关标签:
3条回答
  • 2021-01-31 11:00

    If you're trying to merge frameworks created by cocoapods, you can use the pod-merge plugin: https://github.com/grab/cocoapods-pod-merge

    0 讨论(0)
  • 2021-01-31 11:03

    I can combine two frameworks (static library only) into one using

    libtool -static -o new.framework SwiftJSON.framework/SwiftJSON Shimmer.framework/Shimmer
    

    The script from this github maybe helpful https://gist.github.com/evands/8ba4f227b00ae14a9303

    P.S. Merging static library does not reduce the cold start time

    0 讨论(0)
  • 2021-01-31 11:05

    For dynamic frameworks lipo -create path/yourFramework1 path/yourFramework2 -output path/yourFramework

    For .a libraries

    • where sim/lib.a contains i386
    • where dev/lib.a contains armv7

    lipo -create '/sim/lib.a' '/dev/lib.a' -output 'lib.a'

    output contains i386 and armv7

    0 讨论(0)
提交回复
热议问题