On 2011-03-15, at 3:26 AM, mikel evins wrote:

> 
> On Mar 15, 2011, at 1:36 AM, Marc Feeley wrote:
> 
>> For those interested in using Gambit on the iPhone/iPad/iTouch, I have created an example (examples/iOS) which shows how to do it.
> 
> Marc, what's the best approach to using this new development? Just grab the latest sources, or await a release?

On a Mac with XCode 4.0 installed:

% curl "http://www.iro.umontreal.ca/~gambit/download/gambit/v4.6/source/gambc-v4_6_0-devel.tgz" > "gambc-v4_6_0-devel.tgz"
% tar zxf gambc-v4_6_0-devel.tgz 
% cd gambc-v4_6_0-devel
% ./configure --enable-single-host
% make -j 2
% make update
% cd examples/iOS
% make examples
% ./build-gambit-iOS
% open GambitREPL.xcodeproj

Then in XCode in the upper left corner of the main window, select the Scheme "GambitREPL-simulator | iPhone 4.3 Simulator" and click "Run".  This will compile Gambit REPL and execute it in the simulator.  In the Gambit REPL splash screen, click the "Edit Scripts" button, then scroll down to the last script, and click its "Run" button.  You can then telnet into Gambit REPL from a shell on your Mac using "telnet localhost 7000" (if it was a real device you would replace localhost with the device's IP address which you can get in the "Settings" app).

Have fun!

Marc
Hi Marc,

I couldn't get this to work with Gambit 4.6.0, but *was* successful using your instructions and the Gambit 4.6.1 development release. 

I used XCode 4.0.2 to build. The REPL runs on both the simulator and an iPad 2 running iOS 4.3.2. The iPad is not jailbroken - I have an Apple developer account with provisioning certificates. 

I enabled "Edit Scripts" within program.scm. The scripts all worked, I was able to add and run my own scripts, and I was able to telnet into the REPL on both the simulator and the device.

Regards,

Keith