You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the standard ng template and trying to setup angularfire2 like described in the offical guide
In the app.module.ts I've added AngularFireModule.initializeApp to my imports. To this point everything works fine, at least I'm not getting any compilation errors.
When trying to add AngularFirestoreModule though and running tns run ios I'm getting the segmentation fault: com.apple.CoreSimulator.SimDevice.(device code here)[2997] (UIKitApplication:org.nativescript.HelloWorld[0x796e][3022][7655]): Service exited due to signal: Segmentation fault: 11 sent by exc handler[0]
The only thing I've changed about the ng template is the app.module.ts like so:
import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core";
import { NativeScriptModule } from "nativescript-angular/nativescript.module";
import { AppRoutingModule } from "./app.routing";
import { AppComponent } from "./app.component";
import { ItemService } from "./item/item.service";
import { ItemsComponent } from "./item/items.component";
import { ItemDetailComponent } from "./item/item-detail.component";
import { AngularFireModule } from 'angularfire2';
import { AngularFirestoreModule } from 'angularfire2/firestore';
const config = {
// my firebase config
};
@NgModule({
bootstrap: [
AppComponent
],
imports: [
NativeScriptModule,
AppRoutingModule,
AngularFireModule.initializeApp(config, 'fir-test-4719f'),
AngularFirestoreModule
],
declarations: [
AppComponent,
ItemsComponent,
ItemDetailComponent
],
providers: [
ItemService
],
schemas: [
NO_ERRORS_SCHEMA
]
})
/*
Pass your application module to the bootstrapModule function located in main.ts to start your app
*/
export class AppModule { }
Like I mentioned above this compiles just fine again when removing the FirestoreModule.
Any ideas of why this happens or how I can prevent it?
The text was updated successfully, but these errors were encountered:
@danielgek I'm aware of this, however the nativescript plugin is written in raw javascript and doesn't support key features of angular such as reactive observables. Also, the angularfire2 extension is backed by the angular team.
It's really just a npm package and it doesn't have any browser related dependencies such as document, so it should be able to run.
@philipfeldmann angularfire2 is not directly supported n NativeScript environment due to some incompatibilities - large discussion about the support for NativeScript can be found here. As pointed out in this thread one reasonable solution would be to wrap the library in NativeScript plugin. However, this is a non-trivial task as the library is obfuscated.
I'm using the standard ng template and trying to setup angularfire2 like described in the offical guide
In the
app.module.ts
I've added AngularFireModule.initializeApp to my imports. To this point everything works fine, at least I'm not getting any compilation errors.When trying to add
AngularFirestoreModule
though and runningtns run ios
I'm getting the segmentation fault:com.apple.CoreSimulator.SimDevice.(device code here)[2997] (UIKitApplication:org.nativescript.HelloWorld[0x796e][3022][7655]): Service exited due to signal: Segmentation fault: 11 sent by exc handler[0]
The only thing I've changed about the ng template is the
app.module.ts
like so:Like I mentioned above this compiles just fine again when removing the FirestoreModule.
Any ideas of why this happens or how I can prevent it?
The text was updated successfully, but these errors were encountered: