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

▼魔方 西西 提交于 2019-12-03 16:42:16

之前根据 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


易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!