[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
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!
The input to script phase solution works for my needs in Xcode 10.2.1
InputFiles = $(TARGET_BUILD_DIR)/$(INFOPLIST_PATH)
Xcode 10.2.1 still have the issue
Unfortunately, that suggestion doesn't work: ProcessInfoPlistFile is still called after my custom scripts, and Info.plist values are overridden.
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.