jerrymarino / SwiftPlayground.vim

Play with Swift code in Vim!
Other
38 stars 2 forks source link

iOS compilation & execution #1

Closed jerrymarino closed 7 years ago

jerrymarino commented 7 years ago

By default, the playground is compiled and executed under OSX. It should be able to build run for both iOS and OSX.

Read in the contents.xcplayground to determine an iOS ish invocation. Execute the program under the simulator for iOS.

xcplayground stores the playground type in it's XML file which can be used to derive a base compiler invocation:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<playground version='5.0' target-platform='ios'>
    <timeline fileName='timeline.xctimeline'/>
</playground>

Note: simctl spawn will allow execution of the program in the background without booting up a simulator instance, so prefer this to save time