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,095
  • 13
  • 148
  • 192
Volodymyr B.
  • 3,249
  • 2
  • 28
  • 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
  • 42,583
  • 16
  • 106
  • 114