WatchKit apps don't have a "Build Phases" section in Xcode, forcing hacky workarounds

Number:rdar://20782873 Date Originated:2015-05-01
Status:Open Resolved:
Product:iOS SDK Product Version:Xcode 6.3.1 (6D1002)
Classification:Enhancement Reproducible:Always
WatchKit apps have the constraint: "The value of CFBundleVersion in your WatchKit app's Info.plist must match the value in your companion app's Info.plist."

Many developers (including myself) generate the CFBundleVersion at build-time. This is usually achieved with a "Run Script" build phase that modifies the Info.plist file in the built app. 

Since we don't have build phases in WatchKit app targets, this isn't achievable. Modifying the Info.plist from another target (such as the WatchKit app extension) invalidates the code signature of the WatchKit app.

This forces workarounds such as creating an aggregate target to generate a header file containing the version numbers, then using Info.plist preprocessing to get the version number into CFBundleVersion. I've attached a sample project that implements this workaround to show how involved it is when a simple build phase script would do this in three lines.

Steps to Reproduce:
1. In Xcode, click a WatchKit app's target in the Project editor. 
2. Expect to see a "Build Phases" tab.

Expected Results:
I expect to see a "Build Phases" tab.

Actual Results:
No "Build Phases" tab is present. 

Since there is a requirement for WatchKit apps to use the same CFBundleVersion as the host app, I'd kind of expect that rule to be dealt with automatically. That would negate the need for these workarounds. 

OpenRadar note: Sample project here:


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at 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!