On Sep 9, 2011, at 4:19 PM, Mikael wrote:
Hi Mike, I think there's a general interest on the list for knowing how to do either of these. If you would want to give an introductory idea of how this is done I'm sure it'd be appreciated. Kind regards, Mikael
As a first step, here's a simple example with a Makefile that can build executables for iOS or for the iOS simulator:
https://files.codebasehq.com/upload/84813b88-8192-6721-b1be-ed6c20ee9df7/ori...
This is not a complete solution. I've posted it because it may prove useful for someone wanting to figure out how to make a Makefile to build Gambit programs for iOS or the iOS Simulator.
The current version of Amphora does not do everything you would need to build and install a working iOS app. It simply builds executable programs for iOS and the iOS simulator from Scheme (with a bit of embedded Objective-C).
To do a full build, i.e. to make an app that can be installed and run on an iOS device or simulator, you'd need to add some more bits:
- you need a Make rule to build nibs from xibs; here's an example that works for one of our projects:
ibtool ./Contents/Resources/English.lproj/MainMenu.xib --compile ./${BUNDLE}/Contents/Resources/English.lproj/MainMenu.nib
- you need to add a rule to create the application bundle:
mkdir -p ./${BUNDLE}/Contents/Resources/English.lproj/ mkdir -p ./${BUNDLE}/Contents/MacOS
- you need to add a rule to copy the Info.plist and other resources into the bundle
- if you want to use nibfiles, then you need to add rules to compile them. For example:
ibtool ./Contents/Resources/English.lproj/MainMenu.xib --compile ./${BUNDLE}/Contents/Resources/English.lproj/MainMenu.nib
If you don't want to use nibs, then you need to write code to build the UI programatically. That's doable, but I think a bit too involved to include in a note like this.
- you'll need to codesign the executable. Apple provides the codesign command-line tool for this purpose, and I've successfully used it to help a colleague prepare a game (written in Python) for the App Store.
I may add more to Amphora if there's demand for it.