1

In my understanding, it will be possible to work with Obj-C classes from Swift and write test cases much more quickly, and see the results in a playground project.

Does *.playground support including just a single class, like an .m/.h pair? How does it work? Do I need to compile this class separately, or is it done automatically?

jscs
  • 63,694
  • 13
  • 151
  • 195
Volodymyr B.
  • 3,369
  • 2
  • 30
  • 48

1 Answers1

1

Unfortunately, a pure playground allows to import only Cocoa framework (for now, at least).

If you want to import other modules, you need to create a playground file inside an existing project. That way, the underlying Swift code inside the playground can access your symbols.

Reference: Does swift playground support UIKit?

Community
  • 1
  • 1
akashivskyy
  • 44,342
  • 16
  • 106
  • 116