angular/fire docData works on chrome/safari macos but never emits on capacitor-ios

Discussão em 'Angular' iniciado por frontend-ux-ui, Setembro 12, 2024.

  1. the angular/fire method docData works on chrome/safari macos but never emits on capacitor-ios (capacitor uses webkit-safari on ios)

    I can see that the game-object is really exisiting since it shows up & emtis on my desktop browsers and I am even able to interact with this object on my capacitor-ios-native-app but just not able to receive any stream updates. The game doc ref console log correclty logs the game too, so the error really needs to lie inside the docData function (?)

    All other operations like reading/writing/deleting (without streams) work on ios.

    Any hints for debugging would be much appreciated.

    Here is my code, remember that this works perfectly on desktop.

    const gameDocRef = doc(this.firestore, 'game', game.id);
    if (showGameLogs) {
    let toLog: any = (gameDocRef as any)._key;
    console.log("gameDocRef:", gameDocRef);
    console.log(" CALLING DOC_DATA ON THIS GAME DOC REF:", toLog?.path?.segments);
    }
    const game$ = docData(gameDocRef, { idField: 'id' }).pipe(
    map(data => {
    if (showGameLogs) {
    console.log(" docData EMISSION:", data);
    }
    if (data === undefined) {
    return null;
    } else {
    return data;
    }
    })
    ) as Observable<Game | null>;


    A minimum reproducible example for capacitor-ios would be hard to create for me and hard to test for you of course, but I will create one as soon as someone answered my other minimiumum reproducible example question (see my accounts last question).

    Continue reading...

Compartilhe esta Página