Calling fetchItems twice doesn't work in a single app session
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 45/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- ios, typescript
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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):
- 主要言語
- TypeScript
- スター
- 35
- フォーク
- 13
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NativeScript/payments のほかの issue
-
com.android.billingclient:billing@@8.0.0 - com.google.android.gms.internal.play_billing.zzbg.zzeオープン
難易度 4/5 3〜5日 初心者へのやさしさ 28/100
NativeScript/payments#45 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
NativeScript/payments#43 · リアクション 2 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
NativeScript/payments#39 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
NativeScript/payments#36 · コメント 2 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
NativeScript/payments#35 ·
NativeScript/payments の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
riverqueue/river#1576 ·
メンテナーはふだん 1 日以内に返信
-
[bug] A prompt queued during a run is assessed without its text対応中かも @jwiegley が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
DevMortimer/pi-warden#211 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
mattermost/compass-design#191 ·
メンテナーはふだん 1 日以内に返信
-
Add unit tests for the organization admin role check対応中かも @SaffuSafwan が今日担当しました。 オープンarea/core good first issue help wanted
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
HorusGoul/trizum#559 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信