@apps-in-toss/native-modules 1.7.1 → 1.8.0
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/CHANGELOG.md +8 -0
- package/dist/index.cjs +26 -1
- package/dist/index.d.cts +24 -3
- package/dist/index.d.ts +24 -3
- package/dist/index.js +26 -1
- package/package.json +2 -2
- package/src/AppsInTossModule/native-modules/ads/googleAdMobV2.ts +45 -0
- package/src/AppsInTossModule/native-modules/index.ts +7 -2
package/CHANGELOG.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -448,6 +448,30 @@ function createIsSupported() {
|
|
|
448
448
|
}
|
|
449
449
|
loadAppsInTossAdMob.isSupported = createIsSupported();
|
|
450
450
|
showAppsInTossAdMob.isSupported = createIsSupported();
|
|
451
|
+
async function isAppsInTossAdMobLoaded(params) {
|
|
452
|
+
if (!isAppsInTossAdMobLoadedSupported()) {
|
|
453
|
+
return false;
|
|
454
|
+
}
|
|
455
|
+
return new Promise((resolve, reject) => {
|
|
456
|
+
const unregister = INTERNAL__appBridgeHandler.invokeAppBridgeMethod(
|
|
457
|
+
"getCachedStatusAppsInTossAdmob",
|
|
458
|
+
{
|
|
459
|
+
...params
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
onSuccess: (cached) => {
|
|
463
|
+
resolve(cached);
|
|
464
|
+
unregister();
|
|
465
|
+
},
|
|
466
|
+
onError: reject
|
|
467
|
+
}
|
|
468
|
+
);
|
|
469
|
+
});
|
|
470
|
+
}
|
|
471
|
+
function isAppsInTossAdMobLoadedSupported() {
|
|
472
|
+
return ENVIRONMENT !== "toss" ? false : isMinVersionSupported({ android: "5.244.0", ios: "5.244.0" });
|
|
473
|
+
}
|
|
474
|
+
isAppsInTossAdMobLoaded.isSupported = isAppsInTossAdMobLoadedSupported;
|
|
451
475
|
|
|
452
476
|
// src/AppsInTossModule/native-modules/checkoutPayment.ts
|
|
453
477
|
async function checkoutPayment(options) {
|
|
@@ -971,7 +995,8 @@ var TossPay = {
|
|
|
971
995
|
};
|
|
972
996
|
var GoogleAdMob = {
|
|
973
997
|
loadAppsInTossAdMob,
|
|
974
|
-
showAppsInTossAdMob
|
|
998
|
+
showAppsInTossAdMob,
|
|
999
|
+
isAppsInTossAdMobLoaded
|
|
975
1000
|
};
|
|
976
1001
|
|
|
977
1002
|
// src/AppsInTossModule/native-event-emitter/startUpdateLocation.ts
|
package/dist/index.d.cts
CHANGED
|
@@ -701,6 +701,25 @@ declare function showAppsInTossAdMob(params: ShowAdMobParams): () => void;
|
|
|
701
701
|
declare namespace showAppsInTossAdMob {
|
|
702
702
|
var isSupported: () => boolean;
|
|
703
703
|
}
|
|
704
|
+
interface IsAdMobLoadedOptions {
|
|
705
|
+
/**
|
|
706
|
+
* 광고 그룹 단위 ID
|
|
707
|
+
*/
|
|
708
|
+
adGroupId: string;
|
|
709
|
+
}
|
|
710
|
+
/**
|
|
711
|
+
* @public
|
|
712
|
+
* @category 광고
|
|
713
|
+
* @name showAppsInTossAdMob
|
|
714
|
+
* @description 이 함수는 `loadAppsInTossAdMob` 로 광고가 잘 불러와졌는지 확인해요.
|
|
715
|
+
* @param {string} params.adUnitId 광고 그룹 단위 ID예요.
|
|
716
|
+
* @property {() => boolean} [isSupported] 현재 실행 중인 앱(예: 토스 앱, 개발용 샌드박스 앱 등)에서 `isAppsInTossAdMobLoaded` 를 지원하는지 확인하는 함수예요. 기능을 사용하기 전에 지원 여부를 확인해야 해요.
|
|
717
|
+
*/
|
|
718
|
+
declare function isAppsInTossAdMobLoaded(params: IsAdMobLoadedOptions): Promise<boolean>;
|
|
719
|
+
declare namespace isAppsInTossAdMobLoaded {
|
|
720
|
+
var isSupported: typeof isAppsInTossAdMobLoadedSupported;
|
|
721
|
+
}
|
|
722
|
+
declare function isAppsInTossAdMobLoadedSupported(): boolean;
|
|
704
723
|
|
|
705
724
|
/**
|
|
706
725
|
* @public
|
|
@@ -2628,12 +2647,14 @@ declare const TossPay: {
|
|
|
2628
2647
|
* @category 광고
|
|
2629
2648
|
* @name GoogleAdMob
|
|
2630
2649
|
* @description Google AdMob 광고 관련 함수를 모아둔 객체예요.
|
|
2631
|
-
* @property {typeof loadAppsInTossAdMob} [loadAppsInTossAdMob] 광고를 로드하는 함수예요.
|
|
2632
|
-
* @property {typeof showAppsInTossAdMob} [showAppsInTossAdMob] 로드한 광고를 보여주는 함수예요.
|
|
2650
|
+
* @property {typeof loadAppsInTossAdMob} [loadAppsInTossAdMob] 광고를 로드하는 함수예요.
|
|
2651
|
+
* @property {typeof showAppsInTossAdMob} [showAppsInTossAdMob] 로드한 광고를 보여주는 함수예요.
|
|
2652
|
+
* @property {typeof isAppsInTossAdMobLoaded} [isAppsInTossAdMobLoaded] 광고가 로드되었는지 확인하는 함수예요.
|
|
2633
2653
|
*/
|
|
2634
2654
|
declare const GoogleAdMob: {
|
|
2635
2655
|
loadAppsInTossAdMob: typeof loadAppsInTossAdMob;
|
|
2636
2656
|
showAppsInTossAdMob: typeof showAppsInTossAdMob;
|
|
2657
|
+
isAppsInTossAdMobLoaded: typeof isAppsInTossAdMobLoaded;
|
|
2637
2658
|
};
|
|
2638
2659
|
|
|
2639
2660
|
/**
|
|
@@ -3101,4 +3122,4 @@ declare const INTERNAL__module: {
|
|
|
3101
3122
|
tossCoreEventLog: typeof tossCoreEventLog;
|
|
3102
3123
|
};
|
|
3103
3124
|
|
|
3104
|
-
export { AppsInTossModule, type AppsInTossSignTossCertParams, BedrockCoreModule, BedrockModule, type CheckoutPaymentOptions, type CheckoutPaymentResult, type CompletedOrRefundedOrdersResult, type ContactsViralParams, type EventLogParams, type GameCenterGameProfileResponse, type GetUserKeyForGameErrorResponse, type GetUserKeyForGameResponse, type GetUserKeyForGameSuccessResponse, GoogleAdMob, type GrantPromotionRewardForGameErrorResponse, type GrantPromotionRewardForGameErrorResult, type GrantPromotionRewardForGameResponse, type GrantPromotionRewardForGameSuccessResponse, type HapticFeedbackType, IAP, AppsInTossModuleInstance as INTERNAL__AppsInTossModule, INTERNAL__appBridgeHandler, INTERNAL__module, type IapCreateOneTimePurchaseOrderOptions, type IapCreateOneTimePurchaseOrderResult, type IapProductListItem, type LoadAdMobEvent, type LoadAdMobOptions, type LoadAdMobParams, type NetworkStatus, type Primitive, type SaveBase64DataParams, type ShowAdMobEvent, type ShowAdMobOptions, type ShowAdMobParams, Storage, type SubmitGameCenterLeaderBoardScoreResponse, TossPay, type UpdateLocationEventEmitter, appLogin, appsInTossEvent, appsInTossSignTossCert, closeView, contactsViral, eventLog, fetchAlbumPhotos, fetchContacts, generateHapticFeedback, getClipboardText, getCurrentLocation, getDeviceId, getGameCenterGameProfile, getIsTossLoginIntegratedService, getLocale, getNetworkStatus, getOperationalEnvironment, getPlatformOS, getSchemeUri, getTossAppVersion, getTossShareLink, getUserKeyForGame, grantPromotionRewardForGame, iapCreateOneTimePurchaseOrder, isMinVersionSupported, onVisibilityChangedByTransparentServiceWeb, openCamera, openGameCenterLeaderboard, openURL, processProductGrant, requestOneTimePurchase, saveBase64Data, setClipboardText, setDeviceOrientation, setIosSwipeGestureEnabled, setScreenAwakeMode, setSecureScreen, share, startUpdateLocation, submitGameCenterLeaderBoardScore };
|
|
3125
|
+
export { AppsInTossModule, type AppsInTossSignTossCertParams, BedrockCoreModule, BedrockModule, type CheckoutPaymentOptions, type CheckoutPaymentResult, type CompletedOrRefundedOrdersResult, type ContactsViralParams, type EventLogParams, type GameCenterGameProfileResponse, type GetUserKeyForGameErrorResponse, type GetUserKeyForGameResponse, type GetUserKeyForGameSuccessResponse, GoogleAdMob, type GrantPromotionRewardForGameErrorResponse, type GrantPromotionRewardForGameErrorResult, type GrantPromotionRewardForGameResponse, type GrantPromotionRewardForGameSuccessResponse, type HapticFeedbackType, IAP, AppsInTossModuleInstance as INTERNAL__AppsInTossModule, INTERNAL__appBridgeHandler, INTERNAL__module, type IapCreateOneTimePurchaseOrderOptions, type IapCreateOneTimePurchaseOrderResult, type IapProductListItem, type IsAdMobLoadedOptions, type LoadAdMobEvent, type LoadAdMobOptions, type LoadAdMobParams, type NetworkStatus, type Primitive, type SaveBase64DataParams, type ShowAdMobEvent, type ShowAdMobOptions, type ShowAdMobParams, Storage, type SubmitGameCenterLeaderBoardScoreResponse, TossPay, type UpdateLocationEventEmitter, appLogin, appsInTossEvent, appsInTossSignTossCert, closeView, contactsViral, eventLog, fetchAlbumPhotos, fetchContacts, generateHapticFeedback, getClipboardText, getCurrentLocation, getDeviceId, getGameCenterGameProfile, getIsTossLoginIntegratedService, getLocale, getNetworkStatus, getOperationalEnvironment, getPlatformOS, getSchemeUri, getTossAppVersion, getTossShareLink, getUserKeyForGame, grantPromotionRewardForGame, iapCreateOneTimePurchaseOrder, isMinVersionSupported, onVisibilityChangedByTransparentServiceWeb, openCamera, openGameCenterLeaderboard, openURL, processProductGrant, requestOneTimePurchase, saveBase64Data, setClipboardText, setDeviceOrientation, setIosSwipeGestureEnabled, setScreenAwakeMode, setSecureScreen, share, startUpdateLocation, submitGameCenterLeaderBoardScore };
|
package/dist/index.d.ts
CHANGED
|
@@ -701,6 +701,25 @@ declare function showAppsInTossAdMob(params: ShowAdMobParams): () => void;
|
|
|
701
701
|
declare namespace showAppsInTossAdMob {
|
|
702
702
|
var isSupported: () => boolean;
|
|
703
703
|
}
|
|
704
|
+
interface IsAdMobLoadedOptions {
|
|
705
|
+
/**
|
|
706
|
+
* 광고 그룹 단위 ID
|
|
707
|
+
*/
|
|
708
|
+
adGroupId: string;
|
|
709
|
+
}
|
|
710
|
+
/**
|
|
711
|
+
* @public
|
|
712
|
+
* @category 광고
|
|
713
|
+
* @name showAppsInTossAdMob
|
|
714
|
+
* @description 이 함수는 `loadAppsInTossAdMob` 로 광고가 잘 불러와졌는지 확인해요.
|
|
715
|
+
* @param {string} params.adUnitId 광고 그룹 단위 ID예요.
|
|
716
|
+
* @property {() => boolean} [isSupported] 현재 실행 중인 앱(예: 토스 앱, 개발용 샌드박스 앱 등)에서 `isAppsInTossAdMobLoaded` 를 지원하는지 확인하는 함수예요. 기능을 사용하기 전에 지원 여부를 확인해야 해요.
|
|
717
|
+
*/
|
|
718
|
+
declare function isAppsInTossAdMobLoaded(params: IsAdMobLoadedOptions): Promise<boolean>;
|
|
719
|
+
declare namespace isAppsInTossAdMobLoaded {
|
|
720
|
+
var isSupported: typeof isAppsInTossAdMobLoadedSupported;
|
|
721
|
+
}
|
|
722
|
+
declare function isAppsInTossAdMobLoadedSupported(): boolean;
|
|
704
723
|
|
|
705
724
|
/**
|
|
706
725
|
* @public
|
|
@@ -2628,12 +2647,14 @@ declare const TossPay: {
|
|
|
2628
2647
|
* @category 광고
|
|
2629
2648
|
* @name GoogleAdMob
|
|
2630
2649
|
* @description Google AdMob 광고 관련 함수를 모아둔 객체예요.
|
|
2631
|
-
* @property {typeof loadAppsInTossAdMob} [loadAppsInTossAdMob] 광고를 로드하는 함수예요.
|
|
2632
|
-
* @property {typeof showAppsInTossAdMob} [showAppsInTossAdMob] 로드한 광고를 보여주는 함수예요.
|
|
2650
|
+
* @property {typeof loadAppsInTossAdMob} [loadAppsInTossAdMob] 광고를 로드하는 함수예요.
|
|
2651
|
+
* @property {typeof showAppsInTossAdMob} [showAppsInTossAdMob] 로드한 광고를 보여주는 함수예요.
|
|
2652
|
+
* @property {typeof isAppsInTossAdMobLoaded} [isAppsInTossAdMobLoaded] 광고가 로드되었는지 확인하는 함수예요.
|
|
2633
2653
|
*/
|
|
2634
2654
|
declare const GoogleAdMob: {
|
|
2635
2655
|
loadAppsInTossAdMob: typeof loadAppsInTossAdMob;
|
|
2636
2656
|
showAppsInTossAdMob: typeof showAppsInTossAdMob;
|
|
2657
|
+
isAppsInTossAdMobLoaded: typeof isAppsInTossAdMobLoaded;
|
|
2637
2658
|
};
|
|
2638
2659
|
|
|
2639
2660
|
/**
|
|
@@ -3101,4 +3122,4 @@ declare const INTERNAL__module: {
|
|
|
3101
3122
|
tossCoreEventLog: typeof tossCoreEventLog;
|
|
3102
3123
|
};
|
|
3103
3124
|
|
|
3104
|
-
export { AppsInTossModule, type AppsInTossSignTossCertParams, BedrockCoreModule, BedrockModule, type CheckoutPaymentOptions, type CheckoutPaymentResult, type CompletedOrRefundedOrdersResult, type ContactsViralParams, type EventLogParams, type GameCenterGameProfileResponse, type GetUserKeyForGameErrorResponse, type GetUserKeyForGameResponse, type GetUserKeyForGameSuccessResponse, GoogleAdMob, type GrantPromotionRewardForGameErrorResponse, type GrantPromotionRewardForGameErrorResult, type GrantPromotionRewardForGameResponse, type GrantPromotionRewardForGameSuccessResponse, type HapticFeedbackType, IAP, AppsInTossModuleInstance as INTERNAL__AppsInTossModule, INTERNAL__appBridgeHandler, INTERNAL__module, type IapCreateOneTimePurchaseOrderOptions, type IapCreateOneTimePurchaseOrderResult, type IapProductListItem, type LoadAdMobEvent, type LoadAdMobOptions, type LoadAdMobParams, type NetworkStatus, type Primitive, type SaveBase64DataParams, type ShowAdMobEvent, type ShowAdMobOptions, type ShowAdMobParams, Storage, type SubmitGameCenterLeaderBoardScoreResponse, TossPay, type UpdateLocationEventEmitter, appLogin, appsInTossEvent, appsInTossSignTossCert, closeView, contactsViral, eventLog, fetchAlbumPhotos, fetchContacts, generateHapticFeedback, getClipboardText, getCurrentLocation, getDeviceId, getGameCenterGameProfile, getIsTossLoginIntegratedService, getLocale, getNetworkStatus, getOperationalEnvironment, getPlatformOS, getSchemeUri, getTossAppVersion, getTossShareLink, getUserKeyForGame, grantPromotionRewardForGame, iapCreateOneTimePurchaseOrder, isMinVersionSupported, onVisibilityChangedByTransparentServiceWeb, openCamera, openGameCenterLeaderboard, openURL, processProductGrant, requestOneTimePurchase, saveBase64Data, setClipboardText, setDeviceOrientation, setIosSwipeGestureEnabled, setScreenAwakeMode, setSecureScreen, share, startUpdateLocation, submitGameCenterLeaderBoardScore };
|
|
3125
|
+
export { AppsInTossModule, type AppsInTossSignTossCertParams, BedrockCoreModule, BedrockModule, type CheckoutPaymentOptions, type CheckoutPaymentResult, type CompletedOrRefundedOrdersResult, type ContactsViralParams, type EventLogParams, type GameCenterGameProfileResponse, type GetUserKeyForGameErrorResponse, type GetUserKeyForGameResponse, type GetUserKeyForGameSuccessResponse, GoogleAdMob, type GrantPromotionRewardForGameErrorResponse, type GrantPromotionRewardForGameErrorResult, type GrantPromotionRewardForGameResponse, type GrantPromotionRewardForGameSuccessResponse, type HapticFeedbackType, IAP, AppsInTossModuleInstance as INTERNAL__AppsInTossModule, INTERNAL__appBridgeHandler, INTERNAL__module, type IapCreateOneTimePurchaseOrderOptions, type IapCreateOneTimePurchaseOrderResult, type IapProductListItem, type IsAdMobLoadedOptions, type LoadAdMobEvent, type LoadAdMobOptions, type LoadAdMobParams, type NetworkStatus, type Primitive, type SaveBase64DataParams, type ShowAdMobEvent, type ShowAdMobOptions, type ShowAdMobParams, Storage, type SubmitGameCenterLeaderBoardScoreResponse, TossPay, type UpdateLocationEventEmitter, appLogin, appsInTossEvent, appsInTossSignTossCert, closeView, contactsViral, eventLog, fetchAlbumPhotos, fetchContacts, generateHapticFeedback, getClipboardText, getCurrentLocation, getDeviceId, getGameCenterGameProfile, getIsTossLoginIntegratedService, getLocale, getNetworkStatus, getOperationalEnvironment, getPlatformOS, getSchemeUri, getTossAppVersion, getTossShareLink, getUserKeyForGame, grantPromotionRewardForGame, iapCreateOneTimePurchaseOrder, isMinVersionSupported, onVisibilityChangedByTransparentServiceWeb, openCamera, openGameCenterLeaderboard, openURL, processProductGrant, requestOneTimePurchase, saveBase64Data, setClipboardText, setDeviceOrientation, setIosSwipeGestureEnabled, setScreenAwakeMode, setSecureScreen, share, startUpdateLocation, submitGameCenterLeaderBoardScore };
|
package/dist/index.js
CHANGED
|
@@ -372,6 +372,30 @@ function createIsSupported() {
|
|
|
372
372
|
}
|
|
373
373
|
loadAppsInTossAdMob.isSupported = createIsSupported();
|
|
374
374
|
showAppsInTossAdMob.isSupported = createIsSupported();
|
|
375
|
+
async function isAppsInTossAdMobLoaded(params) {
|
|
376
|
+
if (!isAppsInTossAdMobLoadedSupported()) {
|
|
377
|
+
return false;
|
|
378
|
+
}
|
|
379
|
+
return new Promise((resolve, reject) => {
|
|
380
|
+
const unregister = INTERNAL__appBridgeHandler.invokeAppBridgeMethod(
|
|
381
|
+
"getCachedStatusAppsInTossAdmob",
|
|
382
|
+
{
|
|
383
|
+
...params
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
onSuccess: (cached) => {
|
|
387
|
+
resolve(cached);
|
|
388
|
+
unregister();
|
|
389
|
+
},
|
|
390
|
+
onError: reject
|
|
391
|
+
}
|
|
392
|
+
);
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
function isAppsInTossAdMobLoadedSupported() {
|
|
396
|
+
return ENVIRONMENT !== "toss" ? false : isMinVersionSupported({ android: "5.244.0", ios: "5.244.0" });
|
|
397
|
+
}
|
|
398
|
+
isAppsInTossAdMobLoaded.isSupported = isAppsInTossAdMobLoadedSupported;
|
|
375
399
|
|
|
376
400
|
// src/AppsInTossModule/native-modules/checkoutPayment.ts
|
|
377
401
|
async function checkoutPayment(options) {
|
|
@@ -895,7 +919,8 @@ var TossPay = {
|
|
|
895
919
|
};
|
|
896
920
|
var GoogleAdMob = {
|
|
897
921
|
loadAppsInTossAdMob,
|
|
898
|
-
showAppsInTossAdMob
|
|
922
|
+
showAppsInTossAdMob,
|
|
923
|
+
isAppsInTossAdMobLoaded
|
|
899
924
|
};
|
|
900
925
|
|
|
901
926
|
// src/AppsInTossModule/native-event-emitter/startUpdateLocation.ts
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apps-in-toss/native-modules",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.8.0",
|
|
5
5
|
"description": "Native Modules for Apps In Toss",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"typecheck": "tsc --noEmit",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"vitest": "^3.2.4"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@apps-in-toss/types": "^1.
|
|
45
|
+
"@apps-in-toss/types": "^1.8.0",
|
|
46
46
|
"es-toolkit": "^1.39.3"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
@@ -372,3 +372,48 @@ function createIsSupported() {
|
|
|
372
372
|
|
|
373
373
|
loadAppsInTossAdMob.isSupported = createIsSupported();
|
|
374
374
|
showAppsInTossAdMob.isSupported = createIsSupported();
|
|
375
|
+
|
|
376
|
+
// MARK: - isAppsInTossAdMobLoaded
|
|
377
|
+
|
|
378
|
+
export interface IsAdMobLoadedOptions {
|
|
379
|
+
/**
|
|
380
|
+
* 광고 그룹 단위 ID
|
|
381
|
+
*/
|
|
382
|
+
adGroupId: string;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* @public
|
|
387
|
+
* @category 광고
|
|
388
|
+
* @name showAppsInTossAdMob
|
|
389
|
+
* @description 이 함수는 `loadAppsInTossAdMob` 로 광고가 잘 불러와졌는지 확인해요.
|
|
390
|
+
* @param {string} params.adUnitId 광고 그룹 단위 ID예요.
|
|
391
|
+
* @property {() => boolean} [isSupported] 현재 실행 중인 앱(예: 토스 앱, 개발용 샌드박스 앱 등)에서 `isAppsInTossAdMobLoaded` 를 지원하는지 확인하는 함수예요. 기능을 사용하기 전에 지원 여부를 확인해야 해요.
|
|
392
|
+
*/
|
|
393
|
+
export async function isAppsInTossAdMobLoaded(params: IsAdMobLoadedOptions) {
|
|
394
|
+
if (!isAppsInTossAdMobLoadedSupported()) {
|
|
395
|
+
return false;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
return new Promise<boolean>((resolve, reject) => {
|
|
399
|
+
const unregister = INTERNAL__appBridgeHandler.invokeAppBridgeMethod(
|
|
400
|
+
'getCachedStatusAppsInTossAdmob',
|
|
401
|
+
{
|
|
402
|
+
...params,
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
onSuccess: (cached) => {
|
|
406
|
+
resolve(cached);
|
|
407
|
+
unregister();
|
|
408
|
+
},
|
|
409
|
+
onError: reject,
|
|
410
|
+
}
|
|
411
|
+
);
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
function isAppsInTossAdMobLoadedSupported() {
|
|
416
|
+
return ENVIRONMENT !== 'toss' ? false : isMinVersionSupported({ android: '5.244.0', ios: '5.244.0' });
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
isAppsInTossAdMobLoaded.isSupported = isAppsInTossAdMobLoadedSupported;
|
|
@@ -8,6 +8,8 @@ import {
|
|
|
8
8
|
type ShowAdMobParams,
|
|
9
9
|
type ShowAdMobEvent,
|
|
10
10
|
type ShowAdMobOptions,
|
|
11
|
+
isAppsInTossAdMobLoaded,
|
|
12
|
+
type IsAdMobLoadedOptions,
|
|
11
13
|
} from './ads/googleAdMobV2';
|
|
12
14
|
// TossPay
|
|
13
15
|
import { checkoutPayment, type CheckoutPaymentOptions, type CheckoutPaymentResult } from './checkoutPayment';
|
|
@@ -53,6 +55,7 @@ export type {
|
|
|
53
55
|
ShowAdMobParams,
|
|
54
56
|
ShowAdMobEvent,
|
|
55
57
|
ShowAdMobOptions,
|
|
58
|
+
IsAdMobLoadedOptions,
|
|
56
59
|
};
|
|
57
60
|
|
|
58
61
|
/**
|
|
@@ -71,10 +74,12 @@ export const TossPay = {
|
|
|
71
74
|
* @category 광고
|
|
72
75
|
* @name GoogleAdMob
|
|
73
76
|
* @description Google AdMob 광고 관련 함수를 모아둔 객체예요.
|
|
74
|
-
* @property {typeof loadAppsInTossAdMob} [loadAppsInTossAdMob] 광고를 로드하는 함수예요.
|
|
75
|
-
* @property {typeof showAppsInTossAdMob} [showAppsInTossAdMob] 로드한 광고를 보여주는 함수예요.
|
|
77
|
+
* @property {typeof loadAppsInTossAdMob} [loadAppsInTossAdMob] 광고를 로드하는 함수예요.
|
|
78
|
+
* @property {typeof showAppsInTossAdMob} [showAppsInTossAdMob] 로드한 광고를 보여주는 함수예요.
|
|
79
|
+
* @property {typeof isAppsInTossAdMobLoaded} [isAppsInTossAdMobLoaded] 광고가 로드되었는지 확인하는 함수예요.
|
|
76
80
|
*/
|
|
77
81
|
export const GoogleAdMob = {
|
|
78
82
|
loadAppsInTossAdMob,
|
|
79
83
|
showAppsInTossAdMob,
|
|
84
|
+
isAppsInTossAdMobLoaded,
|
|
80
85
|
};
|