I’m new to Contentful and hoping to use it in an app I am building using NativeScript. I’ve downloaded the boiler plate code from the Contentful API’s section and that runs fine; returns the content types from my portal, etc however if I try and do this from within my NativeScript app nothing happens - createClient stops the execution of my native script view model but there are no errors or warnings. Wondered if anyone had tried this before and managed to get it working.
I don’t remember though what the exact problem was (it’s a year ago) but I assume that axios (that’s what the SDK uses) doesn’t work in native script either because HTTP is work their in another way?
I did some more digging after submitting the post and yes it does seem to be incompatible. After installing the nativescript-nodeify module the Contenful SDK throws an error: window is not defined. It seems it tries to detect a browser but of course this doesn’t exist. I see support for React Native in the contentful module but it triggers the else statement and assumes it is running in a browser.
I think Axiom itself might work ok if this was fixed.
The reason I wanted to use the SDK is because I need to support sync for offline content. Is it possible to implement that easily without the SDK ?