klippa-app/nativescript-http

NativeScript 7 update

kaanguru opened this issue · 12 comments

Is NativeScript 7 update coming anytime soon?

https://nativescript.org/blog/nativescript-7-for-plugin-authors/

@kaanguru there are talks about an official integration: #10
But I was planning to make an NS7 upgrade yes :)

I have old NS v 6.8.0 project where I use "@klippa/nativescript-http": "^1.3.1",
How do I import it?

import { request, HTTPFormData, HTTPFormDataEntry } from "@klippa/nativescript-http";
gives

 ERROR in ../node_modules/@klippa/nativescript-http/http.js
Module not found: Error: Can't resolve '@nativescript/core/image-source/image-source' in 'D:\test\NS\uploadpng\node_modules\@klippa\nativescript-http'    
 @ ../node_modules/@klippa/nativescript-http/http.js 7:21-76
 @ ../node_modules/ts-loader??ref--6!../node_modules/vue-loader/lib??vue-loader-options!./components/App.vue?vue&type=script&lang=ts&
 @ ./components/App.vue?vue&type=script&lang=ts&
 @ ./components/App.vue
 @ ./main.ts
Error from chokidar (D:\): Error: EBUSY: resource busy or locked, lstat 'D:\pagefile.sys'

Should I remove "@klippa/nativescript-http" line from my dependencies?

Currently, I have...

  "dependencies": {
        "@klippa/nativescript-http": "~1.3.1",
        "@nativescript/core": "7.0.3",

@kaanguru you can, but then you won't have the functionality anymore.
Since I got quite a few bugs trying to upgrade to NS7 I put it on hold for a while

I confirm it's interesting to port this plugin on NS 7 but there are too bugs/problems and it's not that simple!

I got the basics working in: https://github.com/klippa-app/nativescript-http/tree/feature/ns-7-support
I'll going to fix up the other demo's + doing a cleanup soon.

@jerbob92 when do you plan to publish it on npm?

@mapo80 I'm trying to make a release today :)

I finished my work in https://github.com/klippa-app/nativescript-http/tree/feature/ns-7-support
On Android everything seems to work correctly, all demo's have been updated.
However: I don't have an iOS device available right now so I can't test whether it works correctly on that, so I'm going to do a release yet.

Tomorrow I’ll test it on my iOS device

Hi @jerbob92, I've tested NS7 and NG10 changes on iOS device and it'is ok.
I've made a PR to fix build of demo app on Angular: #13

@mapo80 Thanks for checking! Most of those changes are not necessary, if you npm install in src it works fine.
I just did the last test for all demo's on iOS and they also work fine. I released version 2.0.0 and changed the docs to support both NS6 and NS7.