Ask away

Is it possible to use my Swift libraries in the nest ide?

Tim 10/12/17 15:17


Question CategoryComponent

Number of completed projects0

Question StatusUnsolved

  • swift
  • library
  • component
  • nest


I have decided to swap development over for my mobile app side project from native swift to the nest platform. The immediate road block that occurs to me when I try and begin doing this is wondering how to access all the libraries I was using in Swift via Cocoapods for nest components. For example I am using a ton of Amazon Web Services Swift libraries and the Chameleon Swift color library. Is there a way to convert all these swift libraries/make them accesible in nest ide or will I have to look for the nest components/javascript versions of all these libraries?


John 10/15/17 22:45

the Chameleon Swift appears to be a UI library. It doesn't seem like you would want to keep using this library if you went with the nest components. HOWEVER, if you felt so desirous, you could write a native module that, in theory, could call the chameleon library to provide you with things like hex values for colors. I don't know if this would work well and would likely not be very performant, so I couldn't recommend you attempt to continue to use this library in a straight NEST app (but for sure if you used a hybrid app, see above!).

Michael 10/16/17 08:57

I can give to your question "which libraries should I use if any of them" with the information provided is "it depends".

Bob 10/16/17 13:08

I have built a few NEST Native mobile applications for both Android and iOS, and functionality that would have existed in Swift in these applications can be sometimes written in JavaScript

Helene 10/16/17 18:19

Another option is to write your own components using wrapping JS code. These are chunks of application logic that you call from components in the nest ide. They are very powerful as they allow you to do essentially anything you could have done before in a straight native app. They are written in the native platform language, so Obj-C for iOS, Java for Android, (but if you are feeling ambitious you could probably write them in Swift - I haven't tried). These native modules could then call out to the AWS Swift libraries that you have that already exist. My instinct says this may be the solution that would fit your needs best. The obvious downside to native modules is that they are native, so you would need to write one for each platform you support (iOS and Android, presumably).