expo-iap 2.5.4-rc.1 → 2.6.1
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/.copilot-instructions.md +321 -0
- package/.cursorrules +303 -0
- package/CONTRIBUTING.md +378 -0
- package/README.md +10 -0
- package/android/src/main/java/expo/modules/iap/ExpoIapModule.kt +22 -0
- package/build/index.d.ts +27 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +40 -3
- package/build/index.js.map +1 -1
- package/build/modules/android.d.ts +8 -0
- package/build/modules/android.d.ts.map +1 -1
- package/build/modules/android.js +12 -0
- package/build/modules/android.js.map +1 -1
- package/build/modules/ios.d.ts +140 -16
- package/build/modules/ios.d.ts.map +1 -1
- package/build/modules/ios.js +220 -19
- package/build/modules/ios.js.map +1 -1
- package/build/types/ExpoIapIos.types.d.ts +8 -1
- package/build/types/ExpoIapIos.types.d.ts.map +1 -1
- package/build/types/ExpoIapIos.types.js.map +1 -1
- package/build/useIap.d.ts.map +1 -1
- package/build/useIap.js +8 -6
- package/build/useIap.js.map +1 -1
- package/codecov.yml +74 -0
- package/ios/ExpoIapModule.swift +35 -3
- package/package.json +5 -6
- package/plugin/tsconfig.tsbuildinfo +1 -1
- package/scripts/test-coverage.sh +15 -0
- package/src/index.ts +59 -5
- package/src/modules/android.ts +17 -1
- package/src/modules/ios.ts +315 -28
- package/src/types/ExpoIapIos.types.ts +9 -1
- package/src/useIap.ts +13 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"android.d.ts","sourceRoot":"","sources":["../../src/modules/android.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"android.d.ts","sourceRoot":"","sources":["../../src/modules/android.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAC,cAAc,EAAC,MAAM,+BAA+B,CAAC;AAG7D,wBAAgB,gBAAgB,CAAC,CAAC,SAAS;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAC,EAC5D,IAAI,EAAE,OAAO,GACZ,IAAI,IAAI,CAAC,GAAG;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAC,CAOnC;AAED;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,GAAU,UAElD;IACD,GAAG,EAAE,MAAM,CAAC;CACb,KAAG,OAAO,CAAC,IAAI,CAIf,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,GAAU,+DAM1C;IACD,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,KAAG,OAAO,CAAC,cAAc,CAuBzB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,GAAI,8BAGxC;IACD,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,KAAG,OAAO,CAAC,cAAc,GAAG,OAAO,GAAG,IAAI,CAE1C,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,QAAa,OAAO,CAAC,IAAI,CAE/D,CAAC"}
|
package/build/modules/android.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
// External dependencies
|
|
1
2
|
import { Linking } from 'react-native';
|
|
3
|
+
// Internal modules
|
|
2
4
|
import ExpoIapModule from '../ExpoIapModule';
|
|
3
5
|
// Type guards
|
|
4
6
|
export function isProductAndroid(item) {
|
|
@@ -53,4 +55,14 @@ export const validateReceiptAndroid = async ({ packageName, productId, productTo
|
|
|
53
55
|
export const acknowledgePurchaseAndroid = ({ token, developerPayload, }) => {
|
|
54
56
|
return ExpoIapModule.acknowledgePurchase(token, developerPayload);
|
|
55
57
|
};
|
|
58
|
+
/**
|
|
59
|
+
* Open the Google Play Store to redeem offer codes (Android only).
|
|
60
|
+
* Note: Google Play does not provide a direct API to redeem codes within the app.
|
|
61
|
+
* This function opens the Play Store where users can manually enter their codes.
|
|
62
|
+
*
|
|
63
|
+
* @returns {Promise<void>}
|
|
64
|
+
*/
|
|
65
|
+
export const openRedeemOfferCodeAndroid = async () => {
|
|
66
|
+
return Linking.openURL(`https://play.google.com/redeem?code=`);
|
|
67
|
+
};
|
|
56
68
|
//# sourceMappingURL=android.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"android.js","sourceRoot":"","sources":["../../src/modules/android.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"android.js","sourceRoot":"","sources":["../../src/modules/android.ts"],"names":[],"mappings":"AAAA,wBAAwB;AACxB,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AAErC,mBAAmB;AACnB,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAM7C,cAAc;AACd,MAAM,UAAU,gBAAgB,CAC9B,IAAa;IAEb,OAAO,CACL,IAAI,IAAI,IAAI;QACZ,OAAO,IAAI,KAAK,QAAQ;QACxB,UAAU,IAAI,IAAI;QAClB,IAAI,CAAC,QAAQ,KAAK,SAAS,CAC5B,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,KAAK,EAAE,EACnD,GAAG,GAGJ,EAAiB,EAAE;IAClB,OAAO,OAAO,CAAC,OAAO,CACpB,+DAA+D,MAAM,aAAa,CAAC,cAAc,EAAE,QAAQ,GAAG,EAAE,CACjH,CAAC;AACJ,CAAC,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAK,EAAE,EAC3C,WAAW,EACX,SAAS,EACT,YAAY,EACZ,WAAW,EACX,KAAK,GAON,EAA2B,EAAE;IAC5B,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,UAAU,CAAC;IAElD,MAAM,GAAG,GACP,0EAA0E;QAC1E,IAAI,WAAW,cAAc,IAAI,IAAI,SAAS,EAAE;QAChD,WAAW,YAAY,EAAE,CAAC;IAE5B,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;QAChC,MAAM,EAAE,KAAK;QACb,OAAO,EAAE;YACP,cAAc,EAAE,kBAAkB;YAClC,aAAa,EAAE,UAAU,WAAW,EAAE;SACvC;KACF,CAAC,CAAC;IAEH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,MAAM,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE;YAClD,UAAU,EAAE,QAAQ,CAAC,MAAM;SAC5B,CAAC,CAAC;IACL,CAAC;IAED,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;AACzB,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,EACzC,KAAK,EACL,gBAAgB,GAIjB,EAA4C,EAAE;IAC7C,OAAO,aAAa,CAAC,mBAAmB,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC;AACpE,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,KAAK,IAAmB,EAAE;IAClE,OAAO,OAAO,CAAC,OAAO,CAAC,sCAAsC,CAAC,CAAC;AACjE,CAAC,CAAC","sourcesContent":["// External dependencies\nimport {Linking} from 'react-native';\n\n// Internal modules\nimport ExpoIapModule from '../ExpoIapModule';\n\n// Types\nimport {PurchaseResult} from '../ExpoIap.types';\nimport {ReceiptAndroid} from '../types/ExpoIapAndroid.types';\n\n// Type guards\nexport function isProductAndroid<T extends {platform?: string}>(\n item: unknown,\n): item is T & {platform: 'android'} {\n return (\n item != null &&\n typeof item === 'object' &&\n 'platform' in item &&\n item.platform === 'android'\n );\n}\n\n/**\n * Deep link to subscriptions screen on Android.\n * @param {string} sku The product's SKU (on Android)\n * @returns {Promise<void>}\n */\nexport const deepLinkToSubscriptionsAndroid = async ({\n sku,\n}: {\n sku: string;\n}): Promise<void> => {\n return Linking.openURL(\n `https://play.google.com/store/account/subscriptions?package=${await ExpoIapModule.getPackageName()}&sku=${sku}`,\n );\n};\n\n/**\n * Validate receipt for Android. NOTE: This method is here for debugging purposes only. Including\n * your access token in the binary you ship to users is potentially dangerous.\n * Use server side validation instead for your production builds\n * @param {string} packageName package name of your app.\n * @param {string} productId product id for your in app product.\n * @param {string} productToken token for your purchase (called 'token' in the API documentation).\n * @param {string} accessToken OAuth access token with androidpublisher scope. Required for authentication.\n * @param {boolean} isSub whether this is subscription or inapp. `true` for subscription.\n * @returns {Promise<ReceiptAndroid>}\n */\nexport const validateReceiptAndroid = async ({\n packageName,\n productId,\n productToken,\n accessToken,\n isSub,\n}: {\n packageName: string;\n productId: string;\n productToken: string;\n accessToken: string;\n isSub?: boolean;\n}): Promise<ReceiptAndroid> => {\n const type = isSub ? 'subscriptions' : 'products';\n\n const url =\n 'https://androidpublisher.googleapis.com/androidpublisher/v3/applications' +\n `/${packageName}/purchases/${type}/${productId}` +\n `/tokens/${productToken}`;\n\n const response = await fetch(url, {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n Authorization: `Bearer ${accessToken}`,\n },\n });\n\n if (!response.ok) {\n throw Object.assign(new Error(response.statusText), {\n statusCode: response.status,\n });\n }\n\n return response.json();\n};\n\n/**\n * Acknowledge a product (on Android.) No-op on iOS.\n * @param {string} token The product's token (on Android)\n * @returns {Promise<PurchaseResult | void>}\n */\nexport const acknowledgePurchaseAndroid = ({\n token,\n developerPayload,\n}: {\n token: string;\n developerPayload?: string;\n}): Promise<PurchaseResult | boolean | void> => {\n return ExpoIapModule.acknowledgePurchase(token, developerPayload);\n};\n\n/**\n * Open the Google Play Store to redeem offer codes (Android only).\n * Note: Google Play does not provide a direct API to redeem codes within the app.\n * This function opens the Play Store where users can manually enter their codes.\n *\n * @returns {Promise<void>}\n */\nexport const openRedeemOfferCodeAndroid = async (): Promise<void> => {\n return Linking.openURL(`https://play.google.com/redeem?code=`);\n};\n"]}
|
package/build/modules/ios.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ProductPurchase, PurchaseError } from '../ExpoIap.types';
|
|
2
|
-
import type { ProductStatusIos } from '../types/ExpoIapIos.types';
|
|
2
|
+
import type { ProductStatusIos, AppTransactionIOS } from '../types/ExpoIapIos.types';
|
|
3
3
|
export type TransactionEvent = {
|
|
4
4
|
transaction?: ProductPurchase;
|
|
5
5
|
error?: PurchaseError;
|
|
@@ -28,36 +28,75 @@ export declare function isProductIos<T extends {
|
|
|
28
28
|
/**
|
|
29
29
|
* Sync state with Appstore (iOS only)
|
|
30
30
|
* https://developer.apple.com/documentation/storekit/appstore/3791906-sync
|
|
31
|
+
*
|
|
32
|
+
* @returns Promise resolving to null on success
|
|
33
|
+
* @throws Error if called on non-iOS platform
|
|
34
|
+
*
|
|
35
|
+
* @platform iOS
|
|
31
36
|
*/
|
|
32
|
-
export declare const
|
|
37
|
+
export declare const syncIOS: () => Promise<null>;
|
|
33
38
|
/**
|
|
39
|
+
* Check if user is eligible for introductory offer
|
|
34
40
|
*
|
|
41
|
+
* @param groupID The subscription group ID
|
|
42
|
+
* @returns Promise resolving to true if eligible
|
|
43
|
+
* @throws Error if called on non-iOS platform
|
|
44
|
+
*
|
|
45
|
+
* @platform iOS
|
|
35
46
|
*/
|
|
36
|
-
export declare const
|
|
47
|
+
export declare const isEligibleForIntroOfferIOS: (groupID: string) => Promise<boolean>;
|
|
37
48
|
/**
|
|
49
|
+
* Get subscription status for a specific SKU
|
|
38
50
|
*
|
|
51
|
+
* @param sku The product SKU
|
|
52
|
+
* @returns Promise resolving to array of subscription status
|
|
53
|
+
* @throws Error if called on non-iOS platform
|
|
54
|
+
*
|
|
55
|
+
* @platform iOS
|
|
39
56
|
*/
|
|
40
|
-
export declare const
|
|
57
|
+
export declare const subscriptionStatusIOS: (sku: string) => Promise<ProductStatusIos[]>;
|
|
41
58
|
/**
|
|
59
|
+
* Get current entitlement for a specific SKU
|
|
60
|
+
*
|
|
61
|
+
* @param sku The product SKU
|
|
62
|
+
* @returns Promise resolving to current entitlement
|
|
63
|
+
* @throws Error if called on non-iOS platform
|
|
42
64
|
*
|
|
65
|
+
* @platform iOS
|
|
43
66
|
*/
|
|
44
|
-
export declare const
|
|
67
|
+
export declare const currentEntitlementIOS: (sku: string) => Promise<ProductPurchase>;
|
|
45
68
|
/**
|
|
69
|
+
* Get latest transaction for a specific SKU
|
|
70
|
+
*
|
|
71
|
+
* @param sku The product SKU
|
|
72
|
+
* @returns Promise resolving to latest transaction
|
|
73
|
+
* @throws Error if called on non-iOS platform
|
|
46
74
|
*
|
|
75
|
+
* @platform iOS
|
|
47
76
|
*/
|
|
48
|
-
export declare const
|
|
77
|
+
export declare const latestTransactionIOS: (sku: string) => Promise<ProductPurchase>;
|
|
49
78
|
/**
|
|
79
|
+
* Begin refund request for a specific SKU
|
|
80
|
+
*
|
|
81
|
+
* @param sku The product SKU
|
|
82
|
+
* @returns Promise resolving to refund request status
|
|
83
|
+
* @throws Error if called on non-iOS platform
|
|
50
84
|
*
|
|
85
|
+
* @platform iOS
|
|
51
86
|
*/
|
|
52
87
|
type RefundRequestStatus = 'success' | 'userCancelled';
|
|
53
|
-
export declare const
|
|
88
|
+
export declare const beginRefundRequestIOS: (sku: string) => Promise<RefundRequestStatus>;
|
|
54
89
|
/**
|
|
55
90
|
* Shows the system UI for managing subscriptions.
|
|
56
91
|
* When the user changes subscription renewal status, the system will emit events to
|
|
57
92
|
* purchaseUpdatedListener and transactionUpdatedIos listeners.
|
|
58
|
-
*
|
|
93
|
+
*
|
|
94
|
+
* @returns Promise resolving to null on success
|
|
95
|
+
* @throws Error if called on non-iOS platform
|
|
96
|
+
*
|
|
97
|
+
* @platform iOS
|
|
59
98
|
*/
|
|
60
|
-
export declare const
|
|
99
|
+
export declare const showManageSubscriptionsIOS: () => Promise<null>;
|
|
61
100
|
/**
|
|
62
101
|
* Get the receipt data from the iOS device.
|
|
63
102
|
* This returns the base64 encoded receipt data which can be sent to your server
|
|
@@ -68,23 +107,29 @@ export declare const showManageSubscriptions: () => Promise<null>;
|
|
|
68
107
|
*
|
|
69
108
|
* @returns {Promise<string>} Base64 encoded receipt data
|
|
70
109
|
*/
|
|
71
|
-
export declare const
|
|
110
|
+
export declare const getReceiptIOS: () => Promise<string>;
|
|
72
111
|
/**
|
|
73
112
|
* Check if a transaction is verified through StoreKit 2.
|
|
74
113
|
* StoreKit 2 performs local verification of transaction JWS signatures.
|
|
75
114
|
*
|
|
76
|
-
* @param
|
|
77
|
-
* @returns
|
|
115
|
+
* @param sku The product's SKU (on iOS)
|
|
116
|
+
* @returns Promise resolving to true if the transaction is verified
|
|
117
|
+
* @throws Error if called on non-iOS platform
|
|
118
|
+
*
|
|
119
|
+
* @platform iOS
|
|
78
120
|
*/
|
|
79
|
-
export declare const
|
|
121
|
+
export declare const isTransactionVerifiedIOS: (sku: string) => Promise<boolean>;
|
|
80
122
|
/**
|
|
81
123
|
* Get the JWS representation of a purchase for server-side verification.
|
|
82
124
|
* The JWS (JSON Web Signature) can be verified on your server using Apple's public keys.
|
|
83
125
|
*
|
|
84
|
-
* @param
|
|
85
|
-
* @returns
|
|
126
|
+
* @param sku The product's SKU (on iOS)
|
|
127
|
+
* @returns Promise resolving to JWS representation of the transaction
|
|
128
|
+
* @throws Error if called on non-iOS platform
|
|
129
|
+
*
|
|
130
|
+
* @platform iOS
|
|
86
131
|
*/
|
|
87
|
-
export declare const
|
|
132
|
+
export declare const getTransactionJwsIOS: (sku: string) => Promise<string>;
|
|
88
133
|
/**
|
|
89
134
|
* Validate receipt for iOS using StoreKit 2's built-in verification.
|
|
90
135
|
* Returns receipt data and verification information to help with server-side validation.
|
|
@@ -100,11 +145,90 @@ export declare const getTransactionJws: (sku: string) => Promise<string>;
|
|
|
100
145
|
* latestTransaction?: ProductPurchase;
|
|
101
146
|
* }>}
|
|
102
147
|
*/
|
|
148
|
+
export declare const validateReceiptIOS: (sku: string) => Promise<{
|
|
149
|
+
isValid: boolean;
|
|
150
|
+
receiptData: string;
|
|
151
|
+
jwsRepresentation: string;
|
|
152
|
+
latestTransaction?: ProductPurchase;
|
|
153
|
+
}>;
|
|
154
|
+
/**
|
|
155
|
+
* Present the code redemption sheet for offer codes (iOS only).
|
|
156
|
+
* This allows users to redeem promotional codes for in-app purchases and subscriptions.
|
|
157
|
+
*
|
|
158
|
+
* Note: This only works on real devices, not simulators.
|
|
159
|
+
*
|
|
160
|
+
* @returns Promise resolving to true if the sheet was presented successfully
|
|
161
|
+
* @throws Error if called on non-iOS platform or tvOS
|
|
162
|
+
*
|
|
163
|
+
* @platform iOS
|
|
164
|
+
*/
|
|
165
|
+
export declare const presentCodeRedemptionSheetIOS: () => Promise<boolean>;
|
|
166
|
+
/**
|
|
167
|
+
* Get app transaction information (iOS 16.0+).
|
|
168
|
+
* AppTransaction represents the initial purchase that unlocked the app.
|
|
169
|
+
*
|
|
170
|
+
* @returns Promise resolving to the app transaction information or null if not available
|
|
171
|
+
* @throws Error if called on non-iOS platform or iOS version < 16.0
|
|
172
|
+
*
|
|
173
|
+
* @platform iOS
|
|
174
|
+
*/
|
|
175
|
+
export declare const getAppTransactionIOS: () => Promise<AppTransactionIOS | null>;
|
|
176
|
+
/**
|
|
177
|
+
* @deprecated Use `syncIOS` instead. This function will be removed in version 3.0.0.
|
|
178
|
+
*/
|
|
179
|
+
export declare const sync: () => Promise<null>;
|
|
180
|
+
/**
|
|
181
|
+
* @deprecated Use `isEligibleForIntroOfferIOS` instead. This function will be removed in version 3.0.0.
|
|
182
|
+
*/
|
|
183
|
+
export declare const isEligibleForIntroOffer: (groupID: string) => Promise<boolean>;
|
|
184
|
+
/**
|
|
185
|
+
* @deprecated Use `subscriptionStatusIOS` instead. This function will be removed in version 3.0.0.
|
|
186
|
+
*/
|
|
187
|
+
export declare const subscriptionStatus: (sku: string) => Promise<ProductStatusIos[]>;
|
|
188
|
+
/**
|
|
189
|
+
* @deprecated Use `currentEntitlementIOS` instead. This function will be removed in version 3.0.0.
|
|
190
|
+
*/
|
|
191
|
+
export declare const currentEntitlement: (sku: string) => Promise<ProductPurchase>;
|
|
192
|
+
/**
|
|
193
|
+
* @deprecated Use `latestTransactionIOS` instead. This function will be removed in version 3.0.0.
|
|
194
|
+
*/
|
|
195
|
+
export declare const latestTransaction: (sku: string) => Promise<ProductPurchase>;
|
|
196
|
+
/**
|
|
197
|
+
* @deprecated Use `beginRefundRequestIOS` instead. This function will be removed in version 3.0.0.
|
|
198
|
+
*/
|
|
199
|
+
export declare const beginRefundRequest: (sku: string) => Promise<RefundRequestStatus>;
|
|
200
|
+
/**
|
|
201
|
+
* @deprecated Use `showManageSubscriptionsIOS` instead. This function will be removed in version 3.0.0.
|
|
202
|
+
*/
|
|
203
|
+
export declare const showManageSubscriptions: () => Promise<null>;
|
|
204
|
+
/**
|
|
205
|
+
* @deprecated Use `getReceiptIOS` instead. This function will be removed in version 3.0.0.
|
|
206
|
+
*/
|
|
207
|
+
export declare const getReceiptIos: () => Promise<string>;
|
|
208
|
+
/**
|
|
209
|
+
* @deprecated Use `isTransactionVerifiedIOS` instead. This function will be removed in version 3.0.0.
|
|
210
|
+
*/
|
|
211
|
+
export declare const isTransactionVerified: (sku: string) => Promise<boolean>;
|
|
212
|
+
/**
|
|
213
|
+
* @deprecated Use `getTransactionJwsIOS` instead. This function will be removed in version 3.0.0.
|
|
214
|
+
*/
|
|
215
|
+
export declare const getTransactionJws: (sku: string) => Promise<string>;
|
|
216
|
+
/**
|
|
217
|
+
* @deprecated Use `validateReceiptIOS` instead. This function will be removed in version 3.0.0.
|
|
218
|
+
*/
|
|
103
219
|
export declare const validateReceiptIos: (sku: string) => Promise<{
|
|
104
220
|
isValid: boolean;
|
|
105
221
|
receiptData: string;
|
|
106
222
|
jwsRepresentation: string;
|
|
107
223
|
latestTransaction?: ProductPurchase;
|
|
108
224
|
}>;
|
|
225
|
+
/**
|
|
226
|
+
* @deprecated Use `presentCodeRedemptionSheetIOS` instead. This function will be removed in version 3.0.0.
|
|
227
|
+
*/
|
|
228
|
+
export declare const presentCodeRedemptionSheet: () => Promise<boolean>;
|
|
229
|
+
/**
|
|
230
|
+
* @deprecated Use `getAppTransactionIOS` instead. This function will be removed in version 3.0.0.
|
|
231
|
+
*/
|
|
232
|
+
export declare const getAppTransaction: () => Promise<AppTransactionIOS | null>;
|
|
109
233
|
export {};
|
|
110
234
|
//# sourceMappingURL=ios.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ios.d.ts","sourceRoot":"","sources":["../../src/modules/ios.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ios.d.ts","sourceRoot":"","sources":["../../src/modules/ios.ts"],"names":[],"mappings":"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"}
|
package/build/modules/ios.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
// External dependencies
|
|
1
2
|
import { Platform } from 'react-native';
|
|
3
|
+
// Internal modules
|
|
2
4
|
import { purchaseUpdatedListener } from '..';
|
|
3
5
|
import ExpoIapModule from '../ExpoIapModule';
|
|
4
6
|
// Listeners
|
|
@@ -56,32 +58,100 @@ export function isProductIos(item) {
|
|
|
56
58
|
/**
|
|
57
59
|
* Sync state with Appstore (iOS only)
|
|
58
60
|
* https://developer.apple.com/documentation/storekit/appstore/3791906-sync
|
|
61
|
+
*
|
|
62
|
+
* @returns Promise resolving to null on success
|
|
63
|
+
* @throws Error if called on non-iOS platform
|
|
64
|
+
*
|
|
65
|
+
* @platform iOS
|
|
59
66
|
*/
|
|
60
|
-
export const
|
|
67
|
+
export const syncIOS = () => {
|
|
68
|
+
if (Platform.OS !== 'ios') {
|
|
69
|
+
throw new Error('syncIOS: This method is only available on iOS');
|
|
70
|
+
}
|
|
71
|
+
return ExpoIapModule.sync();
|
|
72
|
+
};
|
|
61
73
|
/**
|
|
74
|
+
* Check if user is eligible for introductory offer
|
|
75
|
+
*
|
|
76
|
+
* @param groupID The subscription group ID
|
|
77
|
+
* @returns Promise resolving to true if eligible
|
|
78
|
+
* @throws Error if called on non-iOS platform
|
|
62
79
|
*
|
|
80
|
+
* @platform iOS
|
|
63
81
|
*/
|
|
64
|
-
export const
|
|
82
|
+
export const isEligibleForIntroOfferIOS = (groupID) => {
|
|
83
|
+
if (Platform.OS !== 'ios') {
|
|
84
|
+
throw new Error('isEligibleForIntroOfferIOS: This method is only available on iOS');
|
|
85
|
+
}
|
|
86
|
+
return ExpoIapModule.isEligibleForIntroOffer(groupID);
|
|
87
|
+
};
|
|
65
88
|
/**
|
|
89
|
+
* Get subscription status for a specific SKU
|
|
90
|
+
*
|
|
91
|
+
* @param sku The product SKU
|
|
92
|
+
* @returns Promise resolving to array of subscription status
|
|
93
|
+
* @throws Error if called on non-iOS platform
|
|
66
94
|
*
|
|
95
|
+
* @platform iOS
|
|
67
96
|
*/
|
|
68
|
-
export const
|
|
97
|
+
export const subscriptionStatusIOS = (sku) => {
|
|
98
|
+
if (Platform.OS !== 'ios') {
|
|
99
|
+
throw new Error('subscriptionStatusIOS: This method is only available on iOS');
|
|
100
|
+
}
|
|
101
|
+
return ExpoIapModule.subscriptionStatus(sku);
|
|
102
|
+
};
|
|
69
103
|
/**
|
|
104
|
+
* Get current entitlement for a specific SKU
|
|
70
105
|
*
|
|
106
|
+
* @param sku The product SKU
|
|
107
|
+
* @returns Promise resolving to current entitlement
|
|
108
|
+
* @throws Error if called on non-iOS platform
|
|
109
|
+
*
|
|
110
|
+
* @platform iOS
|
|
71
111
|
*/
|
|
72
|
-
export const
|
|
112
|
+
export const currentEntitlementIOS = (sku) => {
|
|
113
|
+
if (Platform.OS !== 'ios') {
|
|
114
|
+
throw new Error('currentEntitlementIOS: This method is only available on iOS');
|
|
115
|
+
}
|
|
116
|
+
return ExpoIapModule.currentEntitlement(sku);
|
|
117
|
+
};
|
|
73
118
|
/**
|
|
119
|
+
* Get latest transaction for a specific SKU
|
|
120
|
+
*
|
|
121
|
+
* @param sku The product SKU
|
|
122
|
+
* @returns Promise resolving to latest transaction
|
|
123
|
+
* @throws Error if called on non-iOS platform
|
|
74
124
|
*
|
|
125
|
+
* @platform iOS
|
|
75
126
|
*/
|
|
76
|
-
export const
|
|
77
|
-
|
|
127
|
+
export const latestTransactionIOS = (sku) => {
|
|
128
|
+
if (Platform.OS !== 'ios') {
|
|
129
|
+
throw new Error('latestTransactionIOS: This method is only available on iOS');
|
|
130
|
+
}
|
|
131
|
+
return ExpoIapModule.latestTransaction(sku);
|
|
132
|
+
};
|
|
133
|
+
export const beginRefundRequestIOS = (sku) => {
|
|
134
|
+
if (Platform.OS !== 'ios') {
|
|
135
|
+
throw new Error('beginRefundRequestIOS: This method is only available on iOS');
|
|
136
|
+
}
|
|
137
|
+
return ExpoIapModule.beginRefundRequest(sku);
|
|
138
|
+
};
|
|
78
139
|
/**
|
|
79
140
|
* Shows the system UI for managing subscriptions.
|
|
80
141
|
* When the user changes subscription renewal status, the system will emit events to
|
|
81
142
|
* purchaseUpdatedListener and transactionUpdatedIos listeners.
|
|
82
|
-
*
|
|
143
|
+
*
|
|
144
|
+
* @returns Promise resolving to null on success
|
|
145
|
+
* @throws Error if called on non-iOS platform
|
|
146
|
+
*
|
|
147
|
+
* @platform iOS
|
|
83
148
|
*/
|
|
84
|
-
export const
|
|
149
|
+
export const showManageSubscriptionsIOS = () => {
|
|
150
|
+
if (Platform.OS !== 'ios') {
|
|
151
|
+
throw new Error('showManageSubscriptionsIOS: This method is only available on iOS');
|
|
152
|
+
}
|
|
153
|
+
return ExpoIapModule.showManageSubscriptions();
|
|
154
|
+
};
|
|
85
155
|
/**
|
|
86
156
|
* Get the receipt data from the iOS device.
|
|
87
157
|
* This returns the base64 encoded receipt data which can be sent to your server
|
|
@@ -92,7 +162,7 @@ export const showManageSubscriptions = () => ExpoIapModule.showManageSubscriptio
|
|
|
92
162
|
*
|
|
93
163
|
* @returns {Promise<string>} Base64 encoded receipt data
|
|
94
164
|
*/
|
|
95
|
-
export const
|
|
165
|
+
export const getReceiptIOS = () => {
|
|
96
166
|
if (Platform.OS !== 'ios') {
|
|
97
167
|
throw new Error('This method is only available on iOS');
|
|
98
168
|
}
|
|
@@ -102,12 +172,15 @@ export const getReceiptIos = () => {
|
|
|
102
172
|
* Check if a transaction is verified through StoreKit 2.
|
|
103
173
|
* StoreKit 2 performs local verification of transaction JWS signatures.
|
|
104
174
|
*
|
|
105
|
-
* @param
|
|
106
|
-
* @returns
|
|
175
|
+
* @param sku The product's SKU (on iOS)
|
|
176
|
+
* @returns Promise resolving to true if the transaction is verified
|
|
177
|
+
* @throws Error if called on non-iOS platform
|
|
178
|
+
*
|
|
179
|
+
* @platform iOS
|
|
107
180
|
*/
|
|
108
|
-
export const
|
|
181
|
+
export const isTransactionVerifiedIOS = (sku) => {
|
|
109
182
|
if (Platform.OS !== 'ios') {
|
|
110
|
-
throw new Error('This method is only available on iOS');
|
|
183
|
+
throw new Error('isTransactionVerifiedIOS: This method is only available on iOS');
|
|
111
184
|
}
|
|
112
185
|
return ExpoIapModule.isTransactionVerified(sku);
|
|
113
186
|
};
|
|
@@ -115,12 +188,15 @@ export const isTransactionVerified = (sku) => {
|
|
|
115
188
|
* Get the JWS representation of a purchase for server-side verification.
|
|
116
189
|
* The JWS (JSON Web Signature) can be verified on your server using Apple's public keys.
|
|
117
190
|
*
|
|
118
|
-
* @param
|
|
119
|
-
* @returns
|
|
191
|
+
* @param sku The product's SKU (on iOS)
|
|
192
|
+
* @returns Promise resolving to JWS representation of the transaction
|
|
193
|
+
* @throws Error if called on non-iOS platform
|
|
194
|
+
*
|
|
195
|
+
* @platform iOS
|
|
120
196
|
*/
|
|
121
|
-
export const
|
|
197
|
+
export const getTransactionJwsIOS = (sku) => {
|
|
122
198
|
if (Platform.OS !== 'ios') {
|
|
123
|
-
throw new Error('This method is only available on iOS');
|
|
199
|
+
throw new Error('getTransactionJwsIOS: This method is only available on iOS');
|
|
124
200
|
}
|
|
125
201
|
return ExpoIapModule.getTransactionJws(sku);
|
|
126
202
|
};
|
|
@@ -139,11 +215,136 @@ export const getTransactionJws = (sku) => {
|
|
|
139
215
|
* latestTransaction?: ProductPurchase;
|
|
140
216
|
* }>}
|
|
141
217
|
*/
|
|
142
|
-
export const
|
|
218
|
+
export const validateReceiptIOS = async (sku) => {
|
|
143
219
|
if (Platform.OS !== 'ios') {
|
|
144
220
|
throw new Error('This method is only available on iOS');
|
|
145
221
|
}
|
|
146
|
-
const result = await ExpoIapModule.
|
|
222
|
+
const result = await ExpoIapModule.validateReceiptIOS(sku);
|
|
147
223
|
return result;
|
|
148
224
|
};
|
|
225
|
+
/**
|
|
226
|
+
* Present the code redemption sheet for offer codes (iOS only).
|
|
227
|
+
* This allows users to redeem promotional codes for in-app purchases and subscriptions.
|
|
228
|
+
*
|
|
229
|
+
* Note: This only works on real devices, not simulators.
|
|
230
|
+
*
|
|
231
|
+
* @returns Promise resolving to true if the sheet was presented successfully
|
|
232
|
+
* @throws Error if called on non-iOS platform or tvOS
|
|
233
|
+
*
|
|
234
|
+
* @platform iOS
|
|
235
|
+
*/
|
|
236
|
+
export const presentCodeRedemptionSheetIOS = () => {
|
|
237
|
+
if (Platform.OS !== 'ios') {
|
|
238
|
+
throw new Error('presentCodeRedemptionSheetIOS: This method is only available on iOS');
|
|
239
|
+
}
|
|
240
|
+
return ExpoIapModule.presentCodeRedemptionSheet();
|
|
241
|
+
};
|
|
242
|
+
/**
|
|
243
|
+
* Get app transaction information (iOS 16.0+).
|
|
244
|
+
* AppTransaction represents the initial purchase that unlocked the app.
|
|
245
|
+
*
|
|
246
|
+
* @returns Promise resolving to the app transaction information or null if not available
|
|
247
|
+
* @throws Error if called on non-iOS platform or iOS version < 16.0
|
|
248
|
+
*
|
|
249
|
+
* @platform iOS
|
|
250
|
+
*/
|
|
251
|
+
export const getAppTransactionIOS = () => {
|
|
252
|
+
if (Platform.OS !== 'ios') {
|
|
253
|
+
throw new Error('getAppTransactionIOS: This method is only available on iOS');
|
|
254
|
+
}
|
|
255
|
+
return ExpoIapModule.getAppTransaction();
|
|
256
|
+
};
|
|
257
|
+
// ============= DEPRECATED FUNCTIONS =============
|
|
258
|
+
// These will be removed in version 3.0.0
|
|
259
|
+
/**
|
|
260
|
+
* @deprecated Use `syncIOS` instead. This function will be removed in version 3.0.0.
|
|
261
|
+
*/
|
|
262
|
+
export const sync = () => {
|
|
263
|
+
console.warn('`sync` is deprecated. Use `syncIOS` instead. This function will be removed in version 3.0.0.');
|
|
264
|
+
return syncIOS();
|
|
265
|
+
};
|
|
266
|
+
/**
|
|
267
|
+
* @deprecated Use `isEligibleForIntroOfferIOS` instead. This function will be removed in version 3.0.0.
|
|
268
|
+
*/
|
|
269
|
+
export const isEligibleForIntroOffer = (groupID) => {
|
|
270
|
+
console.warn('`isEligibleForIntroOffer` is deprecated. Use `isEligibleForIntroOfferIOS` instead. This function will be removed in version 3.0.0.');
|
|
271
|
+
return isEligibleForIntroOfferIOS(groupID);
|
|
272
|
+
};
|
|
273
|
+
/**
|
|
274
|
+
* @deprecated Use `subscriptionStatusIOS` instead. This function will be removed in version 3.0.0.
|
|
275
|
+
*/
|
|
276
|
+
export const subscriptionStatus = (sku) => {
|
|
277
|
+
console.warn('`subscriptionStatus` is deprecated. Use `subscriptionStatusIOS` instead. This function will be removed in version 3.0.0.');
|
|
278
|
+
return subscriptionStatusIOS(sku);
|
|
279
|
+
};
|
|
280
|
+
/**
|
|
281
|
+
* @deprecated Use `currentEntitlementIOS` instead. This function will be removed in version 3.0.0.
|
|
282
|
+
*/
|
|
283
|
+
export const currentEntitlement = (sku) => {
|
|
284
|
+
console.warn('`currentEntitlement` is deprecated. Use `currentEntitlementIOS` instead. This function will be removed in version 3.0.0.');
|
|
285
|
+
return currentEntitlementIOS(sku);
|
|
286
|
+
};
|
|
287
|
+
/**
|
|
288
|
+
* @deprecated Use `latestTransactionIOS` instead. This function will be removed in version 3.0.0.
|
|
289
|
+
*/
|
|
290
|
+
export const latestTransaction = (sku) => {
|
|
291
|
+
console.warn('`latestTransaction` is deprecated. Use `latestTransactionIOS` instead. This function will be removed in version 3.0.0.');
|
|
292
|
+
return latestTransactionIOS(sku);
|
|
293
|
+
};
|
|
294
|
+
/**
|
|
295
|
+
* @deprecated Use `beginRefundRequestIOS` instead. This function will be removed in version 3.0.0.
|
|
296
|
+
*/
|
|
297
|
+
export const beginRefundRequest = (sku) => {
|
|
298
|
+
console.warn('`beginRefundRequest` is deprecated. Use `beginRefundRequestIOS` instead. This function will be removed in version 3.0.0.');
|
|
299
|
+
return beginRefundRequestIOS(sku);
|
|
300
|
+
};
|
|
301
|
+
/**
|
|
302
|
+
* @deprecated Use `showManageSubscriptionsIOS` instead. This function will be removed in version 3.0.0.
|
|
303
|
+
*/
|
|
304
|
+
export const showManageSubscriptions = () => {
|
|
305
|
+
console.warn('`showManageSubscriptions` is deprecated. Use `showManageSubscriptionsIOS` instead. This function will be removed in version 3.0.0.');
|
|
306
|
+
return showManageSubscriptionsIOS();
|
|
307
|
+
};
|
|
308
|
+
/**
|
|
309
|
+
* @deprecated Use `getReceiptIOS` instead. This function will be removed in version 3.0.0.
|
|
310
|
+
*/
|
|
311
|
+
export const getReceiptIos = () => {
|
|
312
|
+
console.warn('`getReceiptIos` is deprecated. Use `getReceiptIOS` instead. This function will be removed in version 3.0.0.');
|
|
313
|
+
return getReceiptIOS();
|
|
314
|
+
};
|
|
315
|
+
/**
|
|
316
|
+
* @deprecated Use `isTransactionVerifiedIOS` instead. This function will be removed in version 3.0.0.
|
|
317
|
+
*/
|
|
318
|
+
export const isTransactionVerified = (sku) => {
|
|
319
|
+
console.warn('`isTransactionVerified` is deprecated. Use `isTransactionVerifiedIOS` instead. This function will be removed in version 3.0.0.');
|
|
320
|
+
return isTransactionVerifiedIOS(sku);
|
|
321
|
+
};
|
|
322
|
+
/**
|
|
323
|
+
* @deprecated Use `getTransactionJwsIOS` instead. This function will be removed in version 3.0.0.
|
|
324
|
+
*/
|
|
325
|
+
export const getTransactionJws = (sku) => {
|
|
326
|
+
console.warn('`getTransactionJws` is deprecated. Use `getTransactionJwsIOS` instead. This function will be removed in version 3.0.0.');
|
|
327
|
+
return getTransactionJwsIOS(sku);
|
|
328
|
+
};
|
|
329
|
+
/**
|
|
330
|
+
* @deprecated Use `validateReceiptIOS` instead. This function will be removed in version 3.0.0.
|
|
331
|
+
*/
|
|
332
|
+
export const validateReceiptIos = async (sku) => {
|
|
333
|
+
console.warn('`validateReceiptIos` is deprecated. Use `validateReceiptIOS` instead. This function will be removed in version 3.0.0.');
|
|
334
|
+
return validateReceiptIOS(sku);
|
|
335
|
+
};
|
|
336
|
+
/**
|
|
337
|
+
* @deprecated Use `presentCodeRedemptionSheetIOS` instead. This function will be removed in version 3.0.0.
|
|
338
|
+
*/
|
|
339
|
+
export const presentCodeRedemptionSheet = () => {
|
|
340
|
+
console.warn('`presentCodeRedemptionSheet` is deprecated. Use `presentCodeRedemptionSheetIOS` instead. This function will be removed in version 3.0.0.');
|
|
341
|
+
return presentCodeRedemptionSheetIOS();
|
|
342
|
+
};
|
|
343
|
+
/**
|
|
344
|
+
* @deprecated Use `getAppTransactionIOS` instead. This function will be removed in version 3.0.0.
|
|
345
|
+
*/
|
|
346
|
+
export const getAppTransaction = () => {
|
|
347
|
+
console.warn('`getAppTransaction` is deprecated. Use `getAppTransactionIOS` instead. This function will be removed in version 3.0.0.');
|
|
348
|
+
return getAppTransactionIOS();
|
|
349
|
+
};
|
|
149
350
|
//# sourceMappingURL=ios.js.map
|