Live data from Hacker News

RoboVM: Native iOS apps in Java

robovm.org

21–30 of 64 posts

Re: RoboVM: Native iOS apps in Java

#21
post #18

Doesn't Apple's ToS prohibit writing apps in any language other than Objective-C? Or using other than Apple's tools?

No, a lot of games are C# (Unity) or Lua (Corona).

The thing they are understandably hissy about is downloading new scripts off the net and executing those, and they want to be sure that when they test something it's 100% representative of what the consumer experiences. (This gets really damn fuzzy when people want to do A-B testing in iOS apps). Not sure of the state of the fine print these days, but it's like many of these things where if you understand why they do it (not necessarily agree with it) it's not too hard to work within that framework. As a consequence if you even look like you might be executing arbitrary code they might reject you.

Re: RoboVM: Native iOS apps in Java

#22

I have just finished porting my Android game Superior Tactics ( https://play.google.com/store/apps/details?id=org.jrenner.su... ) to iOS using RoboVM. It's amazing to me that I can write my game completely in Java and get a performant AOT compiled version that runs on iOS. RoboVM really is amazing for indie game devs, and it's open source. I've already donated around $300 to the project. I've also done tests to see i…

I'm curious : what parts of your game code were you able to reuse on the ios version ( apart from obvious things such as the game logic itself) ? Network ? Opengl libs ? Sound libs ?

Re: RoboVM: Native iOS apps in Java

#24
post #18

Doesn't Apple's ToS prohibit writing apps in any language other than Objective-C? Or using other than Apple's tools?

No.

They prohibit on-device dynamic native code generation (ie. no JIT and no interpreters that attempt to mark memory as executable).

They also (generally) prohibit interpreters that download code from the network and execute it.

If you're doing a workflow like: non-ObjC language -> llvm -> native code, Apple has no problem with that generally (currently).

They just want to make sure that the executable code that ships in your iOS app is all they have to worry about, that it can't generate access to system libraries/routines that were not present when submitted to them.

This is why things like Pythonista and LuaBox are in the store currently, in addition to many apps written in other languages with other IDEs (Xamarin, etc.)

Re: RoboVM: Native iOS apps in Java

#25

I have just finished porting my Android game Superior Tactics ( https://play.google.com/store/apps/details?id=org.jrenner.su... ) to iOS using RoboVM. It's amazing to me that I can write my game completely in Java and get a performant AOT compiled version that runs on iOS. RoboVM really is amazing for indie game devs, and it's open source. I've already donated around $300 to the project. I've also done tests to see i…

What are you using for a game framework? libgdx?

Re: RoboVM: Native iOS apps in Java

#26
post #18

Doesn't Apple's ToS prohibit writing apps in any language other than Objective-C? Or using other than Apple's tools?

No. They prohibit on-device dynamic native code generation (ie. no JIT and no interpreters that attempt to mark memory as executable). They also (generally) prohibit interpreters that download code from the network and execute it. If you're doing a workflow like: non-ObjC language -> llvm -> native code, Apple has no problem with that generally (currently). They just want to make sure that the executable code that sh…

Yep. These are the relevant lines from the policy:

2.7 Apps that download code in any way or form will be rejected 2.8 Apps that install or launch other executable code will be rejected

And I suppose this covers use of W^X / mprotect:

2.5 Apps that use non-public APIs will be rejected

Re: RoboVM: Native iOS apps in Java

#27

Is a Mac needed in order to compile?

You may be able to get it to work on other systems if you copy / port some of the necessary Apple bits. You'd have to copy the iOS SDKs from Xcode and get ld64 [0] / codesign [1] (both open source) to build on non-Mac machines. Perhaps some resource file prep tools as well. Then you could use libimobiledevice [2] and friends to push apps to the phone and debug them.

[0]: http://www.opensource.apple.com/source/ld64/ld64-136/ (unfortunately the last source release is from Xcode 4.6, 2 releases behind current)

[1]: http://www.opensource.apple.com/source/security_systemkeycha...

[2]: http://www.libimobiledevice.org/

Re: RoboVM: Native iOS apps in Java

#28
holy crap!

I've avoided iOS because Objective-C scared me and I stuck to Android. I have some pending questions before I use this however.

1) How much code share can there be between Android and iOS? Is it just limited to business logic like Xamarin?

2) Can you use an Android game engine, create the game in Android and build for iOS?

3) In order to create and run iOS simulator, do you need to be on the mac and have Xcode? Any way to do it on a non-Mac machine?

4) Can you use RoboVM to create Android and iOS at the same time?

Amazing stuff!

Re: RoboVM: Native iOS apps in Java

#29

I have just finished porting my Android game Superior Tactics ( https://play.google.com/store/apps/details?id=org.jrenner.su... ) to iOS using RoboVM. It's amazing to me that I can write my game completely in Java and get a performant AOT compiled version that runs on iOS. RoboVM really is amazing for indie game devs, and it's open source. I've already donated around $300 to the project. I've also done tests to see i…

what tools did you use to create your game assets?

Re: RoboVM: Native iOS apps in Java

#30
post #17
post #11

Earlier quoted context omitted.

Also, I want to understand how its creator monetarize this? Or it is just a no-profit project? Anyway I'm happy to see competion against xamarin. Now I only want also a javascript to native (and not just webview-running) for any platform

If you browse the RoboVM website, you'll find that you can (or will soon be able to) buy a support subscription. As for a JavaScript to native compiler, check out Appcelerator Hyperloop [1]. It's currently experimental. [1] https://github.com/appcelerator/hyperloop

are there any other JavaScript to native compiler projects in the works? last time I heard there was llvm.js or something like that was doing the same thing as hyperloop.
Post reply on HN