Fork us on GitHub

How Do I - Use The Include Sources Feature To Debug The Native Code On iOS/Android etc.

The source is useful for debugging on device, looking under the hood and writing native interfaces


One of the most important features for paid users is the ability to include sources in the build results, notice that this feature is also available for basic subscribers but will only work for Android, iOS & Windows Phone platforms.
To build with sources I just go into project properties in the IDE. Make sure you logged in with your paid account using this button here. Then I have the option to include sources in my build, this option slows down the build noticeably so we suggest you disable it if you don't actually need it.
Now I can just send a build as usual, when the build completes on the server we see this source link, I will download it and expand it on my disk.
Notice that to build from iOS sources you will need a Mac, here I double click the project file and it launches xcode. There are two things you need to verify in xcode, the first is the compiler. If you are using a different version of xcode than the one in the server you need to go into the project settings here and select the default compiler.
Next you need to manually add the resource files from the two resource directories from the res directory just add all the entries unless you have native code there in which case you shouldn't add it again. For the case of the built in res directory you should select only the files that don't end with .m and .h. You can only select some of these files as I select in this case.
Compilation takes a few minutes then the native simulator launches. You should be able to place breakpoints within methods and debug this code, although it is a little different all class names and method names are preserved so you should be able to gleam some information.


Versioning is a pro feature that allows you to build against a point release of Codename One

Read More

Crash Protection

Crash protection is another pro feature that allows you to get logs from the devices when an error occurs

Read More

Desktop Apps

Desktop app build target is yet another pro only feature that allows you to build "native" desktop bundles

Read More