1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
use cratenative;
/// Registers for any updates on Transactions.
/// Any such update will trigger: [`IosIapEvents::TransactionUpdate`][crate::IosIapEvents::TransactionUpdate]
///
/// See <https://developer.apple.com/documentation/storekit/transaction/3851206-updates>
/// Fetch Product Details. A list of Product IDs has to be provided.
/// Expected to be confirmed with event: [`IosIapEvents::Products`][crate::IosIapEvents::Products]
///
/// See <https://developer.apple.com/documentation/storekit/product/3851116-products>
/// Trigger a purchase flow. The product ID has to be provided
/// Expected to be confirmed with event: [`IosIapEvents::Purchase`][crate::IosIapEvents::Purchase]
///
/// See <https://developer.apple.com/documentation/storekit/product/3791971-purchase>
/// Finishes a Transaction. Identify the Transaction with an ID.
/// Apple expects us to call this only after the user got the Product granted so we can safely consider this purchase finished.
/// Until the transaction is finished iOS will keep triggering it as soon as we register the
/// TransactionObserver via the `init` call. See [`crate::init`].
///
/// Expected to be confirmed with event: [`IosIapEvents::TransactionFinished`][crate::IosIapEvents::TransactionFinished]
///
/// See <https://developer.apple.com/documentation/storekit/transaction/3749694-finish>
/// Quoted from Apple's docs: "A sequence that emits all the transactions for the user for your app."
///
/// Unlike [`crate::current_entitlements`] this will also return unfinished Transactions. Otherwise the result is the same.
///
/// Expected to be confirmed with event: [`IosIapEvents::AllTransactions`][crate::IosIapEvents::AllTransactions]
///
/// See <https://developer.apple.com/documentation/storekit/transaction/3851203-all>
/// Quoted from Apple docs: "A sequence of the latest transactions that entitle a user to in-app purchases and subscriptions."
///
/// Usually used for "RestorePurchases" functionality.
/// Most importantly this will only included active subscriptions and non-consumables.
/// Finished Transactions of Consumables will never appear again.
///
/// Expected to be confirmed with event: [`IosIapEvents::CurrentEntitlements`][crate::IosIapEvents::CurrentEntitlements]
///
/// See <https://developer.apple.com/documentation/storekit/transaction/3851204-currententitlements>