2

I was happy to see the new @import directive in Objective-C, but I lived under the impression it could not be currently used to import custom frameworks (one source). But I have just created a custom Cocoa Framework in Xcode 6 (are these supported now?) and I can @import it just fine. What gives?

Community
  • 1
  • 1
zoul
  • 102,279
  • 44
  • 260
  • 354

2 Answers2

2

Yes you can use @import in Xcode 6. From New Features in Xcode 6 Beta:

User-defined modules. Developers are now able to define modules for their own Objective-C code, making it easier than ever for them to share frameworks across all their projects. By combining user-defined modules with Swift’s automatic creation of modules, the two languages work together seamlessly.

zoul
  • 102,279
  • 44
  • 260
  • 354
ujell
  • 2,792
  • 3
  • 17
  • 23
1

There are more details in the WWDC 2014 video "What's New in LLVM", page 25 of the PDF:

http://devstreaming.apple.com/videos/wwdc/2014/417xx2zsyyp8zcs/417/417_whats_new_in_llvm.pdf?dl=1

Gabriel
  • 964
  • 9
  • 8