@apps-in-toss/native-modules 0.0.0-dev.1752049503789 → 1.0.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/dist/bridges-meta.json +36 -13
- package/dist/index.cjs +256 -120
- package/dist/index.d.cts +697 -229
- package/dist/index.d.ts +697 -229
- package/dist/index.js +233 -103
- package/package.json +7 -8
- package/src/AppsInTossModule/constants.ts +6 -0
- package/src/AppsInTossModule/native-event-emitter/appsInTossEvent.ts +13 -0
- package/src/AppsInTossModule/native-event-emitter/contactsViral.ts +140 -0
- package/src/AppsInTossModule/native-event-emitter/event-plugins/EntryMessageExitedEvent.ts +10 -0
- package/src/AppsInTossModule/native-event-emitter/event-plugins/UpdateLocationEvent.ts +60 -0
- package/src/AppsInTossModule/native-event-emitter/index.ts +5 -0
- package/src/AppsInTossModule/native-event-emitter/internal/AppBridgeCallbackEvent.ts +45 -0
- package/src/AppsInTossModule/native-event-emitter/internal/VisibilityChangedByTransparentServiceWebEvent.ts +50 -0
- package/src/AppsInTossModule/native-event-emitter/internal/appBridge.spec.ts +135 -0
- package/src/AppsInTossModule/native-event-emitter/internal/appBridge.ts +79 -0
- package/src/AppsInTossModule/native-event-emitter/internal/onVisibilityChangedByTransparentServiceWeb.ts +20 -0
- package/src/AppsInTossModule/native-event-emitter/nativeEventEmitter.ts +35 -0
- package/src/AppsInTossModule/native-event-emitter/startUpdateLocation.ts +98 -0
- package/src/AppsInTossModule/native-event-emitter/types.ts +4 -0
- package/src/AppsInTossModule/native-modules/AppsInTossModule.ts +89 -0
- package/src/AppsInTossModule/native-modules/ads/googleAdMob.ts +690 -0
- package/src/AppsInTossModule/native-modules/ads/types.ts +106 -0
- package/src/AppsInTossModule/native-modules/appLogin.ts +29 -0
- package/src/AppsInTossModule/native-modules/checkoutPayment.ts +80 -0
- package/src/AppsInTossModule/native-modules/eventLog.spec.ts +300 -0
- package/src/AppsInTossModule/native-modules/eventLog.ts +77 -0
- package/src/AppsInTossModule/native-modules/fetchAlbumPhotos.ts +88 -0
- package/src/AppsInTossModule/native-modules/fetchContacts.ts +121 -0
- package/src/AppsInTossModule/native-modules/getClipboardText.ts +47 -0
- package/src/AppsInTossModule/native-modules/getCurrentLocation.ts +65 -0
- package/src/AppsInTossModule/native-modules/getDeviceId.ts +33 -0
- package/src/AppsInTossModule/native-modules/getGameCenterGameProfile.ts +68 -0
- package/src/AppsInTossModule/native-modules/getOperationalEnvironment.ts +37 -0
- package/src/AppsInTossModule/native-modules/getPermission.ts +58 -0
- package/src/AppsInTossModule/native-modules/getTossAppVersion.ts +33 -0
- package/src/AppsInTossModule/native-modules/getTossShareLink.ts +39 -0
- package/src/AppsInTossModule/native-modules/iap.ts +213 -0
- package/src/AppsInTossModule/native-modules/index.ts +86 -0
- package/src/AppsInTossModule/native-modules/isMinVersionSupported.spec.ts +190 -0
- package/src/AppsInTossModule/native-modules/isMinVersionSupported.ts +68 -0
- package/src/AppsInTossModule/native-modules/openCamera.ts +81 -0
- package/src/AppsInTossModule/native-modules/openGameCenterLeaderboard.ts +44 -0
- package/src/AppsInTossModule/native-modules/openPermissionDialog.ts +54 -0
- package/src/AppsInTossModule/native-modules/requestPermission.ts +63 -0
- package/src/AppsInTossModule/native-modules/saveBase64Data.ts +57 -0
- package/src/AppsInTossModule/native-modules/setClipboardText.ts +39 -0
- package/src/AppsInTossModule/native-modules/setDeviceOrientation.ts +74 -0
- package/src/AppsInTossModule/native-modules/storage.ts +100 -0
- package/src/AppsInTossModule/native-modules/submitGameCenterLeaderBoardScore.ts +74 -0
- package/src/AppsInTossModule/native-modules/tossCore.ts +29 -0
- package/src/BedrockModule/native-modules/core/BedrockCoreModule.ts +8 -0
- package/src/BedrockModule/native-modules/index.ts +4 -0
- package/src/BedrockModule/native-modules/natives/BedrockModule.ts +20 -0
- package/src/BedrockModule/native-modules/natives/closeView.ts +25 -0
- package/src/BedrockModule/native-modules/natives/generateHapticFeedback/index.ts +27 -0
- package/src/BedrockModule/native-modules/natives/generateHapticFeedback/types.ts +38 -0
- package/src/BedrockModule/native-modules/natives/getLocale.ts +46 -0
- package/src/BedrockModule/native-modules/natives/getNetworkStatus/index.ts +59 -0
- package/src/BedrockModule/native-modules/natives/getNetworkStatus/types.ts +1 -0
- package/src/BedrockModule/native-modules/natives/getPlatformOS.ts +37 -0
- package/src/BedrockModule/native-modules/natives/getSchemeUri.ts +27 -0
- package/src/BedrockModule/native-modules/natives/index.ts +11 -0
- package/src/BedrockModule/native-modules/natives/openURL.ts +40 -0
- package/src/BedrockModule/native-modules/natives/setIosSwipeGestureEnabled.ts +43 -0
- package/src/BedrockModule/native-modules/natives/setScreenAwakeMode.ts +66 -0
- package/src/BedrockModule/native-modules/natives/setSecureScreen.ts +31 -0
- package/src/BedrockModule/native-modules/natives/share.ts +36 -0
- package/src/async-bridges.ts +3 -0
- package/src/event-bridges.ts +2 -0
- package/src/index.ts +16 -0
- package/src/types.ts +108 -0
- package/src/utils/compareVersion.spec.ts +176 -0
- package/src/utils/compareVersion.ts +104 -0
- package/src/utils/generateUUID.ts +5 -0
package/dist/index.d.ts
CHANGED
|
@@ -63,7 +63,7 @@ interface Location {
|
|
|
63
63
|
*/
|
|
64
64
|
timestamp: number;
|
|
65
65
|
/**
|
|
66
|
-
* @description 위치 정보를 나타내는 객체예요. 자세한 내용은 [LocationCoords](/react-native/reference/
|
|
66
|
+
* @description 위치 정보를 나타내는 객체예요. 자세한 내용은 [LocationCoords](/react-native/reference/native-modules/Types/LocationCoords.html)을 참고해주세요.
|
|
67
67
|
*/
|
|
68
68
|
coords: LocationCoords;
|
|
69
69
|
}
|
|
@@ -145,7 +145,7 @@ type UpdateLocationEventEmitter = EventEmitterSchema<'updateLocation', [Location
|
|
|
145
145
|
* @param {number} [options.accuracy] 위치 정확도를 설정해요.
|
|
146
146
|
* @param {number} [options.timeInterval] 위치 정보를 업데이트하는 최소 주기로, 단위는 밀리초(ms)예요. 이 값은 위치 업데이트가 발생하는 가장 짧은 간격을 설정하지만, 시스템이나 환경의 영향을 받아 지정한 주기보다 더 긴 간격으로 업데이트될 수 있어요.
|
|
147
147
|
* @param {number} [options.distanceInterval] 위치 변경 거리를 미터(m) 단위로 설정해요.
|
|
148
|
-
* @param {(location: Location) => void} [options.callback] 위치 정보가 변경될 때 호출되는 콜백 함수예요. 자세한 내용은 [Location](/react-native/reference/
|
|
148
|
+
* @param {(location: Location) => void} [options.callback] 위치 정보가 변경될 때 호출되는 콜백 함수예요. 자세한 내용은 [Location](/react-native/reference/native-modules/Types/Location.html)을 참고해주세요.
|
|
149
149
|
*
|
|
150
150
|
* @example
|
|
151
151
|
* ### 위치 정보 변경 감지하기
|
|
@@ -198,6 +198,116 @@ declare function startUpdateLocation(eventParams: {
|
|
|
198
198
|
options: StartUpdateLocationOptions$1;
|
|
199
199
|
}): () => void;
|
|
200
200
|
|
|
201
|
+
/**
|
|
202
|
+
* @public
|
|
203
|
+
* @category 친구초대
|
|
204
|
+
* @name RewardFromContactsViralEvent
|
|
205
|
+
* @description 친구에게 공유하기를 완료했을 때 지급할 리워드 정보를 담는 타입이에요. 이 타입을 사용하면 공유가 완료됐을 때 지급할 리워드 정보를 확인할 수 있어요.
|
|
206
|
+
* @property {'sendViral'} type - 이벤트의 타입이에요. `'sendViral'`은 사용자가 친구에게 공유를 완료했을 때 돌아와요.
|
|
207
|
+
* @property {Object} data - 지급할 리워드 관련 정보를 담고 있어요.
|
|
208
|
+
* @property {number} data.rewardAmount - 지급할 리워드 수량이에요. 앱인토스 콘솔에서 설정한 수량 및 금액 값이에요.
|
|
209
|
+
* @property {string} data.rewardUnit - 리워드의 단위예요. 앱인토스 콘솔에 설정된 리워드 이름인 '하트', '보석' 등이 리워드 단위예요.
|
|
210
|
+
*/
|
|
211
|
+
type RewardFromContactsViralEvent = {
|
|
212
|
+
type: 'sendViral';
|
|
213
|
+
data: {
|
|
214
|
+
rewardAmount: number;
|
|
215
|
+
rewardUnit: string;
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
/**
|
|
219
|
+
* @public
|
|
220
|
+
* @category 친구초대
|
|
221
|
+
* @name ContactsViralSuccessEvent
|
|
222
|
+
* @description 연락처 공유 모듈이 정상적으로 종료됐을 때 전달되는 이벤트 객체예요. 종료 이유와 함께 리워드 상태 및 남은 친구 수 등 관련 정보를 제공해요.
|
|
223
|
+
* @property {'close'} type - 이벤트의 타입이에요. `'close'`는 공유 모듈이 종료됐을 때 돌아와요.
|
|
224
|
+
* @property {Object} data - 모듈 종료와 관련된 세부 정보를 담고 있어요.
|
|
225
|
+
* @property {'clickBackButton' | 'noReward'} data.closeReason - 모듈이 종료된 이유예요. `'clickBackButton'`은 사용자가 뒤로 가기 버튼을 눌러 종료한 경우이고, `'noReward'`는 받을 수 있는 리워드가 없어서 종료된 경우예요.
|
|
226
|
+
* @property {number} data.sentRewardAmount - 사용자가 받은 전체 리워드 수량이에요.
|
|
227
|
+
* @property {number} data.sendableRewardsCount - 아직 공유할 수 있는 친구 수예요.
|
|
228
|
+
* @property {number} data.sentRewardsCount - 사용자가 공유를 완료한 친구 수예요.
|
|
229
|
+
* @property {string} data.rewardUnit - 리워드의 단위예요. 앱인토스 콘솔에 설정된 리워드 이름인 '하트', '보석' 등이 리워드 단위예요.
|
|
230
|
+
*/
|
|
231
|
+
type ContactsViralSuccessEvent = {
|
|
232
|
+
type: 'close';
|
|
233
|
+
data: {
|
|
234
|
+
closeReason: 'clickBackButton' | 'noReward';
|
|
235
|
+
sentRewardAmount?: number;
|
|
236
|
+
sendableRewardsCount?: number;
|
|
237
|
+
sentRewardsCount: number;
|
|
238
|
+
rewardUnit?: string;
|
|
239
|
+
};
|
|
240
|
+
};
|
|
241
|
+
type ContactsViralEvent = RewardFromContactsViralEvent | ContactsViralSuccessEvent;
|
|
242
|
+
/**
|
|
243
|
+
* @public
|
|
244
|
+
* @category 친구초대
|
|
245
|
+
* @name ContactsViralOption
|
|
246
|
+
* @description [연락처 공유 기능](/react-native/reference/native-modules/친구초대/contactsViral.html)을 사용할 때 필요한 옵션이에요.
|
|
247
|
+
* @property {string} moduleId - 공유 리워드를 구분하는 UUID 형식의 고유 ID예요. 앱인토스 콘솔의 미니앱 > 공유 리워드 메뉴에서 확인할 수 있어요.
|
|
248
|
+
*/
|
|
249
|
+
type ContactsViralOption = {
|
|
250
|
+
moduleId: string;
|
|
251
|
+
};
|
|
252
|
+
/**
|
|
253
|
+
* @public
|
|
254
|
+
* @category 친구초대
|
|
255
|
+
* @name ContactsViralParams
|
|
256
|
+
* @description `ContactsViralParams`는 연락처 공유 기능을 사용할 때 전달해야 하는 파라미터 타입이에요. 옵션을 설정하고, 이벤트 및 에러 처리 콜백을 지정할 수 있어요.
|
|
257
|
+
* @property {ContactsViralOption} options - 공유 기능에 사용할 옵션 객체예요.
|
|
258
|
+
* @property {(event: ContactsViralEvent) => void} onEvent - 공유 이벤트가 발생했을 때 실행되는 함수예요. [`RewardFromContactsViralEvent`](/bedrock/reference/native-modules/친구초대/RewardFromContactsViralEvent.html) 또는 [`ContactsViralSuccessEvent`](/react-native/reference/native-modules/친구초대/ContactsViralSuccessEvent.html) 타입의 이벤트 객체가 전달돼요.
|
|
259
|
+
* @property {(error: unknown) => void} onError - 예기치 않은 에러가 발생했을 때 실행되는 함수예요.
|
|
260
|
+
*/
|
|
261
|
+
interface ContactsViralParams {
|
|
262
|
+
options: ContactsViralOption;
|
|
263
|
+
onEvent: (event: ContactsViralEvent) => void;
|
|
264
|
+
onError: (error: unknown) => void;
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* @public
|
|
268
|
+
* @category 친구초대
|
|
269
|
+
* @name contactsViral
|
|
270
|
+
* @description 친구에게 공유하고 리워드를 받을 수 있는 기능을 제공해요. 사용자가 친구에게 공유를 완료하면 앱브릿지가 이벤트를 통해 리워드 정보를 전달해요.
|
|
271
|
+
* @param {ContactsViralParams} params - 연락처 공유 기능을 실행할 때 사용하는 파라미터예요. 옵션 설정과 이벤트 핸들러를 포함해요. 자세한 내용은 [ContactsViralParams](/bedrock/reference/native-modules/친구초대/ContactsViralParams.html) 문서를 참고하세요.
|
|
272
|
+
* @returns {() => void} 앱브릿지 cleanup 함수를 반환해요. 공유 기능이 끝나면 반드시 이 함수를 호출해서 리소스를 해제해야 해요.
|
|
273
|
+
*
|
|
274
|
+
* @example
|
|
275
|
+
* ### 친구에게 공유하고 리워드 받기
|
|
276
|
+
*
|
|
277
|
+
* ```tsx
|
|
278
|
+
* import { useCallback } from 'react';
|
|
279
|
+
* import { Button } from 'react-native';
|
|
280
|
+
* import { contactsViral } from '@apps-in-toss/framework';
|
|
281
|
+
*
|
|
282
|
+
* function ContactsViralButton({ moduleId }: { moduleId: string }) {
|
|
283
|
+
* const handleContactsViral = useCallback(() => {
|
|
284
|
+
* try {
|
|
285
|
+
* const cleanup = contactsViral({
|
|
286
|
+
* options: { moduleId: moduleId.trim() },
|
|
287
|
+
* onEvent: (event) => {
|
|
288
|
+
* if (event.type === 'sendViral') {
|
|
289
|
+
* console.log('리워드 지급:', event.data.rewardAmount, event.data.rewardUnit);
|
|
290
|
+
* } else if (event.type === 'close') {
|
|
291
|
+
* console.log('모듈 종료:', event.data.closeReason);
|
|
292
|
+
* }
|
|
293
|
+
* },
|
|
294
|
+
* onError: (error) => {
|
|
295
|
+
* console.error('에러 발생:', error);
|
|
296
|
+
* },
|
|
297
|
+
* });
|
|
298
|
+
*
|
|
299
|
+
* return cleanup;
|
|
300
|
+
* } catch (error) {
|
|
301
|
+
* console.error('실행 중 에러:', error);
|
|
302
|
+
* }
|
|
303
|
+
* }, [moduleId]);
|
|
304
|
+
*
|
|
305
|
+
* return <Button title="친구에게 공유하고 리워드 받기" onPress={handleContactsViral} />;
|
|
306
|
+
* }
|
|
307
|
+
* ```
|
|
308
|
+
*/
|
|
309
|
+
declare function contactsViral(params: ContactsViralParams): () => void;
|
|
310
|
+
|
|
201
311
|
declare class EntryMessageExitedEvent extends GraniteEventDefinition<undefined, undefined> {
|
|
202
312
|
name: "entryMessageExited";
|
|
203
313
|
remove(): void;
|
|
@@ -242,7 +352,26 @@ declare class AppBridgeCallbackEvent extends GraniteEventDefinition<void, AppBri
|
|
|
242
352
|
private ensureInvokeAppBridgeCallback;
|
|
243
353
|
}
|
|
244
354
|
|
|
245
|
-
|
|
355
|
+
interface VisibilityChangedByTransparentServiceWebOptions {
|
|
356
|
+
callbackId: string;
|
|
357
|
+
}
|
|
358
|
+
declare class VisibilityChangedByTransparentServiceWebEvent extends GraniteEventDefinition<VisibilityChangedByTransparentServiceWebOptions, boolean> {
|
|
359
|
+
name: "onVisibilityChangedByTransparentServiceWeb";
|
|
360
|
+
subscription: EmitterSubscription | null;
|
|
361
|
+
remove(): void;
|
|
362
|
+
listener(options: VisibilityChangedByTransparentServiceWebOptions, onEvent: (isVisible: boolean) => void, onError: (error: unknown) => void): void;
|
|
363
|
+
private isVisibilityChangedByTransparentServiceWebResult;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
declare const appsInTossEvent: GraniteEvent<EntryMessageExitedEvent | UpdateLocationEvent | AppBridgeCallbackEvent | VisibilityChangedByTransparentServiceWebEvent>;
|
|
367
|
+
|
|
368
|
+
declare function onVisibilityChangedByTransparentServiceWeb(eventParams: {
|
|
369
|
+
options: {
|
|
370
|
+
callbackId: string;
|
|
371
|
+
};
|
|
372
|
+
onEvent: (isVisible: boolean) => void;
|
|
373
|
+
onError: (error: unknown) => void;
|
|
374
|
+
}): () => void;
|
|
246
375
|
|
|
247
376
|
/**
|
|
248
377
|
* @public
|
|
@@ -336,7 +465,7 @@ interface AdNetworkResponseInfo {
|
|
|
336
465
|
* @name InterstitialAd
|
|
337
466
|
* @description 전면 광고의 ID와 응답 정보를 담고 있는 객체예요. 광고를 로드한 뒤, 관련 정보를 확인할 때 유용해요.
|
|
338
467
|
* @property {string} adUnitId 광고 ID예요.
|
|
339
|
-
* @property {ResponseInfo} responseInfo 광고 로드 응답 정보예요. 자세한 내용은 [ResponseInfo](/react-native/reference/
|
|
468
|
+
* @property {ResponseInfo} responseInfo 광고 로드 응답 정보예요. 자세한 내용은 [ResponseInfo](/react-native/reference/native-modules/광고/ResponseInfo.html)를 참고하세요.
|
|
340
469
|
*/
|
|
341
470
|
interface InterstitialAd {
|
|
342
471
|
adUnitId: string;
|
|
@@ -348,7 +477,7 @@ interface InterstitialAd {
|
|
|
348
477
|
* @name RewardedAd
|
|
349
478
|
* @description 보상형 광고의 ID와 응답 정보를 담고 있는 객체예요. 광고를 로드한 뒤, 관련 정보를 확인할 때 유용해요.
|
|
350
479
|
* @property {string} adUnitId 광고 ID예요.
|
|
351
|
-
* @property {ResponseInfo} responseInfo 광고 로드 응답 정보예요. 자세한 내용은 [ResponseInfo](/react-native/reference/
|
|
480
|
+
* @property {ResponseInfo} responseInfo 광고 로드 응답 정보예요. 자세한 내용은 [ResponseInfo](/react-native/reference/native-modules/광고/ResponseInfo.html)를 참고하세요.
|
|
352
481
|
*/
|
|
353
482
|
interface RewardedAd {
|
|
354
483
|
adUnitId: string;
|
|
@@ -365,7 +494,7 @@ interface LoadAdMobInterstitialAdOptions {
|
|
|
365
494
|
* @public
|
|
366
495
|
* @category 광고
|
|
367
496
|
* @name LoadAdMobInterstitialAdEvent
|
|
368
|
-
* @description 전면 광고를 불러오는 함수에서 발생하는 이벤트 타입이에요. `loaded` 이벤트가 발생하면 광고를 성공적으로 불러온 거예요. 이때 [InterstitialAd](/react-native/reference/
|
|
497
|
+
* @description 전면 광고를 불러오는 함수에서 발생하는 이벤트 타입이에요. `loaded` 이벤트가 발생하면 광고를 성공적으로 불러온 거예요. 이때 [InterstitialAd](/react-native/reference/native-modules/광고/InterstitialAd.html) 객체가 함께 반환돼요.
|
|
369
498
|
*/
|
|
370
499
|
type LoadAdMobInterstitialAdEvent = AdMobFullScreenEvent | {
|
|
371
500
|
type: 'loaded';
|
|
@@ -386,7 +515,7 @@ type LoadAdMobInterstitialAdParams = AdMobHandlerParams<LoadAdMobInterstitialAdO
|
|
|
386
515
|
* @param {LoadAdMobInterstitialAdParams} params 광고를 불러올 때 사용할 설정 값이에요. 광고 ID와 광고의 동작에 대한 콜백을 설정할 수 있어요.
|
|
387
516
|
* @param {LoadAdMobInterstitialAdOptions} params.options 광고를 불러올 때 전달할 옵션 객체예요.
|
|
388
517
|
* @param {string} params.options.adUnitId 광고 단위 ID예요. 발급받은 전면 광고용 ID를 입력해요.
|
|
389
|
-
* @param {(event: LoadAdMobInterstitialAdEvent) => void} [params.onEvent] 광고 관련 이벤트가 발생했을 때 호출돼요. (예시: 광고가 닫히거나 클릭됐을 때). 자세한 이벤트 타입은 [LoadAdMobInterstitialAdEvent](/react-native/reference/
|
|
518
|
+
* @param {(event: LoadAdMobInterstitialAdEvent) => void} [params.onEvent] 광고 관련 이벤트가 발생했을 때 호출돼요. (예시: 광고가 닫히거나 클릭됐을 때). 자세한 이벤트 타입은 [LoadAdMobInterstitialAdEvent](/react-native/reference/native-modules/광고/LoadAdMobInterstitialAdEvent.html)를 참고하세요.
|
|
390
519
|
* @param {(reason: unknown) => void} [params.onError] 광고를 불러오지 못했을 때 호출돼요. (예시: 네트워크 오류나 지원하지 않는 환경일 때)
|
|
391
520
|
* @property {() => boolean} [isSupported] 현재 실행 중인 앱(예: 토스 앱, 개발용 샌드박스 앱 등)에서 Google AdMob 광고 기능을 지원하는지 확인하는 함수예요. 기능을 사용하기 전에 지원 여부를 확인해야 해요.
|
|
392
521
|
*
|
|
@@ -523,7 +652,7 @@ type ShowAdMobInterstitialAdParams = AdMobHandlerParams<ShowAdMobInterstitialAdO
|
|
|
523
652
|
* @param {ShowAdMobInterstitialAdParams} params 광고를 보여주기 위해 사용할 설정 값이에요. 광고 ID와과 광고의 동작에 대한 콜백을 설정할 수 있어요.
|
|
524
653
|
* @param {ShowAdMobInterstitialAdOptions} params.options 광고를 보여줄 때 전달할 옵션 객체예요.
|
|
525
654
|
* @param {string} params.options.adUnitId 광고 단위 ID예요. `loadAdMobInterstitialAd` 로 불러온 전면 광고용 ID를 입력해요.
|
|
526
|
-
* @param {(event: ShowAdMobInterstitialAdEvent) => void} [params.onEvent] 광고 관련 이벤트가 발생했을 때 호출돼요. (예시: 광고 노출을 요청했을 때). 자세한 이벤트 타입은 [ShowAdMobInterstitialAdEvent](/react-native/reference/
|
|
655
|
+
* @param {(event: ShowAdMobInterstitialAdEvent) => void} [params.onEvent] 광고 관련 이벤트가 발생했을 때 호출돼요. (예시: 광고 노출을 요청했을 때). 자세한 이벤트 타입은 [ShowAdMobInterstitialAdEvent](/react-native/reference/native-modules/광고/ShowAdMobInterstitialAdEvent.html)를 참고하세요.
|
|
527
656
|
* @param {(reason: unknown) => void} [params.onError] 광고를 노출하지 못했을 때 호출돼요. (예시: 네트워크 오류나 지원하지 않는 환경일 때)
|
|
528
657
|
* @property {() => boolean} [isSupported] 현재 실행 중인 앱(예: 토스 앱, 개발용 샌드박스 앱 등)에서 Google AdMob 광고 기능을 지원하는지 확인하는 함수예요. 기능을 사용하기 전에 지원 여부를 확인해야 해요.
|
|
529
658
|
*
|
|
@@ -639,7 +768,7 @@ interface LoadAdMobRewardedAdOptions {
|
|
|
639
768
|
/**
|
|
640
769
|
* @public
|
|
641
770
|
* @category 광고
|
|
642
|
-
* @name
|
|
771
|
+
* @name LoadAdMobRewardedAdEvent
|
|
643
772
|
* @description 보상형 광고를 불러오는 함수에서 발생하는 이벤트 타입이에요. `loaded` 이벤트가 발생하면 광고를 성공적으로 불러온 거예요. 이때 [RewardedAd](/react-native/reference/native-modules/광고/RewardedAd.html) 객체가 함께 반환돼요. `userEarnedReward` 이벤트는 사용자가 광고를 끝까지 시청해, 보상 조건을 충족했을 때 발생해요.
|
|
644
773
|
*/
|
|
645
774
|
type LoadAdMobRewardedAdEvent = AdMobFullScreenEvent | {
|
|
@@ -663,7 +792,7 @@ type LoadAdMobRewardedAdParams = AdMobHandlerParams<LoadAdMobRewardedAdOptions,
|
|
|
663
792
|
* @param {LoadAdMobRewardedAdParams} params 광고를 불러올 때 사용할 설정 값이에요. 광고 ID와 광고의 동작에 대한 콜백을 설정할 수 있어요.
|
|
664
793
|
* @param {LoadAdMobRewardedAdOptions} params.options 광고를 불러올 때 전달할 옵션 객체예요.
|
|
665
794
|
* @param {string} params.options.adUnitId 광고 단위 ID예요. 발급받은 보상형 광고용 ID를 입력해요.
|
|
666
|
-
* @param {(event: LoadAdMobRewardedAdEvent) => void} [params.onEvent] 광고 관련 이벤트가 발생했을 때 호출돼요. (예시: 광고가 닫히거나 클릭됐을 때). 자세한 이벤트 타입은 [LoadAdMobRewardedAdEvent](/react-native/reference/
|
|
795
|
+
* @param {(event: LoadAdMobRewardedAdEvent) => void} [params.onEvent] 광고 관련 이벤트가 발생했을 때 호출돼요. (예시: 광고가 닫히거나 클릭됐을 때). 자세한 이벤트 타입은 [LoadAdMobRewardedAdEvent](/react-native/reference/native-modules/광고/LoadAdMobRewardedAdEvent.html)를 참고하세요.
|
|
667
796
|
* @param {(reason: unknown) => void} [params.onError] 광고를 불러오지 못했을 때 호출돼요. (예시: 네트워크 오류나 지원하지 않는 환경일 때)
|
|
668
797
|
* @property {() => boolean} [isSupported] 현재 실행 중인 앱(예: 토스 앱, 개발용 샌드박스 앱 등)에서 Google AdMob 광고 기능을 지원하는지 확인하는 함수예요. 기능을 사용하기 전에 지원 여부를 확인해야 해요.
|
|
669
798
|
*
|
|
@@ -803,7 +932,7 @@ type ShowAdMobRewardedAdParams = AdMobHandlerParams<ShowAdMobRewardedAdOptions,
|
|
|
803
932
|
* @param {ShowAdMobRewardedAdParams} params 광고를 보여주기 위해 사용할 설정 값이에요. 광고 ID와 광고의 동작에 대한 콜백을 설정할 수 있어요.
|
|
804
933
|
* @param {ShowAdMobRewardedAdOptions} params.options 광고를 보여줄 때 전달할 옵션 객체예요.
|
|
805
934
|
* @param {string} params.options.adUnitId 광고 단위 ID예요. `loadAdMobRewardedAd` 로 불러온 보상형 광고용 ID를 입력해요.
|
|
806
|
-
* @param {(event: ShowAdMobRewardedAdEvent) => void} [params.onEvent] 광고 관련 이벤트가 발생했을 때 호출돼요. (예시: 광고 노출을 요청했을 때). 자세한 이벤트 타입은 [ShowAdMobRewardedAdEvent](/react-native/reference/
|
|
935
|
+
* @param {(event: ShowAdMobRewardedAdEvent) => void} [params.onEvent] 광고 관련 이벤트가 발생했을 때 호출돼요. (예시: 광고 노출을 요청했을 때). 자세한 이벤트 타입은 [ShowAdMobRewardedAdEvent](/react-native/reference/native-modules/광고/ShowAdMobRewardedAdEvent.html)를 참고하세요.
|
|
807
936
|
* @param {(reason: unknown) => void} [params.onError] 광고를 불러오지 못했을 때 호출돼요. (예시: 네트워크 오류나 지원하지 않는 환경일 때)
|
|
808
937
|
* @property {() => boolean} [isSupported] 현재 실행 중인 앱(예: 토스 앱, 개발용 샌드박스 앱 등)에서 Google AdMob 광고 기능을 지원하는지 확인하는 함수예요. 기능을 사용하기 전에 지원 여부를 확인해야 해요.
|
|
809
938
|
*
|
|
@@ -1177,7 +1306,7 @@ interface GetCurrentLocationOptions {
|
|
|
1177
1306
|
*
|
|
1178
1307
|
* @param {GetCurrentLocationOptions} options 위치 정보를 가져올 때 사용하는 옵션 객체예요.
|
|
1179
1308
|
* @param {Accuracy} [options.accuracy] 위치 정보의 정확도 수준이에요. 정확도는 `Accuracy` 타입으로 설정돼요.
|
|
1180
|
-
* @returns {Promise<Location>} 디바이스의 위치 정보가 담긴 객체를 반환해요. 자세한 내용은 [Location](/react-native/reference/
|
|
1309
|
+
* @returns {Promise<Location>} 디바이스의 위치 정보가 담긴 객체를 반환해요. 자세한 내용은 [Location](/react-native/reference/native-modules/Types/Location.html)을 참고해주세요.
|
|
1181
1310
|
*
|
|
1182
1311
|
* @example
|
|
1183
1312
|
* ### 디바이스의 현재 위치 정보 가져오기
|
|
@@ -1215,6 +1344,248 @@ interface GetCurrentLocationOptions {
|
|
|
1215
1344
|
*/
|
|
1216
1345
|
declare function getCurrentLocation(options: GetCurrentLocationOptions): Promise<Location>;
|
|
1217
1346
|
|
|
1347
|
+
/**
|
|
1348
|
+
* @category 게임센터
|
|
1349
|
+
* @name GameCenterGameProfileResponse
|
|
1350
|
+
* @description 토스게임센터 프로필을 가져온 결과 타입이에요.
|
|
1351
|
+
* 앱에 프로필이 없는 경우, `statusCode`가 `'PROFILE_NOT_FOUND'`이고 다른 정보는 없어요.
|
|
1352
|
+
* 프로필이 있는 경우 `statusCode`가 `'SUCCESS'`이고, 닉네임과 프로필 이미지 주소가 함께 제공돼요.
|
|
1353
|
+
* @property {string} statusCode 프로필 조회 결과 상태예요. `'SUCCESS'` 또는 `'PROFILE_NOT_FOUND'` 중 하나예요.
|
|
1354
|
+
* @property {string} [nickname] 프로필 닉네임이에요. `statusCode`가 `'SUCCESS'`일 때만 있어요.
|
|
1355
|
+
* @property {string} [profileImageUri] 프로필 이미지 URL이에요. `statusCode`가 `'SUCCESS'`일 때만 있어요.
|
|
1356
|
+
*/
|
|
1357
|
+
type GameCenterGameProfileResponse = {
|
|
1358
|
+
statusCode: 'PROFILE_NOT_FOUND';
|
|
1359
|
+
} | {
|
|
1360
|
+
statusCode: 'SUCCESS';
|
|
1361
|
+
nickname: string;
|
|
1362
|
+
profileImageUri: string;
|
|
1363
|
+
};
|
|
1364
|
+
/**
|
|
1365
|
+
* @category 게임센터
|
|
1366
|
+
* @name getGameCenterGameProfile
|
|
1367
|
+
* @description 토스게임센터 프로필 정보를 가져와요.
|
|
1368
|
+
* 사용자가 프로필을 만들지 않았다면 `statusCode`가 `'PROFILE_NOT_FOUND'`인 응답이 반환돼요.
|
|
1369
|
+
* 앱 버전이 최소 지원 버전(안드로이드 5.221.0, iOS 5.221.0)보다 낮으면 `undefined`를 반환해요.
|
|
1370
|
+
* @returns {Promise<GameCenterGameProfileResponse | undefined>} 프로필 정보 또는 `undefined`를 반환해요.
|
|
1371
|
+
*
|
|
1372
|
+
* @example
|
|
1373
|
+
* ### 게임센터 프로필 가져오기
|
|
1374
|
+
* ```tsx
|
|
1375
|
+
* import { getGameCenterGameProfile } from './getGameCenterGameProfile';
|
|
1376
|
+
* import { useState } from 'react';
|
|
1377
|
+
* import { View, Button } from 'react-native';
|
|
1378
|
+
*
|
|
1379
|
+
* function GameProfile() {
|
|
1380
|
+
* const [profile, setProfile] = useState<GameCenterGameProfileResponse | null>(null);
|
|
1381
|
+
*
|
|
1382
|
+
* const handlePress = async () => {
|
|
1383
|
+
* try {
|
|
1384
|
+
* const result = await getGameCenterGameProfile();
|
|
1385
|
+
* if (result) {
|
|
1386
|
+
* setProfile(result);
|
|
1387
|
+
* }
|
|
1388
|
+
* } catch (error) {
|
|
1389
|
+
* console.error('게임센터 프로필 가져오기에 실패했어요.', error);
|
|
1390
|
+
* }
|
|
1391
|
+
* };
|
|
1392
|
+
*
|
|
1393
|
+
* return (
|
|
1394
|
+
* <View>
|
|
1395
|
+
* <Button title="게임센터 프로필 가져오기" onPress={handlePress} />
|
|
1396
|
+
* </View>
|
|
1397
|
+
* );
|
|
1398
|
+
* }
|
|
1399
|
+
* ```
|
|
1400
|
+
*/
|
|
1401
|
+
declare function getGameCenterGameProfile(): Promise<GameCenterGameProfileResponse | undefined>;
|
|
1402
|
+
|
|
1403
|
+
/**
|
|
1404
|
+
* @public
|
|
1405
|
+
* @category 인앱결제
|
|
1406
|
+
* @name IapCreateOneTimePurchaseOrderOptions
|
|
1407
|
+
* @description 인앱결제 1건을 요청할 때 필요한 정보예요.
|
|
1408
|
+
* @property {string} productId - 주문할 상품의 ID예요.
|
|
1409
|
+
*/
|
|
1410
|
+
interface IapCreateOneTimePurchaseOrderOptions {
|
|
1411
|
+
productId: string;
|
|
1412
|
+
}
|
|
1413
|
+
/**
|
|
1414
|
+
* @public
|
|
1415
|
+
* @category 인앱결제
|
|
1416
|
+
* @name IapCreateOneTimePurchaseOrderResult
|
|
1417
|
+
* @description 인앱결제 1건이 완료되면 결제 세부 정보와 상품 정보를 담아 반환해요. 반환된 정보로 결제한 상품의 정보를 화면에 표시할 수 있어요.
|
|
1418
|
+
* @property {string} orderId - 결제 주문 ID이에요. 결제 완료 후 [결제 상태를 조회](https://developers-apps-in-toss.toss.im/api/getIapOrderStatus.html)할 때 사용해요.
|
|
1419
|
+
* @property {string} displayName - 화면에 표시할 상품 이름이에요.
|
|
1420
|
+
* @property {string} displayAmount - 통화 단위가 포함된 가격 정보예요. 예를 들어 `1,000원`으로 가격과 통화가 함께 표시돼요.
|
|
1421
|
+
* @property {number} amount - 상품 가격 숫자 값이에요. 화폐 단위와 쉼표를 제외한 순수 숫자예요. 예를 들어 `1000`으로 표시돼요.
|
|
1422
|
+
* @property {string} currency - [ISO 4217 표준](https://ko.wikipedia.org/wiki/ISO_4217)에 따른 상품 가격 통화 단위예요. 예를 들어 원화는 `KRW`, 달러는 `USD`로 표시돼요.
|
|
1423
|
+
* @property {number} fraction - 가격을 표시할 때 소수점 아래 몇 자리까지 보여줄지 정하는 값이에요. 예를 들어 달러는 소수점 둘째 자리까지 보여줘서 `2`, 원화는 소수점이 필요 없어서 `0`이에요
|
|
1424
|
+
* @property {string | null} miniAppIconUrl - 미니앱 아이콘 이미지의 URL이에요. 아이콘은 앱인토스 콘솔에서 설정한 이미지예요. 콘솔에서 아이콘을 등록하지 않았다면 `null`로 반환돼요.
|
|
1425
|
+
*/
|
|
1426
|
+
interface IapCreateOneTimePurchaseOrderResult {
|
|
1427
|
+
orderId: string;
|
|
1428
|
+
displayName: string;
|
|
1429
|
+
displayAmount: string;
|
|
1430
|
+
amount: number;
|
|
1431
|
+
currency: string;
|
|
1432
|
+
fraction: number;
|
|
1433
|
+
miniAppIconUrl: string | null;
|
|
1434
|
+
}
|
|
1435
|
+
/**
|
|
1436
|
+
* @public
|
|
1437
|
+
* @category 인앱결제
|
|
1438
|
+
* @name iapCreateOneTimePurchaseOrder
|
|
1439
|
+
* @description
|
|
1440
|
+
* 특정 인앱결제 주문서 페이지로 이동해요. 사용자가 상품 구매 버튼을 누르는 상황 등에 사용할 수 있어요. 사용자의 결제는 이동한 페이지에서 진행돼요. 만약 결제 중에 에러가 발생하면 에러 유형에 따라 에러 페이지로 이동해요.
|
|
1441
|
+
* @param {IapCreateOneTimePurchaseOrderOptions} params - 인앱결제를 생성할 때 필요한 정보예요.
|
|
1442
|
+
* @param {string} params.productId - 주문할 상품의 ID예요.
|
|
1443
|
+
* @returns {Promise<IapCreateOneTimePurchaseOrderResult | undefined>} 결제에 성공하면 결제 결과 객체를 반환해요. 앱 버전이 최소 지원 버전(안드로이드 5.219.0, iOS 5.219.0)보다 낮으면 인앱결제를 실행할 수 없어서 `undefined`를 반환해요.
|
|
1444
|
+
*
|
|
1445
|
+
* @throw {code: "INVALID_PRODUCT_ID"} - 유효하지 않은 상품 ID이거나, 해당 상품이 존재하지 않을 때 발생해요.
|
|
1446
|
+
* @throw {code: "PAYMENT_PENDING"} - 사용자가 요청한 결제가 아직 승인을 기다리고 있을 때 발생해요.
|
|
1447
|
+
* @throw {code: "NETWORK_ERROR"} - 서버 내부 문제로 요청을 처리할 수 없을 때 발생해요.
|
|
1448
|
+
* @throw {code: "INVALID_USER_ENVIRONMENT"} - 특정 기기, 계정 또는 설정 환경에서 구매할 수 없는 상품일 때 발생해요.
|
|
1449
|
+
* @throw {code: "ITEM_ALREADY_OWNED"} - 사용자가 이미 구매한 상품을 다시 구매하려고 할 때 발생해요.
|
|
1450
|
+
* @throw {code: "APP_MARKET_VERIFICATION_FAILED"} - 사용자가 결제를 완료했지만, 앱스토어에서 사용자 정보 검증에 실패했을 때 발생해요. 사용자가 앱스토어에 문의해서 환불을 요청해야해요.
|
|
1451
|
+
* @throw {code: "TOSS_SERVER_VERIFICATION_FAILED"} - 사용자가 결제를 완료했지만, 서버 전송에 실패해서 결제 정보를 저장할 수 없을 때 발생해요.
|
|
1452
|
+
* @throw {code: "INTERNAL_ERROR"} - 서버 내부 문제로 요청을 처리할 수 없을 때 발생해요.
|
|
1453
|
+
* @throw {code: "KOREAN_ACCOUNT_ONLY"} - iOS 환경에서 사용자의 계정이 한국 계정이 아닐 때 발생해요.
|
|
1454
|
+
* @throw {code: "USER_CANCELED"} - 사용자가 결제를 완료하지 않고 주문서 페이지를 이탈했을 때 발생해요.
|
|
1455
|
+
*
|
|
1456
|
+
* @example
|
|
1457
|
+
* ### 특정 인앱결제 주문서 페이지로 이동하기
|
|
1458
|
+
*
|
|
1459
|
+
* ```tsx
|
|
1460
|
+
* import { IAP } from "@apps-in-toss/web-framework";
|
|
1461
|
+
* import { Button } from "@toss-design-system/react-native";
|
|
1462
|
+
*
|
|
1463
|
+
* interface Props {
|
|
1464
|
+
* productId: string;
|
|
1465
|
+
* }
|
|
1466
|
+
*
|
|
1467
|
+
* function IapCreateOneTimePurchaseOrderButton({ productId }: Props) {
|
|
1468
|
+
* async function handleClick() {
|
|
1469
|
+
* try {
|
|
1470
|
+
* await IAP.createOneTimePurchaseOrder({
|
|
1471
|
+
* productId,
|
|
1472
|
+
* });
|
|
1473
|
+
* console.error("인앱결제에 성공했어요");
|
|
1474
|
+
* } catch (error) {
|
|
1475
|
+
* console.error('인앱결제에 실패했어요:', error);
|
|
1476
|
+
* }
|
|
1477
|
+
* }
|
|
1478
|
+
*
|
|
1479
|
+
* return <Button onClick={handleClick}>구매하기</Button>;
|
|
1480
|
+
* }
|
|
1481
|
+
* ```
|
|
1482
|
+
*/
|
|
1483
|
+
declare function createOneTimePurchaseOrder(params: IapCreateOneTimePurchaseOrderOptions): Promise<IapCreateOneTimePurchaseOrderResult | undefined>;
|
|
1484
|
+
/**
|
|
1485
|
+
* @public
|
|
1486
|
+
* @category 인앱결제
|
|
1487
|
+
* @name IapProductListItem
|
|
1488
|
+
* @description 인앱결제로 구매할 수 있는 상품 하나의 정보를 담은 객체예요. 상품 목록을 화면에 표시할 때 사용해요.
|
|
1489
|
+
* @property {string} sku - 상품의 고유 ID예요. [IAP.createOneTimePurchaseOrder](https://developers-apps-in-toss.toss.im/bedrock/reference/native-modules/%EC%9D%B8%EC%95%B1%20%EA%B2%B0%EC%A0%9C/createOneTimePurchaseOrder.html)를 호출할때 사용하는 `productId`와 동일한 값이에요.
|
|
1490
|
+
* @property {string} displayName - 화면에 표시할 상품 이름이에요. 상품 이름은 앱인토스 콘솔에서 설정한 값이에요.
|
|
1491
|
+
* @property {string} displayAmount - 통화 단위가 포함된 가격 정보예요. 예를 들어 `1,000원`으로 가격과 통화가 함께 표시돼요.
|
|
1492
|
+
* @property {string} iconUrl - 상품 아이콘 이미지의 URL이에요. 아이콘은 앱인토스 콘솔에서 설정한 이미지예요.
|
|
1493
|
+
* @property {string} description - 상품에 대한 설명이에요. 설명은 앱인토스 콘솔에서 설정한 값이에요.
|
|
1494
|
+
*/
|
|
1495
|
+
interface IapProductListItem {
|
|
1496
|
+
sku: string;
|
|
1497
|
+
displayAmount: string;
|
|
1498
|
+
displayName: string;
|
|
1499
|
+
iconUrl: string;
|
|
1500
|
+
description: string;
|
|
1501
|
+
}
|
|
1502
|
+
/**
|
|
1503
|
+
* @public
|
|
1504
|
+
* @category 인앱결제
|
|
1505
|
+
* @name iapGetProductItemList
|
|
1506
|
+
* @description 인앱결제로 구매할 수 있는 상품 목록을 가져와요. 상품 목록 화면에 진입할 때 호출해요.
|
|
1507
|
+
* @returns {Promise<{ products: IapProductListItem[] } | undefined>} 상품 목록을 포함한 객체를 반환해요. 앱 버전이 최소 지원 버전(안드로이드 5.219.0, iOS 5.219.0)보다 낮으면 `undefined`를 반환해요.
|
|
1508
|
+
*
|
|
1509
|
+
* @example
|
|
1510
|
+
* ### 구매 가능한 인앱결제 상품목록 가져오기
|
|
1511
|
+
*
|
|
1512
|
+
* ```tsx
|
|
1513
|
+
* import { IAP, IapProductListItem } from "@apps-in-toss/framework";
|
|
1514
|
+
* import { Button, List, ListRow } from "@toss-design-system/react-native";
|
|
1515
|
+
* import { useEffect, useState } from "react";
|
|
1516
|
+
*
|
|
1517
|
+
* function IapProductList() {
|
|
1518
|
+
* const [products, setProducts] = useState<IapProductListItem[]>([]);
|
|
1519
|
+
*
|
|
1520
|
+
* async function buyIapProduct(productId: string) {
|
|
1521
|
+
* try {
|
|
1522
|
+
* await IAP.createOneTimePurchaseOrder({
|
|
1523
|
+
* productId,
|
|
1524
|
+
* });
|
|
1525
|
+
*
|
|
1526
|
+
* console.error("인앱결제에 성공했어요");
|
|
1527
|
+
* } catch (error) {
|
|
1528
|
+
* console.error("인앱결제에 실패했어요:", error);
|
|
1529
|
+
* }
|
|
1530
|
+
* }
|
|
1531
|
+
*
|
|
1532
|
+
* useEffect(() => {
|
|
1533
|
+
* async function fetchProducts() {
|
|
1534
|
+
* try {
|
|
1535
|
+
* const response = await IAP.getProductItemList();
|
|
1536
|
+
* setProducts(response?.products ?? []);
|
|
1537
|
+
* } catch (error) {
|
|
1538
|
+
* console.error("상품 목록을 가져오는 데 실패했어요:", error);
|
|
1539
|
+
* }
|
|
1540
|
+
* }
|
|
1541
|
+
*
|
|
1542
|
+
* fetchProducts();
|
|
1543
|
+
* }, []);
|
|
1544
|
+
*
|
|
1545
|
+
* return (
|
|
1546
|
+
* <List>
|
|
1547
|
+
* {products.map((product) => (
|
|
1548
|
+
* <ListRow
|
|
1549
|
+
* key={product.sku}
|
|
1550
|
+
* left={
|
|
1551
|
+
* <ListRow.Image type="square" source={{ uri: product.iconUrl }} />
|
|
1552
|
+
* }
|
|
1553
|
+
* right={
|
|
1554
|
+
* <Button size="medium" onPress={() => buyIapProduct(product.sku)}>
|
|
1555
|
+
* 구매하기
|
|
1556
|
+
* </Button>
|
|
1557
|
+
* }
|
|
1558
|
+
* contents={
|
|
1559
|
+
* <ListRow.Texts
|
|
1560
|
+
* type="3RowTypeA"
|
|
1561
|
+
* top={product.displayName}
|
|
1562
|
+
* middle={product.description}
|
|
1563
|
+
* bottom={product.displayAmount}
|
|
1564
|
+
* />
|
|
1565
|
+
* }
|
|
1566
|
+
* />
|
|
1567
|
+
* ))}
|
|
1568
|
+
* </List>
|
|
1569
|
+
* );
|
|
1570
|
+
* }
|
|
1571
|
+
* ```
|
|
1572
|
+
*/
|
|
1573
|
+
declare function getProductItemList(): Promise<{
|
|
1574
|
+
products: IapProductListItem[];
|
|
1575
|
+
} | undefined>;
|
|
1576
|
+
/**
|
|
1577
|
+
* @public
|
|
1578
|
+
* @category 인앱결제
|
|
1579
|
+
* @name IAP
|
|
1580
|
+
* @description 인앱결제 관련 기능을 모은 객체예요. 단건 인앱결제 주문서 이동과 상품 목록 조회 기능을 제공해요.
|
|
1581
|
+
* @property {typeof createOneTimePurchaseOrder} [createOneTimePurchaseOrder] 특정 인앱결제 주문서 페이지로 이동해요. 자세한 내용은 [createOneTimePurchaseOrder](https://developers-apps-in-toss.toss.im/bedrock/reference/native-modules/%EC%9D%B8%EC%95%B1%20%EA%B2%B0%EC%A0%9C/getProductItemList.html) 문서를 참고하세요.
|
|
1582
|
+
* @property {typeof getProductItemList} [getProductItemList] 인앱결제로 구매할 수 있는 상품 목록을 가져와요. 자세한 내용은 [getProductItemList](https://developers-apps-in-toss.toss.im/bedrock/reference/native-modules/%EC%9D%B8%EC%95%B1%20%EA%B2%B0%EC%A0%9C/createOneTimePurchaseOrder.html) 문서를 참고하세요.
|
|
1583
|
+
*/
|
|
1584
|
+
declare const IAP: {
|
|
1585
|
+
createOneTimePurchaseOrder: typeof createOneTimePurchaseOrder;
|
|
1586
|
+
getProductItemList: typeof getProductItemList;
|
|
1587
|
+
};
|
|
1588
|
+
|
|
1218
1589
|
interface OpenCameraOptions {
|
|
1219
1590
|
/**
|
|
1220
1591
|
* 이미지를 Base64 형식으로 반환할지 여부를 나타내는 불리언 값이에요.
|
|
@@ -1325,6 +1696,69 @@ interface SaveBase64DataParams {
|
|
|
1325
1696
|
*/
|
|
1326
1697
|
declare function saveBase64Data(params: SaveBase64DataParams): Promise<void>;
|
|
1327
1698
|
|
|
1699
|
+
/**
|
|
1700
|
+
* @public
|
|
1701
|
+
* @category 게임센터
|
|
1702
|
+
* @name SubmitGameCenterLeaderBoardScoreResponse
|
|
1703
|
+
* @description
|
|
1704
|
+
* 토스게임센터 리더보드에 점수를 제출한 결과 정보를 담아서 반환해요. 반환된 정보를 사용해서 점수 제출 결과에 따라 적절한 에러 처리를 할 수 있어요.
|
|
1705
|
+
* @property {'SUCCESS' | 'LEADERBOARD_NOT_FOUND' | 'PROFILE_NOT_FOUND' | 'UNPARSABLE_SCORE'} statusCode
|
|
1706
|
+
* 점수 제출 결과를 나타내는 상태 코드예요.
|
|
1707
|
+
* - `'SUCCESS'`: 점수 제출이 성공했어요.
|
|
1708
|
+
* - `'LEADERBOARD_NOT_FOUND'`: `gameId`에 해당하는 리더보드를 찾을 수 없어요.
|
|
1709
|
+
* - `'PROFILE_NOT_FOUND'`: 사용자의 프로필이 없어요.
|
|
1710
|
+
* - `'UNPARSABLE_SCORE'`: 점수를 해석할 수 없어요. 점수는 실수(float) 형태의 문자열로 전달해야 해요.
|
|
1711
|
+
*/
|
|
1712
|
+
interface SubmitGameCenterLeaderBoardScoreResponse {
|
|
1713
|
+
statusCode: 'SUCCESS' | 'LEADERBOARD_NOT_FOUND' | 'PROFILE_NOT_FOUND' | 'UNPARSABLE_SCORE';
|
|
1714
|
+
}
|
|
1715
|
+
/**
|
|
1716
|
+
* @public
|
|
1717
|
+
* @category 게임센터
|
|
1718
|
+
* @name submitGameCenterLeaderBoardScore
|
|
1719
|
+
* @description
|
|
1720
|
+
* 사용자의 게임 점수를 토스게임센터 리더보드에 제출해요. 이 기능으로 사용자의 점수를 공식 리더보드에 기록하고 다른 사용자와 비교할 수 있어요.
|
|
1721
|
+
* @param {string} params.score
|
|
1722
|
+
* 제출할 게임 점수예요. 실수 형태의 숫자를 문자열로 전달해야 해요. 예를들어 `"123.45"` 또는 `"9999"` 예요.
|
|
1723
|
+
* @returns {Promise<SubmitGameCenterLeaderBoardScoreResponse | undefined>}
|
|
1724
|
+
* 점수 제출 결과를 반환해요. 앱 버전이 최소 지원 버전보다 낮으면 아무 동작도 하지 않고 `undefined`를 반환해요.
|
|
1725
|
+
*
|
|
1726
|
+
* @example
|
|
1727
|
+
* ### 게임 점수를 토스게임센터 리더보드에 제출하기
|
|
1728
|
+
* ```tsx
|
|
1729
|
+
* import { Button } from 'react-native';
|
|
1730
|
+
* import { submitGameCenterLeaderBoardScore } from '@apps-in-toss/framework';
|
|
1731
|
+
*
|
|
1732
|
+
* function GameCenterLeaderBoardScoreSubmitButton() {
|
|
1733
|
+
* async function handlePress() {
|
|
1734
|
+
* try {
|
|
1735
|
+
* const result = await submitGameCenterLeaderBoardScore({ score: '123.45' });
|
|
1736
|
+
*
|
|
1737
|
+
* if (!result) {
|
|
1738
|
+
* console.warn('지원하지 않는 앱 버전이에요.');
|
|
1739
|
+
* return;
|
|
1740
|
+
* }
|
|
1741
|
+
*
|
|
1742
|
+
* if (result.statusCode === 'SUCCESS') {
|
|
1743
|
+
* console.log('점수 제출 성공!');
|
|
1744
|
+
* } else {
|
|
1745
|
+
* console.error('점수 제출 실패:', result.statusCode);
|
|
1746
|
+
* }
|
|
1747
|
+
* } catch (error) {
|
|
1748
|
+
* console.error('점수 제출 중 오류가 발생했어요.', error);
|
|
1749
|
+
* }
|
|
1750
|
+
* }
|
|
1751
|
+
*
|
|
1752
|
+
* return (
|
|
1753
|
+
* <Button onPress={handlePress}>점수 제출하기</Button>
|
|
1754
|
+
* );
|
|
1755
|
+
* }
|
|
1756
|
+
* ```
|
|
1757
|
+
*/
|
|
1758
|
+
declare function submitGameCenterLeaderBoardScore(params: {
|
|
1759
|
+
score: string;
|
|
1760
|
+
}): Promise<SubmitGameCenterLeaderBoardScoreResponse | undefined>;
|
|
1761
|
+
|
|
1328
1762
|
type CompatiblePlaceholderArgument = object;
|
|
1329
1763
|
/**
|
|
1330
1764
|
* TurboModule 타입 별칭 사용하는 이유?
|
|
@@ -1396,40 +1830,90 @@ interface Spec extends TurboModule {
|
|
|
1396
1830
|
type: 'portrait' | 'landscape';
|
|
1397
1831
|
}) => Promise<void>;
|
|
1398
1832
|
saveBase64Data: (params: SaveBase64DataParams) => Promise<void>;
|
|
1833
|
+
/** IAP */
|
|
1834
|
+
iapCreateOneTimePurchaseOrder: (params: IapCreateOneTimePurchaseOrderOptions) => Promise<IapCreateOneTimePurchaseOrderResult>;
|
|
1835
|
+
iapGetProductItemList: (arg: CompatiblePlaceholderArgument) => Promise<{
|
|
1836
|
+
products: IapProductListItem[];
|
|
1837
|
+
}>;
|
|
1838
|
+
getGameCenterGameProfile: (params: CompatiblePlaceholderArgument) => Promise<GameCenterGameProfileResponse>;
|
|
1839
|
+
submitGameCenterLeaderBoardScore: (params: {
|
|
1840
|
+
score: string;
|
|
1841
|
+
}) => Promise<SubmitGameCenterLeaderBoardScoreResponse>;
|
|
1842
|
+
contactsViral: (params: ContactsViralParams) => () => void;
|
|
1399
1843
|
}
|
|
1400
1844
|
declare const AppsInTossModuleInstance: any;
|
|
1401
1845
|
declare const AppsInTossModule: Spec;
|
|
1402
1846
|
|
|
1403
1847
|
/**
|
|
1404
1848
|
* @public
|
|
1405
|
-
* @category
|
|
1406
|
-
* @name
|
|
1407
|
-
* @description
|
|
1408
|
-
* @param {Promise<void>} text - 클립보드에 복사할 텍스트예요. 문자열 형식으로 입력해요.
|
|
1409
|
-
*
|
|
1849
|
+
* @category 로그인
|
|
1850
|
+
* @name appLogin
|
|
1851
|
+
* @description 토스 인증으로 로그인해요. 로그인이 완료되면 다시 토스 앱으로 이동해요.
|
|
1410
1852
|
* @example
|
|
1411
|
-
*
|
|
1853
|
+
*
|
|
1854
|
+
* ### 토스 인증을 통해 로그인을 하는 예제
|
|
1412
1855
|
*
|
|
1413
1856
|
* ```tsx
|
|
1414
1857
|
* import { Button } from 'react-native';
|
|
1415
|
-
* import {
|
|
1858
|
+
* import { appLogin } from '@apps-in-toss/framework';
|
|
1416
1859
|
*
|
|
1417
|
-
*
|
|
1418
|
-
*
|
|
1419
|
-
*
|
|
1420
|
-
* try {
|
|
1421
|
-
* await setClipboardText('복사할 텍스트');
|
|
1422
|
-
* console.log('텍스트가 복사됐어요!');
|
|
1423
|
-
* } catch (error) {
|
|
1424
|
-
* console.error('텍스트 복사에 실패했어요:', error);
|
|
1425
|
-
* }
|
|
1426
|
-
* };
|
|
1860
|
+
* function Page() {
|
|
1861
|
+
* const handleLogin = async () => {
|
|
1862
|
+
* const { authorizationCode, referrer } = await appLogin();
|
|
1427
1863
|
*
|
|
1428
|
-
*
|
|
1864
|
+
* // 획득한 인가 코드(`authorizationCode`)와 `referrer`를 서버로 전달해요.
|
|
1865
|
+
* }
|
|
1866
|
+
*
|
|
1867
|
+
* return <Button title="로그인" onPress={handleLogin} />;
|
|
1429
1868
|
* }
|
|
1430
1869
|
* ```
|
|
1431
1870
|
*/
|
|
1432
|
-
declare function
|
|
1871
|
+
declare function appLogin(): Promise<{
|
|
1872
|
+
authorizationCode: string;
|
|
1873
|
+
referrer: 'DEFAULT' | 'SANDBOX';
|
|
1874
|
+
}>;
|
|
1875
|
+
|
|
1876
|
+
interface EventLogParams {
|
|
1877
|
+
log_name: string;
|
|
1878
|
+
log_type: 'debug' | 'info' | 'warn' | 'error' | 'screen' | 'impression' | 'click';
|
|
1879
|
+
params: Record<string, Primitive>;
|
|
1880
|
+
}
|
|
1881
|
+
/**
|
|
1882
|
+
* @category 로깅
|
|
1883
|
+
* @kind function
|
|
1884
|
+
* @name eventLog
|
|
1885
|
+
* @description
|
|
1886
|
+
* 이벤트 로그를 기록하는 함수예요.
|
|
1887
|
+
*
|
|
1888
|
+
* 이 함수는 앱 내에서 발생하는 다양한 이벤트를 로깅하는 데 사용돼요. 디버깅, 정보 제공, 경고, 오류 등 다양한 유형의 로그를 기록할 수 있어요. 샌드박스 환경에서는 콘솔에 로그가 출력되고, 실제 환경에서는 로그 시스템에 기록돼요.
|
|
1889
|
+
*
|
|
1890
|
+
* @param {Object} params 로그 기록에 필요한 매개변수 객체예요.
|
|
1891
|
+
* @param {string} params.log_name 로그의 이름이에요.
|
|
1892
|
+
* @param {'debug' | 'info' | 'warn' | 'error' | 'screen' | 'impression' | 'click'} params.log_type 로그의 유형이에요.
|
|
1893
|
+
* @param {Record<string, Primitive>} params.params 로그에 포함할 추가 매개변수 객체예요.
|
|
1894
|
+
*
|
|
1895
|
+
* @returns {Promise<void>} 로그 기록이 완료되면 해결되는 Promise예요.
|
|
1896
|
+
*
|
|
1897
|
+
* @example
|
|
1898
|
+
* ### 이벤트 로그 기록하기
|
|
1899
|
+
*
|
|
1900
|
+
* ```tsx
|
|
1901
|
+
* import { eventLog } from '@apps-in-toss/framework';
|
|
1902
|
+
*
|
|
1903
|
+
* function logUserAction() {
|
|
1904
|
+
* eventLog({
|
|
1905
|
+
* log_name: 'user_action',
|
|
1906
|
+
* log_type: 'info',
|
|
1907
|
+
* params: {
|
|
1908
|
+
* action: 'button_click',
|
|
1909
|
+
* screen: 'main',
|
|
1910
|
+
* userId: 12345
|
|
1911
|
+
* }
|
|
1912
|
+
* });
|
|
1913
|
+
* }
|
|
1914
|
+
* ```
|
|
1915
|
+
*/
|
|
1916
|
+
declare function eventLog(params: EventLogParams): Promise<void>;
|
|
1433
1917
|
|
|
1434
1918
|
/**
|
|
1435
1919
|
* @public
|
|
@@ -1472,32 +1956,33 @@ declare function getClipboardText(): Promise<string>;
|
|
|
1472
1956
|
|
|
1473
1957
|
/**
|
|
1474
1958
|
* @public
|
|
1475
|
-
* @category
|
|
1476
|
-
* @
|
|
1477
|
-
* @
|
|
1478
|
-
* @
|
|
1959
|
+
* @category 환경 확인
|
|
1960
|
+
* @kind function
|
|
1961
|
+
* @name getDeviceId
|
|
1962
|
+
* @description
|
|
1963
|
+
* 사용 중인 기기의 고유 식별자를 문자열로 반환해요.
|
|
1479
1964
|
*
|
|
1480
|
-
*
|
|
1965
|
+
* 이 함수는 현재 사용 중인 기기의 고유 식별자를 문자열로 반환해요. 기기별로 설정이나 데이터를 저장하거나 사용자의 기기를 식별해서 로그를 기록하고 분석하는 데 사용할 수 있어요. 같은 사용자의 여러 기기를 구분하는 데도 유용해요.
|
|
1481
1966
|
*
|
|
1482
|
-
*
|
|
1483
|
-
* import { Button } from 'react-native';
|
|
1484
|
-
* import { appLogin } from '@apps-in-toss/framework';
|
|
1967
|
+
* @returns {string} 기기의 고유 식별자를 나타내는 문자열이에요.
|
|
1485
1968
|
*
|
|
1486
|
-
*
|
|
1487
|
-
*
|
|
1488
|
-
* const { authorizationCode, referrer } = await appLogin();
|
|
1969
|
+
* @example
|
|
1970
|
+
* ### 기기 고유 식별자 가져오기
|
|
1489
1971
|
*
|
|
1490
|
-
*
|
|
1491
|
-
*
|
|
1972
|
+
* ```tsx
|
|
1973
|
+
* import { getDeviceId } from '@apps-in-toss/framework';
|
|
1974
|
+
* import { Text } from 'react-native';
|
|
1492
1975
|
*
|
|
1493
|
-
*
|
|
1976
|
+
* function MyPage() {
|
|
1977
|
+
* const id = getDeviceId();
|
|
1978
|
+
*
|
|
1979
|
+
* return (
|
|
1980
|
+
* <Text>사용자의 기기 고유 식별자: {id}</Text>
|
|
1981
|
+
* );
|
|
1494
1982
|
* }
|
|
1495
1983
|
* ```
|
|
1496
1984
|
*/
|
|
1497
|
-
declare function
|
|
1498
|
-
authorizationCode: string;
|
|
1499
|
-
referrer: "DEFAULT" | "SANDBOX";
|
|
1500
|
-
}>;
|
|
1985
|
+
declare function getDeviceId(): string;
|
|
1501
1986
|
|
|
1502
1987
|
/**
|
|
1503
1988
|
* @public
|
|
@@ -1565,117 +2050,34 @@ declare function getTossAppVersion(): string;
|
|
|
1565
2050
|
|
|
1566
2051
|
/**
|
|
1567
2052
|
* @public
|
|
1568
|
-
* @category
|
|
2053
|
+
* @category 공유
|
|
1569
2054
|
* @kind function
|
|
1570
|
-
* @name
|
|
2055
|
+
* @name getTossShareLink
|
|
1571
2056
|
* @description
|
|
1572
|
-
*
|
|
1573
|
-
*
|
|
1574
|
-
* 이 함수는 현재 사용 중인 기기의 고유 식별자를 문자열로 반환해요. 기기별로 설정이나 데이터를 저장하거나 사용자의 기기를 식별해서 로그를 기록하고 분석하는 데 사용할 수 있어요. 같은 사용자의 여러 기기를 구분하는 데도 유용해요.
|
|
1575
|
-
*
|
|
1576
|
-
* @returns {string} 기기의 고유 식별자를 나타내는 문자열이에요.
|
|
1577
|
-
*
|
|
1578
|
-
* @example
|
|
1579
|
-
* ### 기기 고유 식별자 가져오기
|
|
1580
|
-
*
|
|
1581
|
-
* ```tsx
|
|
1582
|
-
* import { getDeviceId } from '@apps-in-toss/framework';
|
|
1583
|
-
* import { Text } from 'react-native';
|
|
1584
|
-
*
|
|
1585
|
-
* function MyPage() {
|
|
1586
|
-
* const id = getDeviceId();
|
|
1587
|
-
*
|
|
1588
|
-
* return (
|
|
1589
|
-
* <Text>사용자의 기기 고유 식별자: {id}</Text>
|
|
1590
|
-
* );
|
|
1591
|
-
* }
|
|
1592
|
-
* ```
|
|
1593
|
-
*/
|
|
1594
|
-
declare function getDeviceId(): string;
|
|
1595
|
-
|
|
1596
|
-
/**
|
|
1597
|
-
* @public
|
|
1598
|
-
* @category 저장소
|
|
1599
|
-
* @name getItem
|
|
1600
|
-
* @description 모바일 앱의 로컬 저장소에서 문자열 데이터를 가져와요. 주로 앱이 종료되었다가 다시 시작해도 데이터가 유지되어야 하는 경우에 사용해요.
|
|
1601
|
-
* @param {string} key - 가져올 아이템의 키를 입력해요.
|
|
1602
|
-
* @returns {Promise<string | null>} 지정한 키에 저장된 문자열 값을 반환해요. 값이 없으면 `null`을 반환해요.
|
|
1603
|
-
* @example
|
|
1604
|
-
*
|
|
1605
|
-
* ### `my-key`에 저장된 아이템 가져오기
|
|
1606
|
-
* ```ts
|
|
1607
|
-
* const value = await Storage.getItem('my-key');
|
|
1608
|
-
* console.log(value); // 'value'
|
|
1609
|
-
* ```
|
|
1610
|
-
*/
|
|
1611
|
-
declare function getItem(key: string): Promise<string | null>;
|
|
1612
|
-
/**
|
|
1613
|
-
* @public
|
|
1614
|
-
* @category 저장소
|
|
1615
|
-
* @name setItem
|
|
1616
|
-
* @description 모바일 앱의 로컬 저장소에 문자열 데이터를 저장해요. 주로 앱이 종료되었다가 다시 시작해도 데이터가 유지되어야 하는 경우에 사용해요.
|
|
1617
|
-
* @param {string} key - 저장할 아이템의 키를 입력해요.
|
|
1618
|
-
* @param {string} value - 저장할 아이템의 값을 입력해요.
|
|
1619
|
-
* @returns {Promise<void>} 아이템을 성공적으로 저장하면 아무 값도 반환하지 않아요.
|
|
1620
|
-
* @example
|
|
2057
|
+
* `getTossShareLink` 함수는 사용자가 지정한 경로를 토스 앱에서 열 수 있는 공유 링크를 반환해요.
|
|
2058
|
+
* 이 링크를 다른 사람과 공유하면 토스 앱이 실행되면서 지정한 경로로 진입해요. 토스앱이 없는 사람은 iOS 일 때는 앱스토어로 이동하고, Android 일 때는 플레이스토어로 이동해요.
|
|
1621
2059
|
*
|
|
1622
|
-
*
|
|
1623
|
-
*
|
|
1624
|
-
* import { Storage } from '@apps-in-toss/framework';
|
|
2060
|
+
* 경로는 토스 앱 내부 특정 화면을 나타내는 딥링크(deep link) 형식이어야 해요.
|
|
2061
|
+
* 예를 들어 `intoss://<앱 이름>`이나 `intoss://<앱 이름>/about?name=test`처럼 작성해요.
|
|
1625
2062
|
*
|
|
1626
|
-
*
|
|
1627
|
-
* ```
|
|
1628
|
-
*/
|
|
1629
|
-
declare function setItem(key: string, value: string): Promise<void>;
|
|
1630
|
-
/**
|
|
1631
|
-
* @public
|
|
1632
|
-
* @category 저장소
|
|
1633
|
-
* @name removeItem
|
|
1634
|
-
* @description 모바일 앱의 로컬 저장소에서 특정 키에 해당하는 아이템을 삭제해요.
|
|
1635
|
-
* @param {string} key - 삭제할 아이템의 키를 입력해요.
|
|
1636
|
-
* @returns {Promise<void>} 아이템을 삭제하면 아무 값도 반환하지 않아요.
|
|
1637
|
-
* @example
|
|
2063
|
+
* 이 함수를 사용하면 `deep_link_value`를 포함한 완성된 공유 링크를 만들 수 있어요.
|
|
1638
2064
|
*
|
|
1639
|
-
*
|
|
1640
|
-
*
|
|
1641
|
-
* import { Storage } from '@apps-in-toss/framework';
|
|
2065
|
+
* @param path - 딥링크로 열고 싶은 경로예요. `intoss://`로 시작하는 문자열이어야 해요.
|
|
2066
|
+
* @returns {Promise<string>} `deep_link_value`가 포함된 토스 공유 링크를 반환해요.
|
|
1642
2067
|
*
|
|
1643
|
-
* await Storage.removeItem('my-key');
|
|
1644
|
-
* ```
|
|
1645
|
-
*/
|
|
1646
|
-
declare function removeItem(key: string): Promise<void>;
|
|
1647
|
-
/**
|
|
1648
|
-
* @public
|
|
1649
|
-
* @category 저장소
|
|
1650
|
-
* @name clearItems
|
|
1651
|
-
* @description 모바일 앱의 로컬 저장소의 모든 아이템을 삭제해요.
|
|
1652
|
-
* @returns {Promise<void>} 아이템을 삭제하면 아무 값도 반환하지 않고 저장소가 초기화돼요.
|
|
1653
2068
|
* @example
|
|
2069
|
+
* ```tsx
|
|
2070
|
+
* import { share } from '@granite-js/react-native';
|
|
2071
|
+
* import { getTossShareLink } from '@apps-in-toss/framework';
|
|
1654
2072
|
*
|
|
1655
|
-
*
|
|
1656
|
-
*
|
|
1657
|
-
* import { Storage } from '@apps-in-toss/framework';
|
|
2073
|
+
* // '/' 경로를 딥링크로 포함한 토스 공유 링크를 생성해요.
|
|
2074
|
+
* const tossLink = await getTossShareLink('intoss://my-app');
|
|
1658
2075
|
*
|
|
1659
|
-
*
|
|
2076
|
+
* // 생성한 링크를 메시지로 공유해요.
|
|
2077
|
+
* await share({ message: tossLink });
|
|
1660
2078
|
* ```
|
|
1661
2079
|
*/
|
|
1662
|
-
declare function
|
|
1663
|
-
/**
|
|
1664
|
-
* @public
|
|
1665
|
-
* @category 저장소
|
|
1666
|
-
* @name Storage
|
|
1667
|
-
* @description 네이티브의 저장소를 사용해요.
|
|
1668
|
-
* @property {typeof getItem} [getItem] 모바일 앱의 로컬 저장소에서 아이템을 가져오는 함수예요. 자세한 내용은 [getItem](/react-native/reference/framework/저장소/getItem.html)을 참고하세요.
|
|
1669
|
-
* @property {typeof setItem} [setItem] 모바일 앱의 로컬 저장소에 아이템을 저장하는 함수예요. 자세한 내용은 [setItem](/react-native/reference/framework/저장소/setItem.html)을 참고하셰요.
|
|
1670
|
-
* @property {typeof removeItem} [removeItem] 모바일 앱의 로컬 저장소에서 아이템을 삭제하는 함수예요. 자세한 내용은 [removeItem](/react-native/reference/framework/저장소/removeItem.html)을 참고하세요.
|
|
1671
|
-
* @property {typeof clearItems} [clearItems] 모바일 앱의 로컬 저장소를 초기화하는 함수예요. 자세한 내용은 [clearItems](/react-native/reference/framework/저장소/clearItems.html)을 참고하세요.
|
|
1672
|
-
*/
|
|
1673
|
-
declare const Storage: {
|
|
1674
|
-
getItem: typeof getItem;
|
|
1675
|
-
setItem: typeof setItem;
|
|
1676
|
-
removeItem: typeof removeItem;
|
|
1677
|
-
clearItems: typeof clearItems;
|
|
1678
|
-
};
|
|
2080
|
+
declare function getTossShareLink(path: string): Promise<string>;
|
|
1679
2081
|
|
|
1680
2082
|
/**
|
|
1681
2083
|
* @public
|
|
@@ -1720,78 +2122,36 @@ declare function isMinVersionSupported(minVersions: {
|
|
|
1720
2122
|
ios: `${number}.${number}.${number}` | 'always' | 'never';
|
|
1721
2123
|
}): boolean;
|
|
1722
2124
|
|
|
1723
|
-
interface EventLogParams {
|
|
1724
|
-
log_name: string;
|
|
1725
|
-
log_type: 'debug' | 'info' | 'warn' | 'error' | 'screen' | 'impression' | 'click';
|
|
1726
|
-
params: Record<string, Primitive>;
|
|
1727
|
-
}
|
|
1728
2125
|
/**
|
|
1729
|
-
* @
|
|
1730
|
-
* @
|
|
1731
|
-
* @name
|
|
1732
|
-
* @description
|
|
1733
|
-
*
|
|
1734
|
-
*
|
|
1735
|
-
* 이 함수는 앱 내에서 발생하는 다양한 이벤트를 로깅하는 데 사용돼요. 디버깅, 정보 제공, 경고, 오류 등 다양한 유형의 로그를 기록할 수 있어요. 샌드박스 환경에서는 콘솔에 로그가 출력되고, 실제 환경에서는 로그 시스템에 기록돼요.
|
|
1736
|
-
*
|
|
1737
|
-
* @param {Object} params 로그 기록에 필요한 매개변수 객체예요.
|
|
1738
|
-
* @param {string} params.log_name 로그의 이름이에요.
|
|
1739
|
-
* @param {'debug' | 'info' | 'warn' | 'error' | 'screen' | 'impression' | 'click'} params.log_type 로그의 유형이에요.
|
|
1740
|
-
* @param {Record<string, Primitive>} params.params 로그에 포함할 추가 매개변수 객체예요.
|
|
1741
|
-
*
|
|
1742
|
-
* @returns {Promise<void>} 로그 기록이 완료되면 해결되는 Promise예요.
|
|
2126
|
+
* @public
|
|
2127
|
+
* @category 클립보드
|
|
2128
|
+
* @name setClipboardText
|
|
2129
|
+
* @description 텍스트를 클립보드에 복사해서 사용자가 다른 곳에 붙여 넣기 할 수 있어요.
|
|
2130
|
+
* @param {Promise<void>} text - 클립보드에 복사할 텍스트예요. 문자열 형식으로 입력해요.
|
|
1743
2131
|
*
|
|
1744
2132
|
* @example
|
|
1745
|
-
* ###
|
|
2133
|
+
* ### 텍스트를 클립보드에 복사하기
|
|
1746
2134
|
*
|
|
1747
2135
|
* ```tsx
|
|
1748
|
-
* import {
|
|
2136
|
+
* import { Button } from 'react-native';
|
|
2137
|
+
* import { setClipboardText } from '@apps-in-toss/framework';
|
|
1749
2138
|
*
|
|
1750
|
-
*
|
|
1751
|
-
*
|
|
1752
|
-
*
|
|
1753
|
-
*
|
|
1754
|
-
*
|
|
1755
|
-
*
|
|
1756
|
-
*
|
|
1757
|
-
*
|
|
2139
|
+
* // '복사' 버튼을 누르면 "복사할 텍스트"가 클립보드에 복사돼요.
|
|
2140
|
+
* function CopyButton() {
|
|
2141
|
+
* const handleCopy = async () => {
|
|
2142
|
+
* try {
|
|
2143
|
+
* await setClipboardText('복사할 텍스트');
|
|
2144
|
+
* console.log('텍스트가 복사됐어요!');
|
|
2145
|
+
* } catch (error) {
|
|
2146
|
+
* console.error('텍스트 복사에 실패했어요:', error);
|
|
1758
2147
|
* }
|
|
1759
|
-
* }
|
|
1760
|
-
* }
|
|
1761
|
-
* ```
|
|
1762
|
-
*/
|
|
1763
|
-
declare function eventLog(params: EventLogParams): Promise<void>;
|
|
1764
|
-
|
|
1765
|
-
/**
|
|
1766
|
-
* @public
|
|
1767
|
-
* @category 공유
|
|
1768
|
-
* @kind function
|
|
1769
|
-
* @name getTossShareLink
|
|
1770
|
-
* @description
|
|
1771
|
-
* `getTossShareLink` 함수는 사용자가 지정한 경로를 토스 앱에서 열 수 있는 공유 링크를 반환해요.
|
|
1772
|
-
* 이 링크를 다른 사람과 공유하면 토스 앱이 실행되면서 지정한 경로로 진입해요. 토스앱이 없는 사람은 iOS 일 때는 앱스토어로 이동하고, Android 일 때는 플레이스토어로 이동해요.
|
|
1773
|
-
*
|
|
1774
|
-
* 경로는 토스 앱 내부 특정 화면을 나타내는 딥링크(deep link) 형식이어야 해요.
|
|
1775
|
-
* 예를 들어 `intoss://<앱 이름>`이나 `intoss://<앱 이름>/about?name=test`처럼 작성해요.
|
|
1776
|
-
*
|
|
1777
|
-
* 이 함수를 사용하면 `deep_link_value`를 포함한 완성된 공유 링크를 만들 수 있어요.
|
|
1778
|
-
*
|
|
1779
|
-
* @param path - 딥링크로 열고 싶은 경로예요. `intoss://`로 시작하는 문자열이어야 해요.
|
|
1780
|
-
* @returns {Promise<string>} `deep_link_value`가 포함된 토스 공유 링크를 반환해요.
|
|
1781
|
-
*
|
|
1782
|
-
* @example
|
|
1783
|
-
* ```tsx
|
|
1784
|
-
* import { share } from '@granite-js/react-native';
|
|
1785
|
-
* import { getTossShareLink } from '@apps-in-toss/framework';
|
|
1786
|
-
*
|
|
1787
|
-
* // '/' 경로를 딥링크로 포함한 토스 공유 링크를 생성해요.
|
|
1788
|
-
* const tossLink = await getTossShareLink('intoss://my-app');
|
|
2148
|
+
* };
|
|
1789
2149
|
*
|
|
1790
|
-
*
|
|
1791
|
-
*
|
|
2150
|
+
* return <Button title="복사" onPress={handleCopy} />;
|
|
2151
|
+
* }
|
|
1792
2152
|
* ```
|
|
1793
2153
|
*/
|
|
1794
|
-
declare function
|
|
2154
|
+
declare function setClipboardText(text: string): Promise<void>;
|
|
1795
2155
|
|
|
1796
2156
|
/**
|
|
1797
2157
|
* @public
|
|
@@ -1857,12 +2217,120 @@ declare function setDeviceOrientation(options: {
|
|
|
1857
2217
|
type: 'portrait' | 'landscape';
|
|
1858
2218
|
}): Promise<void>;
|
|
1859
2219
|
|
|
2220
|
+
/**
|
|
2221
|
+
* @public
|
|
2222
|
+
* @category 저장소
|
|
2223
|
+
* @name getItem
|
|
2224
|
+
* @description 모바일 앱의 로컬 저장소에서 문자열 데이터를 가져와요. 주로 앱이 종료되었다가 다시 시작해도 데이터가 유지되어야 하는 경우에 사용해요.
|
|
2225
|
+
* @param {string} key - 가져올 아이템의 키를 입력해요.
|
|
2226
|
+
* @returns {Promise<string | null>} 지정한 키에 저장된 문자열 값을 반환해요. 값이 없으면 `null`을 반환해요.
|
|
2227
|
+
* @example
|
|
2228
|
+
*
|
|
2229
|
+
* ### `my-key`에 저장된 아이템 가져오기
|
|
2230
|
+
* ```ts
|
|
2231
|
+
* const value = await Storage.getItem('my-key');
|
|
2232
|
+
* console.log(value); // 'value'
|
|
2233
|
+
* ```
|
|
2234
|
+
*/
|
|
2235
|
+
declare function getItem(key: string): Promise<string | null>;
|
|
2236
|
+
/**
|
|
2237
|
+
* @public
|
|
2238
|
+
* @category 저장소
|
|
2239
|
+
* @name setItem
|
|
2240
|
+
* @description 모바일 앱의 로컬 저장소에 문자열 데이터를 저장해요. 주로 앱이 종료되었다가 다시 시작해도 데이터가 유지되어야 하는 경우에 사용해요.
|
|
2241
|
+
* @param {string} key - 저장할 아이템의 키를 입력해요.
|
|
2242
|
+
* @param {string} value - 저장할 아이템의 값을 입력해요.
|
|
2243
|
+
* @returns {Promise<void>} 아이템을 성공적으로 저장하면 아무 값도 반환하지 않아요.
|
|
2244
|
+
* @example
|
|
2245
|
+
*
|
|
2246
|
+
* ### `my-key`에 아이템 저장하기
|
|
2247
|
+
* ```ts
|
|
2248
|
+
* import { Storage } from '@apps-in-toss/framework';
|
|
2249
|
+
*
|
|
2250
|
+
* await Storage.setItem('my-key', 'value');
|
|
2251
|
+
* ```
|
|
2252
|
+
*/
|
|
2253
|
+
declare function setItem(key: string, value: string): Promise<void>;
|
|
2254
|
+
/**
|
|
2255
|
+
* @public
|
|
2256
|
+
* @category 저장소
|
|
2257
|
+
* @name removeItem
|
|
2258
|
+
* @description 모바일 앱의 로컬 저장소에서 특정 키에 해당하는 아이템을 삭제해요.
|
|
2259
|
+
* @param {string} key - 삭제할 아이템의 키를 입력해요.
|
|
2260
|
+
* @returns {Promise<void>} 아이템을 삭제하면 아무 값도 반환하지 않아요.
|
|
2261
|
+
* @example
|
|
2262
|
+
*
|
|
2263
|
+
* ### `my-key`에 저장된 아이템 삭제하기
|
|
2264
|
+
* ```ts
|
|
2265
|
+
* import { Storage } from '@apps-in-toss/framework';
|
|
2266
|
+
*
|
|
2267
|
+
* await Storage.removeItem('my-key');
|
|
2268
|
+
* ```
|
|
2269
|
+
*/
|
|
2270
|
+
declare function removeItem(key: string): Promise<void>;
|
|
2271
|
+
/**
|
|
2272
|
+
* @public
|
|
2273
|
+
* @category 저장소
|
|
2274
|
+
* @name clearItems
|
|
2275
|
+
* @description 모바일 앱의 로컬 저장소의 모든 아이템을 삭제해요.
|
|
2276
|
+
* @returns {Promise<void>} 아이템을 삭제하면 아무 값도 반환하지 않고 저장소가 초기화돼요.
|
|
2277
|
+
* @example
|
|
2278
|
+
*
|
|
2279
|
+
* ### 저장소 초기화하기
|
|
2280
|
+
* ```ts
|
|
2281
|
+
* import { Storage } from '@apps-in-toss/framework';
|
|
2282
|
+
*
|
|
2283
|
+
* await Storage.clearItems();
|
|
2284
|
+
* ```
|
|
2285
|
+
*/
|
|
2286
|
+
declare function clearItems(): Promise<void>;
|
|
2287
|
+
/**
|
|
2288
|
+
* @public
|
|
2289
|
+
* @category 저장소
|
|
2290
|
+
* @name Storage
|
|
2291
|
+
* @description 네이티브의 저장소를 사용해요.
|
|
2292
|
+
* @property {typeof getItem} [getItem] 모바일 앱의 로컬 저장소에서 아이템을 가져오는 함수예요. 자세한 내용은 [getItem](/react-native/reference/native-modules/저장소/getItem.html)을 참고하세요.
|
|
2293
|
+
* @property {typeof setItem} [setItem] 모바일 앱의 로컬 저장소에 아이템을 저장하는 함수예요. 자세한 내용은 [setItem](/react-native/reference/native-modules/저장소/setItem.html)을 참고하셰요.
|
|
2294
|
+
* @property {typeof removeItem} [removeItem] 모바일 앱의 로컬 저장소에서 아이템을 삭제하는 함수예요. 자세한 내용은 [removeItem](/react-native/reference/native-modules/저장소/removeItem.html)을 참고하세요.
|
|
2295
|
+
* @property {typeof clearItems} [clearItems] 모바일 앱의 로컬 저장소를 초기화하는 함수예요. 자세한 내용은 [clearItems](/react-native/reference/native-modules/저장소/clearItems.html)을 참고하세요.
|
|
2296
|
+
*/
|
|
2297
|
+
declare const Storage: {
|
|
2298
|
+
getItem: typeof getItem;
|
|
2299
|
+
setItem: typeof setItem;
|
|
2300
|
+
removeItem: typeof removeItem;
|
|
2301
|
+
clearItems: typeof clearItems;
|
|
2302
|
+
};
|
|
2303
|
+
|
|
2304
|
+
/**
|
|
2305
|
+
* @public
|
|
2306
|
+
* @category 게임센터
|
|
2307
|
+
* @name openGameCenterLeaderboard
|
|
2308
|
+
* @description 게임센터 리더보드 웹뷰를 열어요.
|
|
2309
|
+
* 앱 버전이 최소 지원 버전(`5.221.0`)보다 낮으면 아무 동작도 하지 않고 `undefined`를 반환해요.
|
|
2310
|
+
* 게임센터를 사용하는 사용자는 반드시 최소 지원 버전 이상이어야 게임을 실행할 수 있어요.
|
|
2311
|
+
* @returns 리더보드 웹뷰를 호출해요. 앱 버전이 낮으면 아무 동작도 하지 않고 `undefined`를 반환해요.
|
|
2312
|
+
*
|
|
2313
|
+
* @example
|
|
2314
|
+
* import { Button } from 'react-native';
|
|
2315
|
+
* import { openGameCenterLeaderboard } from '@apps-in-toss/framework';
|
|
2316
|
+
*
|
|
2317
|
+
* // '리더보드' 버튼을 누르면 게임센터 리더보드 웹뷰가 열려요.
|
|
2318
|
+
* function LeaderboardButton() {
|
|
2319
|
+
* const onPress = () => {
|
|
2320
|
+
* openGameCenterLeaderboard();
|
|
2321
|
+
* };
|
|
2322
|
+
*
|
|
2323
|
+
* return <Button title="리더보드 웹뷰 호출" onPress={onPress} />;
|
|
2324
|
+
* }
|
|
2325
|
+
*/
|
|
2326
|
+
declare function openGameCenterLeaderboard(): Promise<void>;
|
|
2327
|
+
|
|
1860
2328
|
/**
|
|
1861
2329
|
* @public
|
|
1862
2330
|
* @category 토스페이
|
|
1863
2331
|
* @name TossPay
|
|
1864
2332
|
* @description 토스페이 결제 관련 함수를 모아둔 객체예요.
|
|
1865
|
-
* @property {typeof checkoutPayment} [checkoutPayment] 토스페이 결제를 인증하는 함수예요. 자세한 내용은 [checkoutPayment](/react-native/reference/
|
|
2333
|
+
* @property {typeof checkoutPayment} [checkoutPayment] 토스페이 결제를 인증하는 함수예요. 자세한 내용은 [checkoutPayment](/react-native/reference/native-modules/토스페이/checkoutPayment)를 참고하세요.
|
|
1866
2334
|
*/
|
|
1867
2335
|
declare const TossPay: {
|
|
1868
2336
|
checkoutPayment: typeof checkoutPayment;
|
|
@@ -1872,10 +2340,10 @@ declare const TossPay: {
|
|
|
1872
2340
|
* @category 광고
|
|
1873
2341
|
* @name GoogleAdMob
|
|
1874
2342
|
* @description Google AdMob 광고 관련 함수를 모아둔 객체예요.
|
|
1875
|
-
* @property {typeof loadAdMobInterstitialAd} [loadAdMobInterstitialAd] 전면 광고를 로드하는 함수예요. 자세한 내용은 [loadAdMobInterstitialAd](/react-native/reference/
|
|
1876
|
-
* @property {typeof showAdMobInterstitialAd} [showAdMobInterstitialAd] 로드한 전면 광고를 보여주는 함수예요. 자세한 내용은 [showAdMobInterstitialAd](/react-native/reference/
|
|
1877
|
-
* @property {typeof loadAdMobRewardedAd} [loadAdMobRewardedAd] 보상형 광고를 로드하는 함수예요. 자세한 내용은 [loadAdMobRewardedAd](/react-native/reference/
|
|
1878
|
-
* @property {typeof showAdMobRewardedAd} [showAdMobRewardedAd] 로드한 보상형 광고를 보여주는 함수예요. 자세한 내용은 [showAdMobRewardedAd](/react-native/reference/
|
|
2343
|
+
* @property {typeof loadAdMobInterstitialAd} [loadAdMobInterstitialAd] 전면 광고를 로드하는 함수예요. 자세한 내용은 [loadAdMobInterstitialAd](/react-native/reference/native-modules/광고/loadAdMobInterstitialAd.html)를 참고하세요.
|
|
2344
|
+
* @property {typeof showAdMobInterstitialAd} [showAdMobInterstitialAd] 로드한 전면 광고를 보여주는 함수예요. 자세한 내용은 [showAdMobInterstitialAd](/react-native/reference/native-modules/광고/showAdMobInterstitialAd.html)를 참고하세요.
|
|
2345
|
+
* @property {typeof loadAdMobRewardedAd} [loadAdMobRewardedAd] 보상형 광고를 로드하는 함수예요. 자세한 내용은 [loadAdMobRewardedAd](/react-native/reference/native-modules/광고/loadAdMobRewardedAd.html)를 참고하세요.
|
|
2346
|
+
* @property {typeof showAdMobRewardedAd} [showAdMobRewardedAd] 로드한 보상형 광고를 보여주는 함수예요. 자세한 내용은 [showAdMobRewardedAd](/react-native/reference/native-modules/광고/showAdMobRewardedAd.html)를 참고하세요.
|
|
1879
2347
|
*/
|
|
1880
2348
|
declare const GoogleAdMob: {
|
|
1881
2349
|
loadAdMobInterstitialAd: typeof loadAdMobInterstitialAd;
|
|
@@ -1897,7 +2365,7 @@ declare const GoogleAdMob: {
|
|
|
1897
2365
|
*
|
|
1898
2366
|
* ```tsx
|
|
1899
2367
|
* import { Button } from 'react-native';
|
|
1900
|
-
* import { closeView } from '
|
|
2368
|
+
* import { closeView } from '@apps-in-toss/native-modules';
|
|
1901
2369
|
*
|
|
1902
2370
|
* function CloseButton() {
|
|
1903
2371
|
* return <Button title="닫기" onPress={closeView} />;
|
|
@@ -1920,7 +2388,7 @@ declare function closeView(): Promise<void>;
|
|
|
1920
2388
|
* ### 현재 사용자의 로케일 정보 가져오기
|
|
1921
2389
|
*
|
|
1922
2390
|
* ```tsx
|
|
1923
|
-
* import { getLocale } from '
|
|
2391
|
+
* import { getLocale } from '@apps-in-toss/native-modules';
|
|
1924
2392
|
* import { Text } from 'react-native';
|
|
1925
2393
|
*
|
|
1926
2394
|
* function MyPage() {
|
|
@@ -1947,7 +2415,7 @@ declare function getLocale(): string;
|
|
|
1947
2415
|
* ### 처음 진입한 스킴 값 가져오기
|
|
1948
2416
|
*
|
|
1949
2417
|
* ```tsx
|
|
1950
|
-
* import { getSchemeUri } from '
|
|
2418
|
+
* import { getSchemeUri } from '@apps-in-toss/native-modules';
|
|
1951
2419
|
* import { Text } from 'react-native';
|
|
1952
2420
|
*
|
|
1953
2421
|
* function MyPage() {
|
|
@@ -1999,7 +2467,7 @@ interface HapticFeedbackOptions {
|
|
|
1999
2467
|
*
|
|
2000
2468
|
* ```tsx
|
|
2001
2469
|
* import { Button } from 'react-native';
|
|
2002
|
-
* import { generateHapticFeedback } from '
|
|
2470
|
+
* import { generateHapticFeedback } from '@apps-in-toss/native-modules';
|
|
2003
2471
|
*
|
|
2004
2472
|
* function GenerateHapticFeedback() {
|
|
2005
2473
|
* return <Button title="햅틱" onPress={() => { generateHapticFeedback( { type: "tickWeak"}) }} />;
|
|
@@ -2026,7 +2494,7 @@ declare function generateHapticFeedback(options: HapticFeedbackOptions): Promise
|
|
|
2026
2494
|
* 아래는 버튼을 클릭하면 메시지를 공유하는 간단한 예제예요.
|
|
2027
2495
|
*
|
|
2028
2496
|
* ```tsx
|
|
2029
|
-
* import { share } from '
|
|
2497
|
+
* import { share } from '@apps-in-toss/native-modules';
|
|
2030
2498
|
* import { Button } from 'react-native';
|
|
2031
2499
|
*
|
|
2032
2500
|
* function MyPage() {
|
|
@@ -2060,7 +2528,7 @@ declare function share(message: {
|
|
|
2060
2528
|
*
|
|
2061
2529
|
* ```tsx
|
|
2062
2530
|
* import { Button } from 'react-native';
|
|
2063
|
-
* import { setSecureScreen } from '
|
|
2531
|
+
* import { setSecureScreen } from '@apps-in-toss/native-modules';
|
|
2064
2532
|
*
|
|
2065
2533
|
* function SetSecureScreen() {
|
|
2066
2534
|
* return <Button title="캡쳐 막기" onPress={async () => {
|
|
@@ -2102,7 +2570,7 @@ declare function setSecureScreen(options: {
|
|
|
2102
2570
|
*
|
|
2103
2571
|
* ```tsx
|
|
2104
2572
|
* import { Button } from 'react-native';
|
|
2105
|
-
* import { setScreenAwakeMode } from '
|
|
2573
|
+
* import { setScreenAwakeMode } from '@apps-in-toss/native-modules';
|
|
2106
2574
|
*
|
|
2107
2575
|
* function SetScreenAwakeMode() {
|
|
2108
2576
|
* return (
|
|
@@ -2121,7 +2589,7 @@ declare function setSecureScreen(options: {
|
|
|
2121
2589
|
*
|
|
2122
2590
|
* ```tsx
|
|
2123
2591
|
* import { useEffect } from 'react';
|
|
2124
|
-
* import { setScreenAwakeMode, cleanUp } from '
|
|
2592
|
+
* import { setScreenAwakeMode, cleanUp } from '@apps-in-toss/native-modules';
|
|
2125
2593
|
*
|
|
2126
2594
|
* function MediaScreen() {
|
|
2127
2595
|
* useEffect(() => {
|
|
@@ -2172,7 +2640,7 @@ type NetworkStatus = 'OFFLINE' | 'WIFI' | '2G' | '3G' | '4G' | '5G' | 'WWAN' | '
|
|
|
2172
2640
|
* ```tsx
|
|
2173
2641
|
* import { useState, useEffect } from 'react';
|
|
2174
2642
|
* import { Text, View } from 'react-native';
|
|
2175
|
-
* import { getNetworkStatus, NetworkStatus } from '
|
|
2643
|
+
* import { getNetworkStatus, NetworkStatus } from '@apps-in-toss/native-modules';
|
|
2176
2644
|
*
|
|
2177
2645
|
* function GetNetworkStatus() {
|
|
2178
2646
|
* const [status, setStatus] = useState<NetworkStatus | ''>('');
|
|
@@ -2216,7 +2684,7 @@ declare function getNetworkStatus(): Promise<NetworkStatus>;
|
|
|
2216
2684
|
*
|
|
2217
2685
|
*
|
|
2218
2686
|
* ```tsx
|
|
2219
|
-
* import { setIosSwipeGestureEnabled } from '
|
|
2687
|
+
* import { setIosSwipeGestureEnabled } from '@apps-in-toss/native-modules';
|
|
2220
2688
|
* import { Button } from 'react-native';
|
|
2221
2689
|
*
|
|
2222
2690
|
* function Page() {
|
|
@@ -2257,7 +2725,7 @@ declare function setIosSwipeGestureEnabled(options: {
|
|
|
2257
2725
|
* ### 외부 URL 열기
|
|
2258
2726
|
*
|
|
2259
2727
|
* ```tsx
|
|
2260
|
-
* import { openURL } from '
|
|
2728
|
+
* import { openURL } from '@apps-in-toss/native-modules';
|
|
2261
2729
|
* import { Button } from 'react-native';
|
|
2262
2730
|
*
|
|
2263
2731
|
* function Page() {
|
|
@@ -2293,7 +2761,7 @@ declare function openURL(url: string): Promise<any>;
|
|
|
2293
2761
|
* ### 현재 실행중인 OS 플랫폼 확인하기
|
|
2294
2762
|
*
|
|
2295
2763
|
* ```tsx
|
|
2296
|
-
* import { getPlatformOS } from '
|
|
2764
|
+
* import { getPlatformOS } from '@apps-in-toss/native-modules';
|
|
2297
2765
|
* import { Text } 'react-native';
|
|
2298
2766
|
*
|
|
2299
2767
|
* function Page() {
|
|
@@ -2349,4 +2817,4 @@ declare const INTERNAL__module: {
|
|
|
2349
2817
|
tossCoreEventLog: typeof tossCoreEventLog;
|
|
2350
2818
|
};
|
|
2351
2819
|
|
|
2352
|
-
export { Accuracy, AppsInTossModule, BedrockCoreModule, BedrockModule, type CheckoutPaymentOptions, type CheckoutPaymentResult, type ContactEntity, type ContactResult, type EventLogParams, type FetchAlbumPhotosOptions, type GetCurrentLocationOptions, GoogleAdMob, type HapticFeedbackType, AppsInTossModuleInstance as INTERNAL__AppsInTossModule, INTERNAL__module, type ImageResponse, type LoadAdMobInterstitialAdEvent, type LoadAdMobInterstitialAdOptions, type LoadAdMobRewardedAdEvent, type LoadAdMobRewardedAdOptions, type Location, type LocationCoords, type NetworkStatus, type OpenCameraOptions, type PermissionAccess, type PermissionName, type PermissionStatus, type Primitive, type SaveBase64DataParams, type ShowAdMobInterstitialAdEvent, type ShowAdMobInterstitialAdOptions, type ShowAdMobRewardedAdEvent, type ShowAdMobRewardedAdOptions, type StartUpdateLocationOptions$1 as StartUpdateLocationOptions, type StartUpdateLocationSubscription, Storage, TossPay, type UpdateLocationEventEmitter, appLogin, appsInTossEvent, closeView, eventLog, fetchAlbumPhotos, fetchContacts, generateHapticFeedback, getClipboardText, getCurrentLocation, getDeviceId, getLocale, getNetworkStatus, getOperationalEnvironment, getPlatformOS, getSchemeUri, getTossAppVersion, getTossShareLink, isMinVersionSupported, openCamera, openURL, saveBase64Data, setClipboardText, setDeviceOrientation, setIosSwipeGestureEnabled, setScreenAwakeMode, setSecureScreen, share, startUpdateLocation };
|
|
2820
|
+
export { Accuracy, AppsInTossModule, BedrockCoreModule, BedrockModule, type CheckoutPaymentOptions, type CheckoutPaymentResult, type ContactEntity, type ContactResult, type ContactsViralParams, type EventLogParams, type FetchAlbumPhotosOptions, type GameCenterGameProfileResponse, type GetCurrentLocationOptions, GoogleAdMob, type HapticFeedbackType, IAP, AppsInTossModuleInstance as INTERNAL__AppsInTossModule, INTERNAL__module, type IapCreateOneTimePurchaseOrderOptions, type IapCreateOneTimePurchaseOrderResult, type IapProductListItem, type ImageResponse, type LoadAdMobInterstitialAdEvent, type LoadAdMobInterstitialAdOptions, type LoadAdMobRewardedAdEvent, type LoadAdMobRewardedAdOptions, type Location, type LocationCoords, type NetworkStatus, type OpenCameraOptions, type PermissionAccess, type PermissionName, type PermissionStatus, type Primitive, type SaveBase64DataParams, type ShowAdMobInterstitialAdEvent, type ShowAdMobInterstitialAdOptions, type ShowAdMobRewardedAdEvent, type ShowAdMobRewardedAdOptions, type StartUpdateLocationOptions$1 as StartUpdateLocationOptions, type StartUpdateLocationSubscription, Storage, type SubmitGameCenterLeaderBoardScoreResponse, TossPay, type UpdateLocationEventEmitter, appLogin, appsInTossEvent, closeView, contactsViral, eventLog, fetchAlbumPhotos, fetchContacts, generateHapticFeedback, getClipboardText, getCurrentLocation, getDeviceId, getGameCenterGameProfile, getLocale, getNetworkStatus, getOperationalEnvironment, getPlatformOS, getSchemeUri, getTossAppVersion, getTossShareLink, isMinVersionSupported, onVisibilityChangedByTransparentServiceWeb, openCamera, openGameCenterLeaderboard, openURL, saveBase64Data, setClipboardText, setDeviceOrientation, setIosSwipeGestureEnabled, setScreenAwakeMode, setSecureScreen, share, startUpdateLocation, submitGameCenterLeaderBoardScore };
|