How to use the Native Java/Swift code in NativeScript


#1

Can I use the native JAVA/SWIFT code in NativeScript?
I want to store the cookies into the cookie manager, but there is no plugin provided.
So, is that possible to use the native code directly into NativeScript or I’ve to create a plugin myself for this task.


#2

You might be able to store cookies using the android CookieManager, but I don’t think they will be respected when sending requests using the http-request module. That would have to be tested.

Accessing Android/Java
https://docs.nativescript.org/runtimes/android/metadata/accessing-packages
https://docs.nativescript.org/runtimes/android/marshalling/js-to-java