*-Swift.h file not found in framework umbrella header file
| Originator: | phillips1988 | ||
| Number: | rdar://18955574 | Date Originated: | 12 November 2014 |
| Status: | Behaves correctly | Resolved: | |
| Product: | Developer Tools | Product Version: | |
| Classification: | Serious Bug | Reproducible: | Always |
Summary: When developing a Swift framework, when importing the -Swift.h bridging header file in the framework umbrella header file: • If I change from building for a simulator to device or vice versa, the umbrella header file will throw an error that the -Swift.h bridging header file is not found. • If I clean the build folder, the -Swift.h bridging header file is never found. After cleaning the build folder, I must remove the -Swift.h bridging header file import in the framework umbrella header file, then build and add the import back for Xcode to resume building with the -Swift.h bridging header import file. Steps to Reproduce: 1. Create a new framework project and choose Swift as the language 2. In the umbrella header file of the new project, add an import for the -Swift.h bridging header file 3. Hit build. Xcode builds successfully. 4. Change the active scheme to target a simulator (if it was targeting a device), or a device (if it was targeting a simulator). 5. Hit build. Xcode build will fail. The error will be *-Swift.h file not found. 6. Change the active scheme back to how it was in step 3. 7. Hit build and Xcode builds successfully. 8. Now clean the build folder (Product > press alt > Clean Build Folder). 9. Try to build the project for both a simulator and a device. Xcode will never build successfully. 10. In the framework umbrella header file, comment out or remove the import of the -Swift.h bridging header file. 11. Hit Build. Xcode builds successfully. 12. Undo step 11 (add back the import) 13. Build. Xcode builds successfully. 14. Redo step 4.... Expected Results: The -Swift.h bridging header file is generated automatically and dynamically by Xcode. I expect this file to be built optimally and always be available when I build my project. Actual Results: Xcode doesn't seem to generate the -Swift.h bridging header file for different architectures even when changing from simulator target to device. Additionally if the build folder is cleaned or removed, Xcode doesn't seem to realise that the -Swift.h bridging header file needs to be regenerated until the next time the project is built successfully (which means that in a normal use case it won't ever build successfully because the umbrella header file is importing the -Swift.h bridging header file). Version: Xcode 6.1 (6A1052d)
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!