Any way to use some Scala for iOS coding?

2020-02-26 04:09发布

I want to be able to use Scala to code iOS programs. Any tools available for this ?

标签: ios scala
5条回答
Animai°情兽
2楼-- · 2020-02-26 04:23

Not today, but it may be close:

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.

查看更多
我只想做你的唯一
3楼-- · 2020-02-26 04:31

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

查看更多
老娘就宠你
4楼-- · 2020-02-26 04:40

Well, now you can use RoboVM - a Java library for native IOS development

See also:

查看更多
不美不萌又怎样
5楼-- · 2020-02-26 04:42

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.

查看更多
▲ chillily
6楼-- · 2020-02-26 04:44

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.

查看更多
登录 后发表回答