Calling fetchItems twice doesn't work in a single app session
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 45/100
- Tipo di issue
- Documentazione
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- ios, typescript
- Ambito
- documentation, mobile-dev
Direzione di ricerca
Start with the plugin documentation and the connect(), fetchItems(), and tearDown() entry points shown in the issue. Verify how the documented usage handles repeated page visits, then update the guidance to explain the required cleanup before leaving the subscriptions or IAP page. Done means the lifecycle requirement and workaround are clear to users.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Nativescript versions
@nativescript/payments 1.0.4
@nativescript/core: ~8.1.1
@nativescript/ios: 8.2.2
iOS Version: 15.1.1
Device: iPhone 13 Pro max
Summary of issue: First time calling .connect() and fetchItems is fine. Subscriptions and IAPs (app store products) etc. load. Second time we call it in our app, it does not load at all. However, restarting the app seems to load the app store products again.
We used the code structure provided in this plugin documentation.
Related issues: https://stackoverflow.com/questions/25426564/completion-handler-causing-exc-bad-access-when-same-method-is-called-twice
Workaround/fix for now:
Call teardown() before you leave the subscriptions/IAP page, etc.
eg.
import {
buyItem,
BuyItemOptions,
canMakePayments,
fetchItems,
finalizeOrder,
init as initPayments,
Item,
PaymentEvent,
paymentEvents,
toMainThread,
tearDown as cleanUp
} from '@nativescript/payments';
onClose() {
// Clean up what we've done here as otherwise subscriptions won't load on 2nd reload
cleanUp();
this.location.back();
}
Suggested course of action: Update the docs for this plugin to make it clear that tearDown should be called before leaving the page with the subscription / IAP options, etc.
Screenshots:
When everything is fine (1st call / call with the fix above):
When trying to call the .connect() and fetchItems a second time in an app session (without the fix above):
- Lingua principale
- TypeScript
- Stelle
- 35
- Fork
- 13
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di NativeScript/payments
-
com.android.billingclient:billing@@8.0.0 - com.google.android.gms.internal.play_billing.zzbg.zzeAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 28/100
NativeScript/payments#45 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
NativeScript/payments#43 · 2 reazioni ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
NativeScript/payments#39 ·
-
support Amazon Android appsAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
NativeScript/payments#36 · 2 commenti ·
-
[Restore Orders] MistakeAperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
NativeScript/payments#35 ·
Tutte le issue di NativeScript/payments
Issue simili
-
area: cli bug flake ready-for-agent
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
gazetta-studio/gazetta-studio#1772 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
microsoft/playwright#43875 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
documentation good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
calagopus/panel#285 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno