< All FAQs

Is it possible to reuse our existing Objective C, Swift or Java code we already have?

One of the main benefits of NativeScript is you get both iOS and Android apps from a single code base. Consolidating as much of your app in cross-platform helps developmental efficiency and reduced maintenance. 

Another main benefit of NativeScript is being able to directly access all Native platform APIs from your code. This means you can connect to any native code on the device, including 3rd party code, or your own proprietary native code. Thus, you can reuse your investment.

The common way to handle this is to make a plugin. These are simple abstractions that you can use to consolidate the API to your native code, allowing you to use the plugin in cross platform code. Your plugin will handle calling your iOS or Android code as needed (depending on the runtime OS target).

Read more about building NativeScript plugins. If you are coming from a Cordova, Appcelerator or React Native background, you might be pleasantly surprised how little work is required to make NativeScript plugins that call native code or functionality. 

For specifics on how to incorporate native code into your plugins, check out our documentation articles on using iOS libraries, and using native Android libraries.


Sponsored by progress-logo-min
NativeScript is licensed under the Apache 2.0 license
© 2018 Progress Software Corporation. All Rights Reserved. Privacy Center