www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Is compiling for Android/iOS possible?

reply Timothy Foster <timfost aol.com> writes:
I'm just wondering if I made an application for Windows/Mac/Linux 
if I could get it to also work on mobile devices, or would I have 
to rewrite the application in another language to get it to work? 
If it's possible, what should I be looking at to get something 
like a "Hello World" example to show on my phone using D?
Sep 06 2017
next sibling parent =?UTF-8?Q?Ali_=c3=87ehreli?= <acehreli yahoo.com> writes:
On 09/06/2017 11:34 AM, Timothy Foster wrote:
 I'm just wondering if I made an application for Windows/Mac/Linux if I
 could get it to also work on mobile devices, or would I have to rewrite
 the application in another language to get it to work? If it's possible,
 what should I be looking at to get something like a "Hello World"
 example to show on my phone using D?
Joakim has "D for Android beta": http://forum.dlang.org/thread/antajtnvmavswjvcdoyq forum.dlang.org The documentation: https://wiki.dlang.org/Build_D_for_Android Ali
Sep 06 2017
prev sibling next sibling parent bitwise <bitwise.pvt gmail.com> writes:
On Wednesday, 6 September 2017 at 18:34:28 UTC, Timothy Foster 
wrote:
 I'm just wondering if I made an application for 
 Windows/Mac/Linux if I could get it to also work on mobile 
 devices, or would I have to rewrite the application in another 
 language to get it to work? If it's possible, what should I be 
 looking at to get something like a "Hello World" example to 
 show on my phone using D?
For iOS, there's this: https://github.com/smolt/ldc-iphone-dev I'm not sure if it's production ready though.
Sep 07 2017
prev sibling parent Joakim <dlang joakim.fea.st> writes:
On Wednesday, 6 September 2017 at 18:34:28 UTC, Timothy Foster 
wrote:
 I'm just wondering if I made an application for 
 Windows/Mac/Linux if I could get it to also work on mobile 
 devices, or would I have to rewrite the application in another 
 language to get it to work? If it's possible, what should I be 
 looking at to get something like a "Hello World" example to 
 show on my phone using D?
Backend code that does most of the work, ie your business logic, should work fine in D on mobile devices. For the frontend, I don't know of a good touch-enabled GUI that you could use in D though. If you're okay with doing your GUI in the native language, ie Java on Android, then calling D for the backend, that will work. There has been some preliminary work on getting a D GUI library, DlangUI, working on Android, but my understanding is that it isn't touch-optimized: http://forum.dlang.org/thread/cdekkumjynhqoxvmgjze forum.dlang.org Ali gave you some good links to check out for simple apps on Android. As for iOS, Dan was working on it, but he doesn't have time for it anymore, so it hasn't been kept up to date. The upcoming ldc 1.4 official release will have easy support for Android, you can try it out with the current beta (you will need to cross-compile the stdlib for Android/ARM by using ldc-build-runtime, with a small tweak to druntime): http://forum.dlang.org/thread/ojoyytdparflttnnaill forum.dlang.org We're refining the build process for Android in the ldc 1.4 betas, so chip in if you'd like to see that done well.
Sep 08 2017