Xcode unable to find strip-frameworks.sh directory

后端 未结 2 578
天涯浪人
天涯浪人 2021-02-05 01:28

I recently update Xcode to Version 7.1, which included Swift 2.1. I installed Swift 2.1 with no troubles. After attempting to run my project, I realized that I needed to grab th

相关标签:
2条回答
  • 2021-02-05 02:06

    From the error message, it seems like, you didn't added Realm.framework and RealmSwift.framework to the Embedded Binaries pane, which you find in the General tab of your project, as shown below:

    For further validation, you can check the tab Build Phases. It should look like below:

    Note: Make sure that the run script phase comes after the Embed Frameworks phase.

    Why is this script needed?

    The vendored frameworks are not just single executables, but actually FAT binaries which are archives of linked executables on different architectures. This includes architecture slices for arm64 and armv7, which are necessary for deployment on the phone as well as i386 and x86_64 which are necessary for running the app in the simulator.

    The strip-frameworks.sh script main responsibility is to take care of removing unnecessary slices. This reduces the final package size and is necessary for AppStore deployment because iTunes Connect rejects apps with simulator architectures.

    More Details

    The script works on base of the build setting VALID_ARCHS. Because that is changing the signed executable of the framework, it also needs to take care of code signing. Since introduction of bitcode, it also got further post processing as responsibility. It extracts the included *.bcsymbolmap files from the framework bundle and places them into correct path in the *.xcarchive.

    The FAQ topic on Bitcode of PSPDFKit has a good explanation on what BCSymbolMaps are:

    A BCSymbolMap is a lot like a dSYM for bitcode. Xcode builds it as part of creating the app binary, and also for every dynamic framework. It's required for re-symbolicating function/method names to understand crashers.

    0 讨论(0)
  • 2021-02-05 02:09

    In my case, change the process order in Build Phases to solve

    • not OK

    • OK

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