Nativescript support #1254
Replies: 14 comments
-
I simply don't know enough about Nativescript to understand what is missing and do not have the time to dive into it at the moment 🙁 |
Beta Was this translation helpful? Give feedback.
-
Just saw this now, about 100 years after the question. You wouldn't use VueFire in a NativeScript app, rather use Eddy's plugin - https://github.com/EddyVerbruggen/nativescript-plugin-firebase - a really excellent plugin. |
Beta Was this translation helpful? Give feedback.
-
Didn't know of the plugin! Looking at the docs, it looks like you could use both at the same time as it seems the firestore db exposes the same API https://github.com/EddyVerbruggen/nativescript-plugin-firebase/blob/master/docs/FIRESTORE.md |
Beta Was this translation helpful? Give feedback.
-
@posva - is there a DOM dependency in Vue-Fire? If not, it'd be an interesting thing to try to make work with a mobile app |
Beta Was this translation helpful? Give feedback.
-
No, there isn't any, I do use WeakMap in Vuexfire. As long as the api for collections and documents is the same, it should work out of the box! |
Beta Was this translation helpful? Give feedback.
-
@EddyVerbruggen do you think we could use VueFire with NS? I remember AngularFire was a no-go, but there was DOM dependency there w/ jQuery Lite IIRC... |
Beta Was this translation helpful? Give feedback.
-
@jlooper I'm not too familiar with the internal workings of Vue, but perhaps it would work by adding a global Mixin in // this import loads the Web-API-compatible version of the plugin's firestore implementation
import { firestore } from "nativescript-plugin-firebase/app";
Vue.mixin({
created: function () {
this.$options.firestore = firestore;
}
});
Vue.use(Vuefire); |
Beta Was this translation helpful? Give feedback.
-
I don't think there is anything extra needed. What would that be for?
On Thu 14 Mar 2019 at 09:02, Eddy Verbruggen ***@***.***> wrote:
@jlooper <https://github.com/jlooper> I'm not too familiar with the
internal workings of Vue, but perhaps it would work by adding a global
Mixin in main.ts. Something like this:
import { firestore } from "nativescript-plugin-firebase/app";
Vue.mixin({
created: function () {
this.$options.firestore = firestore;
}
});
Vue.use(Vuefire);
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#192 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAoicaHuJE2V3D8CKoOVDlwjuQeWXfrVks5vWgIegaJpZM4UX_9x>
.
--
Eduardo San Martin Morote
|
Beta Was this translation helpful? Give feedback.
-
Hey Eduardo, I'm assuming somewhere in the Vuefire codebase it expects a require/import of the The NativeScript plugin doesn't depens on the npm Like I said, I'm not that familiar with how Vue works internally so there may be a much simpler way.. |
Beta Was this translation helpful? Give feedback.
-
Oh vuefire relies on the collections and documents passed to implement the
same interfaces as the one exposed by firestore like onsnapshot
On Thu 14 Mar 2019 at 14:19, Eddy Verbruggen ***@***.***> wrote:
Hey Eduardo, I'm assuming somewhere in the Vuefire codebase it expects a
require/import of the firebase package. Or there's some other magic going
on to wire up the firestore property.
The NativeScript plugin doesn't depens on the npm firebase package, so I
thought there would be a need to tell Vuefire somehow that firestore
should resolve to the NativeScript-specific implementation.
Like I said, I'm not that familiar with how Vue works internally so there
may be a much simpler way..
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#192 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAoicXzDheKoTSxzKbxmAtOe_DXWz4hxks5vWkxwgaJpZM4UX_9x>
.
--
Eduardo San Martin Morote
|
Beta Was this translation helpful? Give feedback.
-
@posva OK, @jlooper Give it a shot, I think you'll need to follow these steps: https://github.com/vuejs/vuefire/tree/master/packages/vuefire#installation |
Beta Was this translation helpful? Give feedback.
-
Hi! I just found this issue and I want to say that
instead of
I shed a tear of joy when I saw it with my own eyes. @posva and @eddyerburgh, you guys rock! |
Beta Was this translation helpful? Give feedback.
-
since that should work with the Firebase JS SDK, it may be worth updating the docs |
Beta Was this translation helpful? Give feedback.
-
Yes. There is a small difference that |
Beta Was this translation helpful? Give feedback.
-
I'm not able to get this awesome plugin along Nativescript-vue plugin. There is not error, simply no data is returned (I have copy pasted the same code in a web regular project and is working properly).
No data is returned from firebase and no error is being displayed.
Thank you in advance
Beta Was this translation helpful? Give feedback.
All reactions