Calling fetchItems twice doesn't work in a single app session
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- ios, typescript
- Lĩnh vực
- documentation, mobile-dev
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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):
- Ngôn ngữ chính
- TypeScript
- Star
- 35
- Fork
- 13
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của NativeScript/payments
-
com.android.billingclient:billing@@8.0.0 - com.google.android.gms.internal.play_billing.zzbg.zzeĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 28/100
NativeScript/payments#45 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
NativeScript/payments#43 · 2 reaction ·
-
[@nativescript/payments] Not possible to use both subscriptions and IAPs in the same projectĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
NativeScript/payments#39 ·
-
support Amazon Android appsĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
NativeScript/payments#36 · 2 bình luận ·
-
[Restore Orders] MistakeĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
NativeScript/payments#35 ·
Tất cả issue của NativeScript/payments
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Broken links in the docsĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 1 ngày
-
🔊 a11y
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
betagouv/mon-entreprise#4726 ·
Maintainer thường phản hồi trong vòng 9 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Deltares/fews-pi-requests#357 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug confirmed js v6
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày