Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I include my app as a module in a 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

like image 517
niklassaers Avatar asked Nov 09 '22 03:11

niklassaers


1 Answers

Unfortunately, Playground comes with below limitations:

  1. Playground cannot be used for performance testing.
  2. Does not support User Interaction.
  3. Does not support On-device execution.
  4. Does not support custom entitlements.

Personally, I would want to see 2 in action at least :)!

So, to answer your question, its not possible (at least at this point in time).

like image 163
Abhinav Avatar answered Nov 14 '22 21:11

Abhinav