expo-iap 3.3.2 → 3.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/modules/ios.d.ts +4 -1
- package/build/modules/ios.d.ts.map +1 -1
- package/build/modules/ios.js +5 -2
- package/build/modules/ios.js.map +1 -1
- package/build/types.d.ts +23 -2
- package/build/types.d.ts.map +1 -1
- package/build/types.js.map +1 -1
- package/build/useIAP.d.ts +4 -0
- package/build/useIAP.d.ts.map +1 -1
- package/build/useIAP.js.map +1 -1
- package/coverage/clover.xml +53 -53
- package/coverage/coverage-final.json +2 -2
- package/coverage/lcov-report/index.html +16 -16
- package/coverage/lcov-report/src/index.html +14 -14
- package/coverage/lcov-report/src/index.ts.html +35 -35
- package/coverage/lcov-report/src/modules/android.ts.html +1 -1
- package/coverage/lcov-report/src/modules/index.html +4 -4
- package/coverage/lcov-report/src/modules/ios.ts.html +18 -12
- package/coverage/lcov-report/src/utils/debug.ts.html +1 -1
- package/coverage/lcov-report/src/utils/errorMapping.ts.html +1 -1
- package/coverage/lcov-report/src/utils/index.html +1 -1
- package/coverage/lcov.info +85 -83
- package/openiap-versions.json +3 -3
- package/package.json +1 -1
- package/src/modules/ios.ts +8 -6
- package/src/types.ts +23 -2
- package/src/useIAP.ts +4 -0
package/coverage/lcov.info
CHANGED
|
@@ -47,10 +47,10 @@ FN:855,(anonymous_54)
|
|
|
47
47
|
FNF:44
|
|
48
48
|
FNH:34
|
|
49
49
|
FNDA:2,(anonymous_11)
|
|
50
|
-
FNDA:
|
|
51
|
-
FNDA:
|
|
52
|
-
FNDA:
|
|
53
|
-
FNDA:
|
|
50
|
+
FNDA:24,(anonymous_12)
|
|
51
|
+
FNDA:10,(anonymous_13)
|
|
52
|
+
FNDA:8,(anonymous_14)
|
|
53
|
+
FNDA:5,(anonymous_15)
|
|
54
54
|
FNDA:1,(anonymous_16)
|
|
55
55
|
FNDA:1,(anonymous_17)
|
|
56
56
|
FNDA:1,(anonymous_18)
|
|
@@ -74,8 +74,8 @@ FNDA:1,(anonymous_35)
|
|
|
74
74
|
FNDA:6,(anonymous_36)
|
|
75
75
|
FNDA:8,(anonymous_37)
|
|
76
76
|
FNDA:2,(anonymous_38)
|
|
77
|
-
FNDA:
|
|
78
|
-
FNDA:
|
|
77
|
+
FNDA:13,normalizeRequestProps
|
|
78
|
+
FNDA:16,(anonymous_40)
|
|
79
79
|
FNDA:1,(anonymous_41)
|
|
80
80
|
FNDA:6,(anonymous_42)
|
|
81
81
|
FNDA:1,(anonymous_43)
|
|
@@ -108,25 +108,25 @@ DA:54,2
|
|
|
108
108
|
DA:55,2
|
|
109
109
|
DA:81,2
|
|
110
110
|
DA:89,2
|
|
111
|
-
DA:90,
|
|
111
|
+
DA:90,24
|
|
112
112
|
DA:91,1
|
|
113
|
-
DA:96,
|
|
114
|
-
DA:97,
|
|
115
|
-
DA:102,
|
|
116
|
-
DA:103,
|
|
113
|
+
DA:96,24
|
|
114
|
+
DA:97,12
|
|
115
|
+
DA:102,12
|
|
116
|
+
DA:103,7
|
|
117
117
|
DA:108,5
|
|
118
118
|
DA:109,4
|
|
119
119
|
DA:114,1
|
|
120
120
|
DA:117,2
|
|
121
|
-
DA:118,
|
|
122
|
-
DA:119,
|
|
123
|
-
DA:120,
|
|
124
|
-
DA:123,
|
|
125
|
-
DA:124,
|
|
126
|
-
DA:125,
|
|
121
|
+
DA:118,10
|
|
122
|
+
DA:119,10
|
|
123
|
+
DA:120,7
|
|
124
|
+
DA:123,3
|
|
125
|
+
DA:124,3
|
|
126
|
+
DA:125,1
|
|
127
127
|
DA:128,2
|
|
128
128
|
DA:131,2
|
|
129
|
-
DA:132,
|
|
129
|
+
DA:132,8
|
|
130
130
|
DA:134,2
|
|
131
131
|
DA:137,1
|
|
132
132
|
DA:138,1
|
|
@@ -204,25 +204,25 @@ DA:395,2
|
|
|
204
204
|
DA:396,2
|
|
205
205
|
DA:397,0
|
|
206
206
|
DA:399,2
|
|
207
|
-
DA:429,
|
|
208
|
-
DA:430,
|
|
207
|
+
DA:429,13
|
|
208
|
+
DA:430,9
|
|
209
209
|
DA:432,4
|
|
210
210
|
DA:475,2
|
|
211
|
-
DA:478,
|
|
212
|
-
DA:479,
|
|
213
|
-
DA:480,
|
|
214
|
-
DA:482,
|
|
215
|
-
DA:483,
|
|
216
|
-
DA:485,
|
|
211
|
+
DA:478,16
|
|
212
|
+
DA:479,16
|
|
213
|
+
DA:480,15
|
|
214
|
+
DA:482,15
|
|
215
|
+
DA:483,9
|
|
216
|
+
DA:485,9
|
|
217
217
|
DA:486,1
|
|
218
|
-
DA:500,
|
|
218
|
+
DA:500,8
|
|
219
219
|
DA:501,1
|
|
220
|
-
DA:504,
|
|
221
|
-
DA:510,
|
|
222
|
-
DA:515,
|
|
223
|
-
DA:516,
|
|
224
|
-
DA:519,
|
|
225
|
-
DA:520,
|
|
220
|
+
DA:504,7
|
|
221
|
+
DA:510,7
|
|
222
|
+
DA:515,7
|
|
223
|
+
DA:516,2
|
|
224
|
+
DA:519,5
|
|
225
|
+
DA:520,4
|
|
226
226
|
DA:523,1
|
|
227
227
|
DA:526,6
|
|
228
228
|
DA:527,5
|
|
@@ -307,21 +307,21 @@ DA:848,2
|
|
|
307
307
|
DA:849,2
|
|
308
308
|
DA:855,2
|
|
309
309
|
LF:216
|
|
310
|
-
LH:
|
|
310
|
+
LH:205
|
|
311
311
|
BRDA:51,0,0,2
|
|
312
312
|
BRDA:51,0,1,2
|
|
313
313
|
BRDA:81,1,0,2
|
|
314
314
|
BRDA:81,1,1,0
|
|
315
315
|
BRDA:90,2,0,1
|
|
316
|
-
BRDA:96,3,0,
|
|
317
|
-
BRDA:96,4,0,
|
|
318
|
-
BRDA:96,4,1,
|
|
319
|
-
BRDA:96,4,2,
|
|
320
|
-
BRDA:102,5,0,
|
|
316
|
+
BRDA:96,3,0,12
|
|
317
|
+
BRDA:96,4,0,24
|
|
318
|
+
BRDA:96,4,1,22
|
|
319
|
+
BRDA:96,4,2,21
|
|
320
|
+
BRDA:102,5,0,7
|
|
321
321
|
BRDA:108,6,0,4
|
|
322
|
-
BRDA:119,7,0,
|
|
323
|
-
BRDA:124,8,0,
|
|
324
|
-
BRDA:124,9,0,
|
|
322
|
+
BRDA:119,7,0,7
|
|
323
|
+
BRDA:124,8,0,1
|
|
324
|
+
BRDA:124,9,0,3
|
|
325
325
|
BRDA:124,9,1,2
|
|
326
326
|
BRDA:124,9,2,0
|
|
327
327
|
BRDA:184,10,0,1
|
|
@@ -358,20 +358,20 @@ BRDA:391,29,1,6
|
|
|
358
358
|
BRDA:396,30,0,0
|
|
359
359
|
BRDA:396,31,0,2
|
|
360
360
|
BRDA:396,31,1,2
|
|
361
|
-
BRDA:429,32,0,
|
|
362
|
-
BRDA:430,33,0,
|
|
361
|
+
BRDA:429,32,0,9
|
|
362
|
+
BRDA:430,33,0,9
|
|
363
363
|
BRDA:430,33,1,6
|
|
364
364
|
BRDA:432,34,0,4
|
|
365
365
|
BRDA:432,34,1,4
|
|
366
|
-
BRDA:482,35,0,
|
|
366
|
+
BRDA:482,35,0,9
|
|
367
367
|
BRDA:485,36,0,1
|
|
368
368
|
BRDA:500,37,0,1
|
|
369
|
-
BRDA:500,38,0,
|
|
370
|
-
BRDA:500,38,1,
|
|
371
|
-
BRDA:505,39,0,
|
|
372
|
-
BRDA:505,39,1,
|
|
373
|
-
BRDA:515,40,0,
|
|
374
|
-
BRDA:519,41,0,
|
|
369
|
+
BRDA:500,38,0,8
|
|
370
|
+
BRDA:500,38,1,4
|
|
371
|
+
BRDA:505,39,0,4
|
|
372
|
+
BRDA:505,39,1,3
|
|
373
|
+
BRDA:515,40,0,2
|
|
374
|
+
BRDA:519,41,0,4
|
|
375
375
|
BRDA:523,42,0,1
|
|
376
376
|
BRDA:523,42,1,0
|
|
377
377
|
BRDA:526,43,0,5
|
|
@@ -424,7 +424,7 @@ BRDA:813,74,1,12
|
|
|
424
424
|
BRDA:813,74,2,12
|
|
425
425
|
BRDA:821,75,0,0
|
|
426
426
|
BRF:115
|
|
427
|
-
BRH:
|
|
427
|
+
BRH:104
|
|
428
428
|
end_of_record
|
|
429
429
|
TN:
|
|
430
430
|
SF:src/modules/android.ts
|
|
@@ -547,13 +547,13 @@ FN:238,(anonymous_12)
|
|
|
547
547
|
FN:269,(anonymous_13)
|
|
548
548
|
FN:289,(anonymous_14)
|
|
549
549
|
FN:305,(anonymous_15)
|
|
550
|
-
FN:
|
|
551
|
-
FN:
|
|
552
|
-
FN:
|
|
553
|
-
FN:
|
|
554
|
-
FN:
|
|
555
|
-
FN:
|
|
556
|
-
FN:
|
|
550
|
+
FN:323,(anonymous_16)
|
|
551
|
+
FN:336,(anonymous_17)
|
|
552
|
+
FN:349,(anonymous_18)
|
|
553
|
+
FN:359,(anonymous_19)
|
|
554
|
+
FN:370,(anonymous_20)
|
|
555
|
+
FN:383,(anonymous_21)
|
|
556
|
+
FN:397,(anonymous_22)
|
|
557
557
|
FNF:22
|
|
558
558
|
FNH:19
|
|
559
559
|
FNDA:15,isProductIOS
|
|
@@ -571,7 +571,7 @@ FNDA:5,(anonymous_12)
|
|
|
571
571
|
FNDA:1,(anonymous_13)
|
|
572
572
|
FNDA:2,(anonymous_14)
|
|
573
573
|
FNDA:2,(anonymous_15)
|
|
574
|
-
FNDA:
|
|
574
|
+
FNDA:3,(anonymous_16)
|
|
575
575
|
FNDA:2,(anonymous_17)
|
|
576
576
|
FNDA:2,(anonymous_18)
|
|
577
577
|
FNDA:1,(anonymous_19)
|
|
@@ -645,30 +645,30 @@ DA:303,3
|
|
|
645
645
|
DA:305,3
|
|
646
646
|
DA:306,2
|
|
647
647
|
DA:307,2
|
|
648
|
-
DA:
|
|
649
|
-
DA:
|
|
650
|
-
DA:
|
|
651
|
-
DA:
|
|
652
|
-
DA:332,3
|
|
648
|
+
DA:322,3
|
|
649
|
+
DA:323,3
|
|
650
|
+
DA:324,3
|
|
651
|
+
DA:325,2
|
|
653
652
|
DA:334,3
|
|
654
|
-
DA:
|
|
655
|
-
DA:
|
|
656
|
-
DA:
|
|
653
|
+
DA:336,3
|
|
654
|
+
DA:337,2
|
|
655
|
+
DA:338,2
|
|
657
656
|
DA:347,3
|
|
658
|
-
DA:
|
|
659
|
-
DA:
|
|
660
|
-
DA:
|
|
661
|
-
DA:
|
|
657
|
+
DA:349,3
|
|
658
|
+
DA:350,2
|
|
659
|
+
DA:359,3
|
|
660
|
+
DA:360,1
|
|
662
661
|
DA:368,3
|
|
663
|
-
DA:
|
|
664
|
-
DA:
|
|
662
|
+
DA:370,3
|
|
663
|
+
DA:371,0
|
|
665
664
|
DA:381,3
|
|
666
|
-
DA:
|
|
667
|
-
DA:
|
|
668
|
-
DA:
|
|
665
|
+
DA:383,3
|
|
666
|
+
DA:384,0
|
|
667
|
+
DA:385,0
|
|
669
668
|
DA:395,3
|
|
670
|
-
DA:
|
|
671
|
-
DA:
|
|
669
|
+
DA:397,3
|
|
670
|
+
DA:398,0
|
|
671
|
+
DA:399,0
|
|
672
672
|
LF:91
|
|
673
673
|
LH:86
|
|
674
674
|
BRDA:35,0,0,15
|
|
@@ -702,10 +702,12 @@ BRDA:290,16,0,2
|
|
|
702
702
|
BRDA:290,16,1,1
|
|
703
703
|
BRDA:307,17,0,2
|
|
704
704
|
BRDA:307,17,1,1
|
|
705
|
-
BRDA:
|
|
706
|
-
BRDA:
|
|
707
|
-
|
|
708
|
-
|
|
705
|
+
BRDA:325,18,0,2
|
|
706
|
+
BRDA:325,18,1,1
|
|
707
|
+
BRDA:338,19,0,2
|
|
708
|
+
BRDA:338,19,1,1
|
|
709
|
+
BRF:35
|
|
710
|
+
BRH:35
|
|
709
711
|
end_of_record
|
|
710
712
|
TN:
|
|
711
713
|
SF:src/utils/debug.ts
|
package/openiap-versions.json
CHANGED
package/package.json
CHANGED
package/src/modules/ios.ts
CHANGED
|
@@ -311,17 +311,19 @@ export const getPromotedProductIOS: QueryField<
|
|
|
311
311
|
* Complete the purchase of a promoted product (iOS only).
|
|
312
312
|
* This should be called after showing your purchase UI for a promoted product.
|
|
313
313
|
*
|
|
314
|
+
* @deprecated Use promotedProductListenerIOS to receive the productId,
|
|
315
|
+
* then call requestPurchase with that SKU instead.
|
|
316
|
+
*
|
|
314
317
|
* @returns Promise resolving when the purchase is initiated
|
|
315
318
|
* @throws Error if called on non-iOS platform or no promoted product is available
|
|
316
319
|
*
|
|
317
320
|
* @platform iOS
|
|
318
321
|
*/
|
|
319
|
-
export const requestPurchaseOnPromotedProductIOS
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
};
|
|
322
|
+
export const requestPurchaseOnPromotedProductIOS =
|
|
323
|
+
async (): Promise<boolean> => {
|
|
324
|
+
const result = await ExpoIapModule.requestPurchaseOnPromotedProductIOS();
|
|
325
|
+
return result ?? true;
|
|
326
|
+
};
|
|
325
327
|
|
|
326
328
|
/**
|
|
327
329
|
* Get pending transactions that haven't been finished yet (iOS only).
|
package/src/types.ts
CHANGED
|
@@ -358,8 +358,15 @@ export interface Mutation {
|
|
|
358
358
|
presentExternalPurchaseNoticeSheetIOS: Promise<ExternalPurchaseNoticeResultIOS>;
|
|
359
359
|
/** Initiate a purchase flow; rely on events for final state */
|
|
360
360
|
requestPurchase?: Promise<(Purchase | Purchase[] | null)>;
|
|
361
|
-
/**
|
|
362
|
-
|
|
361
|
+
/**
|
|
362
|
+
* Purchase the promoted product surfaced by the App Store.
|
|
363
|
+
*
|
|
364
|
+
* @deprecated Use promotedProductListenerIOS to receive the productId,
|
|
365
|
+
* then call requestPurchase with that SKU instead. In StoreKit 2,
|
|
366
|
+
* promoted products can be purchased directly via the standard purchase flow.
|
|
367
|
+
* @deprecated Use promotedProductListenerIOS + requestPurchase instead
|
|
368
|
+
*/
|
|
369
|
+
requestPurchaseOnPromotedProductIOS: boolean;
|
|
363
370
|
/** Restore completed purchases across platforms */
|
|
364
371
|
restorePurchases: Promise<void>;
|
|
365
372
|
/**
|
|
@@ -889,6 +896,13 @@ export interface RequestPurchaseAndroidProps {
|
|
|
889
896
|
}
|
|
890
897
|
|
|
891
898
|
export interface RequestPurchaseIosProps {
|
|
899
|
+
/**
|
|
900
|
+
* Advanced commerce data token (iOS 15+).
|
|
901
|
+
* Used with StoreKit 2's Product.PurchaseOption.custom API for passing
|
|
902
|
+
* campaign tokens, affiliate IDs, or other attribution data.
|
|
903
|
+
* The data is formatted as JSON: {"signatureInfo": {"token": "<value>"}}
|
|
904
|
+
*/
|
|
905
|
+
advancedCommerceData?: (string | null);
|
|
892
906
|
/** Auto-finish transaction (dangerous) */
|
|
893
907
|
andDangerouslyFinishTransactionAutomatically?: (boolean | null);
|
|
894
908
|
/** App account token for user tracking */
|
|
@@ -964,6 +978,13 @@ export interface RequestSubscriptionAndroidProps {
|
|
|
964
978
|
}
|
|
965
979
|
|
|
966
980
|
export interface RequestSubscriptionIosProps {
|
|
981
|
+
/**
|
|
982
|
+
* Advanced commerce data token (iOS 15+).
|
|
983
|
+
* Used with StoreKit 2's Product.PurchaseOption.custom API for passing
|
|
984
|
+
* campaign tokens, affiliate IDs, or other attribution data.
|
|
985
|
+
* The data is formatted as JSON: {"signatureInfo": {"token": "<value>"}}
|
|
986
|
+
*/
|
|
987
|
+
advancedCommerceData?: (string | null);
|
|
967
988
|
andDangerouslyFinishTransactionAutomatically?: (boolean | null);
|
|
968
989
|
appAccountToken?: (string | null);
|
|
969
990
|
quantity?: (number | null);
|
package/src/useIAP.ts
CHANGED
|
@@ -91,6 +91,10 @@ type UseIap = {
|
|
|
91
91
|
) => Promise<VerifyPurchaseWithProviderResult>;
|
|
92
92
|
restorePurchases: () => Promise<void>;
|
|
93
93
|
getPromotedProductIOS: () => Promise<Product | null>;
|
|
94
|
+
/**
|
|
95
|
+
* @deprecated Use promotedProductListenerIOS to receive the productId,
|
|
96
|
+
* then call requestPurchase with that SKU instead.
|
|
97
|
+
*/
|
|
94
98
|
requestPurchaseOnPromotedProductIOS: () => Promise<boolean>;
|
|
95
99
|
getActiveSubscriptions: (subscriptionIds?: string[]) => Promise<void>;
|
|
96
100
|
hasActiveSubscriptions: (subscriptionIds?: string[]) => Promise<boolean>;
|