如何通过 Common Lisp 调用 iOS simulator 并交互?== 未解决

本文探讨了如何利用CommonLisp语言通过ECL for iOS工具集开发iOS应用,包括在iOS模拟器中启动和交互操作,以及如何利用CommonLisp与Objective-C集成开发iOS应用。

之前根据 CCL 的教程学会了如何在 Common Lisp 中调用 Cocoa 框架,编写 MAC 应用程序。


最近在考虑如何通过 Common Lisp 调用 Cocoa Touch 框架,开发 iOS 程序(iPhone/iPad),首先需要解决的问题就是如何在 Common Lisp 中启动 iOS 模拟器,并且建立起通信,进行交互(把写好的 APP 上传到模拟器中)。


虽然对于 iOS 高手来说没什么技术含量,不过确实是一个必须解决的问题(商业化的 Mocl 已经实现),准备慢慢搞定,这样,以后就可以直接使用 Common Lisp 来开发 iOS 应用了。


话说现在苹果最新发布的 swift 也支持 REPL 了,说明 Lisp 这座金矿还有太多值得挖掘的宝藏,为什么不直接用 Lisp 来开发 app 呢?


搜索了一下,找到下面这篇文档,准备先学习参考一下


原文如下:

地址:http://stackoverflow.com/questions/5770020/has-anyone-got-any-code-examples-of-ecl-lisp-for-iphone-development


The ECL for iOS distribution includes a code example of a Common Lisp application running on the iPhone.

The example is a Swank server, the backend for the SLIME and MCLIDE Lisp development environments (disclosure: I am the developer of the latter).

Following the steps in the readme will build the application and place it on your iPhone/iPad, or alternatively on the iPhone simulator that comes with Xcode. You can then connect to the iOS device using SLIME or MCLIDE, providing a REPL from which you can evaluate Lisp expressions directly on the device and interactively develop the app.

The code example in the init.lisp file runs on the device as the application starts. It currently loads the swank server and notifies the user with a text field, button and alert dialog. The ECL for iPhone project doesn't yet provide much user interface functionality from Lisp, but you can use the Xcode Interface Builder to design the GUI.

ECL compiles to C and supports inline Objective-C, so you can use Common Lisp as an abstraction layer on top or integrate Common Lisp implemented functionality with Objective-C code. The repository for the project includes examples of combining Common Lisp with Objective-C, including the implementation of basic widgets.

share|improve this answer

edited Apr 25 '11 at 6:01

answered Apr 24 '11 at 15:29

Terje Norderhaug
2,557918



add comment


转载于:https://my.oschina.net/freeblues/blog/283060

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值