One Quickie


Running swift code in LLDB (Swift->lldb)
(lldb) expr -l swift -- let $ook = "verb"
(lldb) expr -l swift -- print("I seem to be a ($ook)")
I seem to be a verb
And if you want to call your own stuff (say the project name is C-Interop):
(lldb) expr -l swift -- import C_Interop
(lldb) expr -l swift -- SomeClass().useAnother()
This creates a new instance of SomeClass and calls the useAnother method.

(Thanks to Zach Waldowski for this one.)



borkware home | products | miniblog | rants | quickies | cocoaheads
Advanced Mac OS X Programming book

webmonster@borkware.com