Xcode 9 beta 4 adds swift source file to incorrect build phase when move it from iOS app target to framework target.

Originator:azeffin
Number:rdar://33577678 Date Originated:July 28 2017 1:07 AM
Status:Closed Resolved:fixed in Xcode 9 GM
Product:Developer Tools Product Version:Xcode 9 beta 4 (9M189t)
Classification:Other bug Reproducible:Always
 
Summary:
Xcode 9 beta 4 adds swift source file to Headers build phase when move it from iOS app target to Cocoa Touch Framework target. Xcode should add moved file to Compile Sources build phase.

Steps to Reproduce:
1. Create new iOS project in Xcode 9 beta 4 with Single View App template.
2. Add new Swift source file to created app.
3. Add new Cocoa Touch Framework target.
4. In Project Navigator move (drag and drop) file created in step 2 to target created in step 3.

Expected Results:
Moved file is added to Compile Sources build phase and compiles.

Observed Results:
Moved source file is added to Headers Build Phase and does not compile during build.

Version:
Xcode Version 9.0 beta 4 (9M189t)
macOS Sierra 10.12.6 (16G29)

Notes:
Select moved file in Project Navigator and open File Inspector. Target Membership section has correct box selected (i.e. framework target is selected, app target is not). If uncheck and check it again file correctly added to Compile Sources build phase.

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!