Is it possible to do program开发者_如何转开发ming using iPhone? Any idea?
Actually this could be one of two questions:
is it possible to program for the iPhone -- yes it is, although to do it legally you need a Mac and a Apple Developer licence for $99.
can you program ON an iPhone -- yes, although the screen-size is a pain... although I did that once fixing a bug via SSH ;>
The answer is yes, depending on what sort of idevice you have. You can do both client-side and server-side javascript programming using only an ipad. (I haven't tried the iphone, but I'll make the dangerous assumption that the techniques I use work on the iphone as well.)
For a full web-development stack, you're restricted to using javascript and node.js, (I haven't gotten RAILs working on the command line, although it is possible to use straight-up ruby.) So to get javascript and node.js working, here's what you do.
Step 1: Jailbreak your iDevice.
Step 2: open Cydia. Install the following packages:
MobileTerminal- this installs the command line terminal you will run Node.js from.
Node- this installs Node.js
Vi iMproved- this is your code editor.
Backgrounder- this allows multiple apps to run in the background of your device. This is especially necessary when working with the Terminal, because you don't want to shut down your session every time you go to another app.
Git- You can also install git if you want to version-control your stuff.
Voila! you can now do server side programming on your i-device. I'm halfway through the programming tutorial Node Beginner Book and have had no problems running everything on my ipad. See http://www.nodebeginner.org/
For client-side programming, you can program in javascript using the excellent code editor Textastic, which allows you to preview your javascript code and save it to dropbox. There's an iphone version as well, although it does not work on older devices. If you want to program in javascript on your iphone, use the very very simple-minded program JSAnywhere. It lets you program one html page, one css page, and one javascript page in a single program at a time, which is just fine for making small javascript toys.
For other programming languages, ruby is available through cydia as a command line interpreter, although I haven't been able to get RAILS working. Python is also available, and long ago and far away I did manage to install gcc and run c code on my iphone, although I had the help of an expert and now I don't remember how to do it.
So. In short, it is possible to do a few different programming tasks on the iphone. A word of warning- programming with the ipad on the terminal is very very slow. As far as I know, there is no way to paste from the system buffer into the terminal, so you have to type everything out by hand. On the other hand, typing everything in by hand makes you learn it a lot better, so I've found that little problem rather useful. The ipad also makes it impossible to have more than one window open at once, so you really concentrate on your coding.
There are a couple of apps that will allow you to program by sending ONLY ONE source file to a server which then executes the program and displays the output. It is very limited and cannot handle the loading of images or anything external of the app. I believe that Apple is trying to prevent any app from allowing you to do that in the iPhone.
Yes it is. As for ideas, try Googling "iPhone programming".
If you meant, write programs on the iPhone itself, you are almost certainly out of luck, since Apple doesn't like interpreters running on their phones.
精彩评论