-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Native Script support? #110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
+1 I'm currently trying to integrate Angular2 and Nativescript and I would like to use firebase as well. I've created a simple hello world app (if you have nativescript installed, just run tns create my-app-name --template https://github.com/NativeScript/template-hello-world-ng) and I was wondering how I can start using angularfire with it. My biggest problem seems to be the System.js part since the nativescript project doesn't have an index.html or anywhere I can load modules with System.js. Can anyone help? |
I'm not a NativeScript pro, so I'm not exactly sure what needs to be done to get AngularFire included. @burkeholland any ideas? |
Without knowing the internal workings of AngularFire, my gut reaction is that an {N} plugin needs to be created that includes the Angular wrapper. |
Damn... That's sad to hear. I mean, the only reason I chose nativescript over react native to develop native apps was because I could leverage my angular skills when creating things with nativescript. Really hope this process of integrating {N}, angular and firebase becomes more and more seamless over time as they seem to be a perfect fit for building cross platform applications. |
@burkeholland and @LuisOliveiraAlves. No hill to tall to climb. There were serious issues with Firebase + ReactNative from day one (RN didn't support web sockets... at all). But we helped sort that out and now it's awesome. We can do the same with {N}! |
There is nothing here that isn't doable. Someone just needs to create the plugin. In fact, the nativescript-firebase already exists. In fact, if you would be willing to start it, @davideast and I can both help. Come join our NativeScript Slack Channel and let's get it started. There are several Angular plugins that people have built already. |
@burkeholland is 100% right. I'm closing this issue right now, but we'll circle back around it once the library is released. |
Any news on this now that Angularfire2 is on Firebase SDK 3? |
I have started creating a framework for Angular2 web apps that uses AngularFire2. I am trying to evaluate the feasibility of creating a NativeScript plugin for AngularFire2 so that my Angular2-based framework can leverage AngularFire2 consistently within web and mobile apps. AngularFire2 is dependent on the Firebase library that targets a web browser while the NativeScript plugin by Eddy Verbruggen referenced in this issue is dependent on native Android/iOS implementations of Firebase. Unfortunately Eddy's work does not appear to be applicable to what I need. The Firebase library that targets browsers assumes access to browser window location, local storage, etc. which NativeScript's support for Angular2 does not include. It seems that I would need to do some non-trivial hacking on the Firebase library that AngularFire2 uses to create this NativeScript plugin but that library is proprietary and mostly obfuscated. Any suggestions on how to proceed? |
When trying to use angularfire with nativecscript i get the following error message:
I know there is a plugin for firebase https://github.com/EddyVerbruggen/nativescript-plugin-firebase but i want to use angularfire, because of the nice integration of observables which is pretty amazing. Any ideas? |
Anyone ever tried this ? |
@davideast @burkeholland @EddyVerbruggen @fricker @VladimirAmiorkov To me a reasonable approach would clone AngularFire2 into a new NS plugin and replace the dependency on firebase-js-sdk with nativescript-plugin-firebase. However, it seems like the firebase api's used in AngularFire2 are not implemented in nativescript-plugin-firebase. The AngularFire2 api's calls to firebase are: There is a User in nativescript-plugin-firebase, not sure if it the same, and we should be able to replace above initalizeApp with the already existing init method, but none of the api's seem to have a match. Would it make sense to add these api's into nativescript-plugin-firebase to enable usage of NS AngularFire2? If this is possible, then users already familiar with AngularFire2, would very easily be able to apply it to their NS apps. I am very interested in what @davideast and @EddyVerbruggen think about this, as well as anyone else. And again I am willing to what it takes to get this implemented, but I will definitely need some direction/assistance. Thanks all. |
Hey @kinggolf I ❤️ the idea of making the NativeScript plugin compatible with AngularFire2, but there are two main issues preventing that:
|
@EddyVerbruggen @kinggolf |
@someguy314 - nothing on my end, but I'm still a huge fan of AngularFire2! |
@someguy314 I've looked into it, and I'll see if I can allocate some free time (which I have none of) |
Any progress on this? I have slowly began to realise this is very important because otherwise one would need to use I have to do this everywhere: this.feed$ = Observable.create((observer) => {
this.collection.onSnapshot((snapshot) => {
this.zone.run(() => {
const feedItems = snapshot.docs.map((docSnapshot) => docSnapshot.data() as FeedItem);
observer.next(feedItems);
});
});
}); I mean, its not a show stopper, but it bugs me personally none the less. |
Has anyone managed to make any progress on this at all? I'm happy to be involved in supporting this, though now that the issue is so old there might be a potentially easier solution now? |
@EddyVerbruggen Maybe we could look at RxFire in NativeScript first (instead). It doesn't |
Hey guys
More of question than an issue: Is there any reason not to use this in combination with Native Script on iOS and Android?
I'm looking for a unified way of talking to firebase across web and mobile, but ideally without losing things like offline support on the native platform SDKs.
Cheers and keep up the great work!
Andy
The text was updated successfully, but these errors were encountered: