Please refer to up-to date how to guide here: [https://github.com/treeform/glfm](https://github.com/treeform/glfm)
Getting Nim on iOS was not that bad. Android was significantly harder. On iOS you just compile nim to C and include the C files in your project. On iOS you just take c, objc and cpp files and just link them together no big deal. On Android apps are Java apps. So you have to use the Java to C JNI bridge, and a thing called native-activity and its convoluted with gradle (make tool) calling cmake (another make tool)… I have spent hours looking at link errors. # I would like to build a mobile package builder My wish is to have some thing this in the future: nim c --os:android foo.nim and get a foo.apk that can run on emulator or a real Android phone. same with: nim c --os:ios foo.nim and get a foo.app that can run an emulator or a real iOS phone. Currently there is no iOS operating system defined. I should add that... But maybe an outside tool will be better some thing like? nimOnMobile --os:android foo.nim that does all that android studio/xcode crap? Should the package builder be part of nim compiler or a separate tool? Thoughts? # Memory Segfaults It looks like using standard GC I get allocation errors with: Using default GC I get segfault on this line: [https://github.com/nim-lang/Nim/blob/27b081d1f77604ee47c886e69dbc52f53ea3741f/lib/system/avltree.nim#L16](https://github.com/nim-lang/Nim/blob/27b081d1f77604ee47c886e69dbc52f53ea3741f/lib/system/avltree.nim#L16) because n is null. Using \--newruntime I get out of memory as soon as I make an allocation. Using --gc:none I get out of memory as soon as I make an allocation. This happens with both iOS and Android in a similar way. I think the memory allocator is not setup/working right? Any ideas of things to try? # echo/printf does not work on Android Any output to stdout is just ignored on Android you have to use special log function: __android_log_print(ANDROID_LOG_VERBOSE, APPNAME, "message"); Is there a way to override echo function to use it instead of stdout?
