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

NextPrevUpTopContentsIndex

17.1 Delivering for iOS

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

There is an example script examples/ios/run-lw-ios.sh which can be used to invoke all 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 or build for 32-bit and 64-bit devices then you can conditionalize the filename passed to deliver to create four different files. For example,

(deliver 'init-othello-server
         (merge-pathnames 
          (format nil "OthelloDemo/OthelloServer-~A.o"
                  #+arm "armv7"
                  #+arm64 "arm64")
                  #+x86 "i386")
                  #+x86-64 "x86_64")
          *project-path*)
         0
         :keep-symbols '(othello-server))

Then add OthelloServer-armv7.o, OthelloServer-arm64.o, OthelloServer-i386.o and OthelloServer-x86_64.o to the Xcode project. Building the project will result in warnings such as

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):
/Users/developer/Documents/OthelloDemo/OthelloDemo/OthelloServer-armv7.o

These warnings can be ignored.


LispWorks User Guide and Reference Manual - 20 Sep 2017

NextPrevUpTopContentsIndex