[Xcode 10 Regression] Inconsistent ordering of Run Script phases and ProcessInfoPlistFile

Originator:davg
Number:rdar://44422906 Date Originated:9/13/2018
Status:Closed Resolved:
Product:Xcode Product Version:Version 10.0 (10A254a)
Classification:UI/Usability Reproducible:Always
 
Summary: Before Xcode 10, Xcode would always perform `Run Script` phases after the `ProcessInfoPlistFile` build step.

With Xcode 10, 
- Xcode performs the `ProcessInfoPlistFile` BEFORE the `Run Script` phase for clean builds
- Xcode performs the `ProcessInfoPlistFile` AFTER the `Run Script` phase for null builds


Xcode should always run `Run Script` phases after the `ProcessInfoPlistFile` build step.


Steps to Reproduce:

1. Open the attached Xcode project in Xcode 10
2. Clean Build Folder
3. Build and check build log. Observe `This should run after ProcessInfoPlist` printed AFTER `ProcessInfoPlistFile`
4. Another build (null build). Observe Observe `This should run after ProcessInfoPlist` printed BEFORE `ProcessInfoPlistFile`




Expected Results: Xcode always runs `Run Script` phases after the `ProcessInfoPlistFile` build step.


Actual Results: Xcode only runs the `Run Script` phases after the `ProcessInfoPlistFile` build step for clean builds.

Comments

Xcode 10.2.1 still have the issue

By speakus.net at May 1, 2019, 9:45 p.m. (reply...)

Unfortunately, that suggestion doesn't work: ProcessInfoPlistFile is still called after my custom scripts, and Info.plist values are overridden.

By francis.labrie at Oct. 26, 2018, 2:04 p.m. (reply...)

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.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!