I have a problem creating a Swift Cocoa Touch Framework. As soon as I add my first .swift file, clean, then build I get a build error:
<unknown>:0: error: could not build Objective-C module 'MyTextFramework'
This is easily reproducible from scratch in just a few steps using Xcode 6.1.1
- Create new Cocoa Touch Framework using Swift Language
- Add an iOS swift file
- Build - OK
- Clean - OK
- Build - ERROR
- From here on the project will not build unless I delete the swift file.
I've tried the typical Xcode magic such as deleting derived data, restarting Xcode, etc.
Steps detailed below with screenshots:
File > New > Project > iOS Framework & Library > Cocoa Touch Framework

Product Name: MyTextFramework
Language: Swift

I now have a bare bones Cocoa Touch Framework.

Add an iOS Swift file named FooBaz.swift
Add a class that extends NSObject and an init function.
The target still builds fine at this point.

Cmd-K to clean the project
Cmd-B to build again... BAM
