Clojure iOS Development - ios

Over the past months, I've pretty much fallen in love with Clojure and refuse to use anything else.
I am aware that there is ClojureScript, which uses Google Closure to compile a subset of Clojure to JavaScript.
Is there anything similar in the works for Objective-C/Cocoa?
I would love to be able to prototype applications in Clojure, and then get an iOS app out of it.
[I'm perfectly fine if this prevents me from all the low level details of iOS -- I don't need access to any low level details (say pointer arithmetic) that I can't do in Java -- I just want to be able to easily transform my Clojure Apps onto the iOS]

You can run clojure on iOS by compiling clojure to scheme, https://github.com/takeoutweight/clojure-scheme

There's one more option (warning: haven't tried it yet):
https://github.com/oakes/lein-fruit
This Leiningen plugin translates Java bytecode to native code for iOS. And there's even IDE that has it built-in:
https://github.com/oakes/Nightcode

I've just discovered las3r which is a Clojure port to the ActionScript (the language behind Flash) runtime. Since Flash/ActionScript can now develop for iOS (I'm in the process of writing a game right now. It's not wonderful, but it's quite usable), this may present a path to writing Clojure applications for iOS.
DISCLAIMER: I haven't tried this. I've just barely discovered las3r, haven't even downloaded it. and have no idea if it's good or terrible. I don't know how awful the speed will be. I know nothing.
Still - it's an intriguing idea, isn't it?

There is Re-Natal a simple command-line utility that automates most of the process of setting up a React Native app running on ClojureScript.

Related

How can I create hybrid apps on IOS?

I see on Android that apps exist to create android apps. I understand nothing like this exists on IOS because of apple's terms. On IOS however, some apps, pythonista for example, allow the user to create scripts that run similar to apps. Is this functionality currently available for hybrid frameworks, IE phonegap/cordova, react native, etc? Barring this, is there some method whereby I can code and test such apps on my iPhone/iPad?
Bottom line, I want to code apps while commuting, etc, on IOS. I understand I need a computer to compile the final product, that's ok, it's just the coding/testing process I want to do on IOS.
I am up for any hack you can think of to make this work, so long as it is accessible with VoiceOver, apple's screen reader, as I cannot see at all. One example of something I thought of that won't work is using remote desktop software, there is no such software that is accessible as it uses an image of the remote screen, I have no access to this.
I am looking forward to your creativity, so far this has me stumped.
Thanks in advance.
Similar to the playgrounds answer, but if you wanted to use Xamarin you could use Continuous .NET. It’s a C# IDE for iOS. You could then use Working Copy to to keep the version on your computer in line.
The other option is to VNC into your computer at home, but if you’re on the train that might not be a great option.
It's not a solution for your problem, but if you have an iPad, you can write parts of apps in Swift Playgrounds. There you have access to all the UIKit stuff. Unfortunately some of the frameworks you can use in iOS are missing.

Can I code iPhone apps using Eclipse?

