Importing ObjC into Swift
Importing ObjC into Swift
- Subject: Importing ObjC into Swift
- From: Roland King <email@hidden>
- Date: Thu, 19 Jun 2014 09:50:32 +0800
I'm trying to drag in a few of my ObjC classes to a new Swift project I'm failing to write. The "Using Swift With Cocoa And Objective-C" document states
Importing Objective-C into Swift
To import a set of Objective-C files in the same app target as your Swift code, you rely on an Objective-C bridging header to expose those files to Swift. Xcode offers to create this header file when you add a Swift file to an existing Objective-C app, or an Objective-C file to an existing Swift app.
I've tried adding existing files, adding existing files with copy, adding a new Objective-C file. In no case did Xcode offer to create a header file. I can probably make one by hand and add it to the settings but if it's supposed to do it automatically then I'm not sure why it doesn't and thus whether I've bungled something else.
Anyone make this work yet? |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden