简体   繁体   中英

How to provide JavaScript library for mobile native apps?

I am not a mobile developer, hence please excuse me for incorrect assumptions, if any

I have a library which users want to integrate in their native mobile apps. It is written in JavaScript, but I don't want to rewrite for Android and iOS. Hence what I need is some way that this JavaScript library can be used in native apps. Following two ways look promising:

  • WebViews: The JS files would reside locally and webview will be used to run them
  • NativeScript: NativeScript allows you to create native apps from JavaScript. But I didn't find anything which suggests that I can create native library too. Can this be used in any way?

You might be looking for React Native
It is a Javascript framework, and when you write your code, most of the time, you can use the same code for iOS and Android. It is a relatively new framework, but can be very powerful for rapid cross-development, but (obviously) has its trade-offs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM