Is there any sort of programming environment that runs ON an IPhone? - iphone

I'm just recalling the days when Radio Shack used to sell pocket computers. (Many moons ago, w/ only a few K of memory.) They had the ability to write small programs on Pocket computer. Maybe it's just nostalgic, but I alway thought that was handy. (Through the fog of my memory.) Is there any capability like that for an Iphone?
Edit:
I can kinda understand not allowing a like a GameBoy emulator on the App-store, it's kinda like saying your ok with people loading "ROMs" and could get them in trouble. When you start profitting from an Emulator the license holders get pissy, just think about "Bleem" and Sony. Sony buried those guys. I suppose Javascript is better than nothing. What about Java in a sandbox? Or if they want something they aren't afraid is going to cannibalise there market, a BASIC interpreter.

I don't believe that you are allowed to in the terms of service for the App store. Isn't this why mono programs have to be staticly compiled if they are going up to the App store.

If you are looking to go off the beaten path, James Long's blog details how to run Gambit Scheme code on the iPhone. Load the application once and then load code changes progressively as needed.
In a following blog post, he details how to debug your applications remotely with an REPL. Very cool stuff. Between the simplicity of Scheme and the existing work he's done on his blog, a lot of the work/difficulty involved with developing in a "non-standard" way on the iPhone is taken care of for you. It's worth a shot!

Python is possible:
http://mail.python.org/pipermail/python-list/2008-November/686098.html

The only thing remotely close to that (without Jailbreaking) is Javascript/HTML in Mobile Safari.

While "on" your iphone is relative www.tilestack.com is a web based development environment that can produce webapps.

Terminal.app can be compiled for limited distribution (w/o jailbreaking). /bin/sh is a valid programming language. QED.

Yes, it is possible to set up a node.js programming environment that lets you run your own server on the iPad. It's also possible to run javascript using the textastic code editor. See Is it possible to do programming using iPhone?.

Related

Fortran Editor in iPhone

