You can and usually should write code that is 100% portable with Codename One. But you might reach a point where you need something from the native OS. For that we have native interfaces Native Interfaces let you write native OS code if you need to, they let you package it in a library so your code can be completely abstracted. There are no limits on the type of code you can write with Codename One.Some other tools require usage of their language when working in native, so if you find a sample on Apples website you need to translate it to your language of choice first.With native interfaces you can just paste the code into the native interface and it will work when running on iOS or the respective platform.