Spaces in a project name results in "No such module ..." and "... no such file" problems

Originator:vegather
Number:rdar://22837865 Date Originated:24-Sep-2015 07:07 PM
Status:Duplicate(16299195) Resolved:-
Product:Developer Tools Product Version:Xcode Version 7.0 (7A220)
Classification:UI/Usability Reproducible:Always
 
Trying to import 3rd party frameworks to an Xcode project that has spaces in its name, will result in "No such module ..." errors in Swift, and "... file not found" errors in ObjC. The reason for this is that Xcode splits the project name into several entries in Build Settings->Framework Search Paths, as shown in the first attachment (Screen Shot 2015-09-24 at 15.10.06.png). The current solution is to change it back to one entry, but include a '\' before every space, as shown in the second attachment (Screen Shot 2015-09-24 at 15.10.38.png). The third attachment (Screen Shot 2015-09-24 at 15.36.02.png) shows the import statement BEFORE the fix, and the fourth attachment (Screen Shot 2015-09-24 at 15.37.01.png) shows the import statement AFTER the fix.

Steps to Reproduce:
1. Create a new Xcode project that has spaces in its name, like "Project With Spaces"
2. Import a 3rd party framework (Like Facebook's Bolts) by dragging and dropping it to the project (make sure "Copy items if needed" is ON)
3. Try to import the framework in Swift with "import Bolts", or in ObjC with "#import <Bolts/Bolts.h>"

Expected Results:
Expecting that the framework to be successfully imported and is ready to be used. Also expecting to see the project folder properly entered in the Framework Search Paths in Build Settings. In my case it should be "$(PROJECT_DIR)/Project With Spaces".

Actual Results:
Getting a "No such module ..." error message in swift, and a "... file not found" error message in ObjC.

Version:
Xcode Version 7.0 (7A220)

Notes:
The current workaround is to go to Build Settings -> Framework Search Paths, remove the extra entries added by Xcode, and change the "$(PROJECT_DIR)..." entry back to ending with the project name, but this time with a '\' appended before each space.

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!