Question: I'm attempting to use Swift classes in my Objective-C code, however my Swift classes don't seem to appear in the generated header. As a result, my build fails with "Use of undeclared identifier 'HelloWorld'".

I used the templates to create a project called TestApp.

I have the following Build Settings in my target:

* Product Name : TestApp
* Product Module Name : TestAppModule
* Defines Module : Yes

Apple's documentation says to use `#import <TestApp/TestAppModule-Swift.h>` but this doesn't work.

Instead, I'm using `#import "TestAppModule-Swift.h"` in my ".m" file. It seems to find this.

I'm able to navigate to it, and it looks like this...

```
// Generated by Swift version 1.0 (swift-600.0.34.4.5)

#if defined(__has_include) && __has_include(<swift/objc-prologue.h>)
# include <swift/objc-prologue.h>
#endif

...etc...

```

but no classes defined in there.

I have a Swift file in the project that looks like this...

```
class HelloWorld {    
    func hello() {
        println("hello world")
    }
}

```

Why isn't this working using the standard header file location `#import <TestApp/TestAppModule-Swift.h>`? 

How can I get my swift classes in that header file, so I won't get the "undeclared identifier" error?

Answer: 
It is proper to use `#import "TestAppModule-Swift.h"` in your .m files. If you need to reference a class in a .h, use the `@class` forward declaration.

Further, if you want to use a Swift class from Objective-C, the Swift class must be marked with the `@objc` attribute. Xcode will only include classes with that attributed in the generated header. See also [this documentation](https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html#//apple_ref/doc/uid/TP40014216-CH10-XID_75).
Class should be declared as @objc **public** class