How do I include my app as a module in a Swift Playground?

时间:2015-10-06 08:55:37

标签: ios xcode swift-playground

I'd like to experiment a bit in a Swift Playground, and in my experiment I want to use parts of my app. Specifically I'd like to instantiate some views and view controllers.

In this example, my app is called NJSTest. I add a playground, and write "import NJSTest". But Xcode says "No such module 'NJSTest'".

How can I include my app as a module in a playground?

(note, I don't want to break out the app parts as a framework by itself that I then import in my app and playground because I would like my app to be compatible with iOS 7)

Cheers

Nik

1 个答案:

答案 0 :(得分:1)

不幸的是,Playground有以下限制:

  1. 游乐场不能用于性能测试。
  2. 不支持用户互动。
  3. 不支持设备上执行。
  4. 不支持自定义权利。
  5. 就我个人而言,我希望至少看到2个:)!

    所以,回答你的问题,这是不可能的(至少在这个时间点)。