All Manuals > LispWorks User Guide and Reference Manual > 17 iOS interface


17.1 Delivering for iOS

The Lisp part of the application needs to be delivered using one of two special images:

There is an example script examples/ios/ which can be used to invoke both of these images in sequence with the same command line arguments.

These images do not contain the GUI part of LispWorks, but do contain all the non-GUI parts.

There are no iOS-specific Lisp functions required to build the Lisp part of an application: you use deliver in the normal way. The only difference compared to a desktop application is that the file passed to deliver should have a ".o" extension and the generated file will be an iOS object file that must be linked with the other parts of the application using Xcode. Generation of shared libraries is not supported (this is a limitation of iOS).

To include the delivered object file in an Xcode project, add the file to the project using the File > Add files to <project>... menu item. Xcode should detect this as a file of type "Object Code".

If you want to run the same Xcode project with both the iOS Simulator and a real device, then you can conditionalize the filename passed to deliver to create two different files. For example,

(deliver 'init-othello-server
          (format nil "OthelloDemo/OthelloServer-~A.o"
                  #+arm "armv7"
                  #+x86 "i386")
         :keep-symbols '(othello-server))

Then add both OthelloServer-armv7.o and OthelloServer-i386.o to the Xcode project. Building the project will result in a warning

ld: warning: ignoring file
/Users/developer/Documents/OthelloDemo/OthelloDemo/OthelloServer-armv7.o, file
was built for armv7 which is not the architecture being linked (i386):

(or vice versa for armv7 and i386). This warning can be ignored.

LispWorks User Guide and Reference Manual - 13 Feb 2015