As you can probably guess, my knowledge of coding is very limited. Nonetheless, I do know a little Java. I have Eclipse and was wondering if I could use it to code for iOS iPhone/iPad applications. I know that I would almost certainly have to use a language other than Java, but I'm clueless as to what packages or plugins I would need to install in Eclipse to use it to code for iOS. If you guys could answer this question in extreme detail or link me to a very good sequence of video tutorials, I would be extremely grateful.
Yes you can!
If you can live with coding ActionScript, which should be easy to learn with a Java background, you can use Eclipse & AIR to code for iOS (and Android at the same time)
Some resources:
http://flex.apache.org/
http://labs.adobe.com/technologies/flashruntimes/
http://blogs.adobe.com/flashplayer/
http://flashdaily.net/
Be aware that many apps in the store have been build on this platform, and the community is pretty alive and supportive.
The short answer is, "not natively."
Apple pretty much restricts "native" iOS development to XCode which, as #Bob said in his answer, is only available for OS X. So that means no Eclipse or Java-based development. However, there are several cross-platform development frameworks and tools that work to varying degrees of quality. Here are a few, in no particular order:
PhoneGap
Appcelerator
Corona
Adobe AIR (see answer by #dogsgod)
There are others, but those are ones that I've at least heard of and might have tried a little bit. Some, like Appcelerator, have IDEs built on Eclipse, so at least the dev environment would be familiar.
IOS apps are written in Objective-C or Swift using XCode. (This also means you'll need a Mac to do so. XCode is only available for OSX.)
So unfortunately this means the answer to your question is no. You cannot use Eclipse to write an iOS app.

Is PlayN on iOS possible without licensing MonoTouch?

Following the instructions on the PlayN wiki I was able to get the "hello" PlayN sample running on the iOS simulator. However, when using MonoStudio, I was told that I need to upgrade to an Indie license or higher to compile the code. (Apparently I was using 33+ features which required it.) When I activated a trial edition, the sample compiled and ran fine on the simulator.
The PlayN wiki seems to indicate the you'd only need a license if you plan on testing on a real device. Is it wrong or am I missing something?
Also, I thought the idea behind PlayN was to build a free, open source game engine on top of free, open-source technology. Mono is both, but MonoTouch is neither. Is there another option or am I stuck with shelling out $1000/year to use iOS (which so far seems far from fully implemented on the PlayN side of things)?
Right now, there isn't. Sorry its disappointing, but its the nature of iOS. Its a very non-free platform.
Perhaps you can try your hands at writing a cross compiler, and release it under an opensource license? You can try basing it on http://gcc.gnu.org/java/.

Any way to use some Scala for iOS coding?

I want to be able to use Scala to code iOS programs. Any tools available for this ?
You can run JavaScript on iOS, so you could compile your Scala to JavaScript using Scala.js. This has obvious huge limitations - I wouldn't want to try to code actual native iOS UI - but might be practical for some cross-platform logic. Combining this with React Native might be interesting.
There's also Scala Native as of a couple months ago; that should probably run on iOS. It's not ready for production use, but keep an eye on it.
Well, now you can use RoboVM - a Java library for native IOS development
See also:
an SBT plugin for RoboVM https://github.com/roboscala/sbt-robovm
A blog post aboute Scala development for IOS http://ajhager.com/
Not today, but it may be close:
http://java.dzone.com/articles/oracle-gets-java-running-ios
http://www.oracle.com/technetwork/developer-tools/adf/overview/adf-mobile-096323.html
But, while Apple directly opposes the use of the JVM on iOS devices, it will make little sense to go that way (it's still early days). You will run into one obstacle after another, and won't have any guarantee that the code you write today, will run on the iOS of tomorrow.
Sit on the sideline with your Android, Ubuntu and popcorn, and let the big guys fight it out.
In the meantime.... you can write a thin front-end in PhoneGap (which works on most modern mobile devices), your services with Spray and have fun with your back-end in Scala.
I recently developed a toolchain based on IKVM and MonoTouch that allows you to develop iOS apps in Scala. I put together a demo of the toolchain here:
https://github.com/samskivert/ios-scala-demo
Currently Codename One doesn't have builtin support for Scala but it supports Kotlin reasonably well. There is a blog post here that covers the process of adapting Codename One to support other JVM languages. By doing that you can instantly get support for other platforms such as iOS, UWP, JavaScript/Web, Android & desktop mac/windows for free.
The core of Codename One which includes the VM's, API's and most of the tools is open source.

Node.JS Development on iOS?

I'm wondering if there is any chance to run Node.JS on iOS to develop as on desktop? I definitely realize I must have jailbroken iPad to install node or mongodb. The only I've found is good code editor Diet Coda with FTP/SSH support, but no more. How can I get node in "real" terminal on iPad, launching my .js files on certain port etc?
P.s. I'm not big fan of cloud9 'cause it's requires Internet connection and at this time supports only node 0.6
Found a so-so solution: connect to my server via ssh and develop my app in console. But it requires internet connection, that's not good.
A quick search reveals NodeJS on iOS.
The long story short is that I got NodeJS compiled on my jailbroken iPhone 4! It was a long quest to get it working properly but I've done the hard work and compiled a .deb file compatible with Cydia for your installing pleasure...
It's a year and a half old, so the article might be a little out of date, but it's definitely a good starting point. See also how to set up gcc if you need to do that on your iOS device.
Aside: If you're a rooted Android developer, you may be interested in anode.
I am working on an implementation of Node.js on non-jailbroken iOS devices.
http://www.youtube.com/watch?v=xzFH80-HYTo
It is not ready for a public consumption yet, but I am making a good progress and have a plan to open-source it soon.
You can use node.js on iOS without jailbreaking, and without violating any Apple
terms of service. LiquidCore is an open source project that enables node.js on both Android and iOS for deploying micro applications. iOS support is now available from version 0.5.0.
CodeSandbox for iOS works amazingly well, though it's not a console interface.
CodeSandbox for iOS offers a full-fledged development environment with all the tools you need to develop projects of any size. Create a sandbox to quickly prototype your ideas or work on a large codebase with CodeSandbox Projects: whatever your needs are we have you covered.
I've wondered how much work I could get in something like the IconFactory's WorldWideWeb. That company has been around a while, and WWW makes it easy to do work in a browser-hosted environment.
So CodeSandbox almost answers your question, and, if it disappears at some point, WorldWideWeb might be a fallback in a pinch.

Resources