I want to make a Fortran editor in iPhone. User can code with Fortran in an iOS app and are also able to run that code on iPhone.
Can anyone guide me with correct approach?
I had a look to the gFortran, but its not available for ARM architecture.
Thankyou..
Apple doesn't allow for compilers or interpreters on the iPhone, but there technically isn't any reason you can't setup a server based compiler, that also allows users to run their compiled apps. In fact, there are multiple sites that already do just this, but it wouldnt be a good idea to write an app that points to their site or uses their services; you would need to setup your own service.
Not insurmountable, but I would move onto other app ideas.
Given Apple's snarly attitude about language interpreters running under iOS you're better off coding this as service that runs on a remote server, maybe with the editing part on the phone or tablet.
Updating this old thread for the sake of current and future searches:
Apple has changed their attitude over the past year or so. There are currently many interpreters available for iOS, including for Lua (https://itunes.apple.com/us/app/iluabox/id398073834?mt=8) and several for Python (https://itunes.apple.com/us/app/python-2.7-for-ios/id485729872?mt=8, http://itunes.com/apps/pythonmath).
One significant remaining restriction is that these apps may not load scripts from outside the app, for example, from Dropbox or iTunes file sharing. (This is part of Apple's efforts -- along with code signing and 100% app review -- to minimize malware.) Such apps are allowed to have an editor that allows the user to copy and paste code into the editor from outside the app.
As far as I know, there aren't any apps for compiled languages such as FORTRAN.
Meanwhile, FORTRAN compiler is available for iOS only as a jailbroken application.
[Disclaimer: I am the author of Python Math. Apple removed it from the store for a short time until I removed iTunes file sharing and "Open In..." capability. I then added a script editor.]

Are there any smartphones with good Python interpreter support?

I'm getting a new phone and I am looking to do some programming on it. Python is my language of choice, so I was wondering what phones have support for Python interpreters.
I know, I know, "you program too much already", yeah my girlfriend says that all the time too, but I can't help it.
I'll probably do a lot of on-the-go style simple debugging, and I'd like to also get into programming some simple custom apps to streamline my smartphone workflow.
I see there is support on Android through SL4A and Py4A but I couldn't figure out which version of Python it resembles. I also see that PyS60 on Symbian is available, based on 2.5.4. Also, there's a string of Python-iPhone threads starting here which were very informative but not very current. Lastly I found a cool youtube video of a guy doing something geeky in python on his iPhone.
Yes I am still researching on my own but I figured someone on SO might be able to give me a pointer in the right direction. Which of these options is halfway decent?
Does anyone know which of these is easiest to get started with? How about which is most powerful for development using the native smartphone capabilities? Anything
With regards to Py4A, in view of discussion at the link below, my guess would be Py 2.7.1, 2.7.2.
http://code.google.com/p/python-for-android/issues/detail?id=10&q=python
The Nokia n900 comes with Maemo 5 Linux, and can easily run a full Debian Linux for ARM. It's not locked down in any way. I have one (in the shop, really hope they can fix it) and it's great.
Python? Basically like using it on any desktop Linux distribution.

iphone python or perl processor, or similar

I have an application to develop but the problem is that is must download part of behavior as a list of instructions from a server.
Ideally it will download scripting code and execute it. The question is if there are any libraries to make it? For example, I have python script and I want to to execute it on device...
Any options?
thank you
Lua is very popular for games. You can embed Python, too. Apple won't enforce the "Objective-C only" clause unless you make it obvious that you use Python to script behavior. Do you think all the games on the store are scripted in Objective-C? No way. Just don't make your transgressions obvious and you'll be fine.
For security reasons, the app store does not allow apps containing programming languages capable of executing arbitrary code on the phone, so your app's market would be limited to users willing to jailbreak their phones to circumvent this restriction.
You could, depending on what you want to do, look at using the browser's JavaScript.

Do i have to buy mac for iphone application development?

Is there any MacOS virtual machine that can run on PC?
Is there any source to get it?
What is the best way to develop apps for iphone?
Yes all the developer tools are OSX only.
There are lots of iPhone development books out there go check out amazon and find one with some good reviews and that will get you started.
You might not, in the strictest terms, have to get a Mac to develop for iPhone; but it will be extremely helpful. Apple is relatively talented at squashing efforts directed towards Hackintoshes and virtual machines running OS X.
The shortest answer that will give you the least hassle is: Yes you need a Mac.
But, as far as I know there are a few possibilites, that try to reimplement some Cocoa Frameworks (however they might be Mac OS X only and not iPhone): GNUStep is an example.
But I don't think you get something aquivalent to Xcode (the IDE for iPhone development) this way.
And I think there are some OSX86 Virtual Machines (however these seem to be against Apple's EULA and thus seem to be clearly illegal so I won't point you anywhere to get them).
So to conclude - if you want to develop for iPhone: getting a Mac is the easiest way, even though not cheap.
Hope this helps.
The short answer is - yes.
One possibility for learning some of what you need to know before getting a Mac is GNUstep.
However, GNUstep is mainly useful for learning Objective C, especially since it provides many of the classes that the Cocoa toolkit for iPhone does. This can be run on Windows.
It doesn't, however, support some of the key 2.0 language features that are used 'all the time' in any sample code.
What it will allow you to do is design a UI using their UI designer GORM, and use a near-identical message-based system for implementing a UI, and you could theoretically write Objective C classes in GNUstep and then use them on iPhone.
However, to compile an app for iPhone you basically need to have a Mac, because then you can get the key for signing an app, etc. Since you need to get a Mac at some point, there's really little point in going the much harder route of using GNUstep first and learning a more limited implementation, unless you really need to get started before funds are available.
Despite the new SDK terms that can other programming languages, if you're really wanting to start without a Mac, I'd probably be tempted to look at something like Unity, or perhaps even Appcelerator Titanium, and figuring out all the non-platform-specific logic first on whatever platform (Unity has a free version that can be run on Windows, for example).
I'm not that big a fan of xcode, but is is far and a way the best IDE for Objective C development simply because there's almost nothing else out there.
There are, as always, other options. If you do a web app type project, you can implement the website and test a lot of it in a browser. Furthermore, since Android and iPhone browsers are both WebKit based, you can use the free Android SDK to see what pages look like on a comparable mobile device. And since you can use C and C++ classes as well as Objective C (N.B. not for the GUI, since that needs the Objective C extensions for messaging between objects), another option for making a start without a Mac would be to use Eclipse, QT Creator or some other C/C++ IDE to implement non-GUI classes, so long as you make sure you don't use platform-specific libraries.
But the end of the long answer is still that whatever you do, to compile a proper iPhone app you'll be using xcode and associated tools to finally build it and sign it, and so you need a Mac in the end. If you want to create something targetting the iPhone and won't have access to a Mac, then perhaps you're best off looking at creating an iPhone-adapted website using iui or a similar toolkit to give the site a suitable look and feel.

How does Apple know you are developing iPhone apps on MacOS?

I know there is a requirement in their EULA, but I heard about people getting their apps developed on Windows into the app store.
How can Apple find out, or do they even know?
They don't, so if you get a native compiler and toolset up and running on Windows, more power to you.
But realize that:
You will not be able to use a language that compiles to bytecode (that's Java, C# and the .Net languages, Perl/Python/Ruby, etc.). Apple will most likely not allow any sort of interpreter through the App Store.
Chances are your tools will not contain an Interface Builder equivalent or an iPhone Simulator equivalent. You're going to be writing a lot of code and spending a lot more time testing.
You won't have local documentation. You'll either have to use Apple's website or rely on third-party documentation which may mix App Store-allowed and -forbidden methods without indicating which are which.
You won't have Xcode's editor, which is highly specialized for Objective-C. You'll have to type a lot more.
You won't be able to get help as easily since you're not using the same tools as others.
You will never know when a bug is in your code, your tools, or your platform. People using the official SDK can file bug reports on the tools just as easily as the platform.
Your tech support incidents are worthless, because you're violating your contracts.
If Apple ever does find out, you're likely to be kicked out of the App Store and all your work will be for nothing. Unless you're an idiot, this thought will worry you.
If you're a hobbyist, these may be acceptable to avoid paying $400 for a used Mac mini, but if you're not a hobbyist...this is no way to run a business. Pick up a used Mac and think of all the money you're not spending on a factory, a store, offices, inventory, or employees during your setup time.
There is no sdk available for Windows. XCode only works on Mac OSX, how would one compile, test, and run the app if not on Mac OS X?
I dont think they know. There's no official SDK for the PPC architecture, but some simple installer hacking yields a working binary for my Powerbook. Similarly, if you get your code working on Windows, more power to you...