Xcode 10 Build Phase Shell Script

后端 未结 4 1184
甜味超标
甜味超标 2021-02-10 02:54

In our project we derive our release version from git tag etc then write it to the built folder\'s Info.plist with a shell script like:

GIT_RELEASE_VERSION=$(some

4条回答
  •  北荒
    北荒 (楼主)
    2021-02-10 02:57

    It seems like the problem is that sometimes your Run Script Phase will execute before Xcode creates the Info.plist. If you’d like to ensure that your script phase runs after a specific step, you need use the inputs to mark your dependencies.

    For instance, adding:

    $(TARGET_BUILD_DIR)/$(INFOPLIST_PATH)

    As an input to your script phase should enforce the ordering you are looking for: Xcode will create the Info.plist and sometime after, your script will execute and modify the Info.plist.

提交回复
热议问题