@joryio/react-native-sdk 1.4.0-beta.1 → 1.4.0-beta.4
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 +16 -2
- package/README.md +13 -0
- package/android/src/main/java/io/joryio/reactnative/JoryioCardFeedViewManager.kt +104 -0
- package/android/src/main/java/io/joryio/reactnative/JoryioModule.kt +331 -0
- package/android/src/main/java/io/joryio/reactnative/JoryioPackage.kt +2 -1
- package/android/src/main/java/io/joryio/reactnative/JoryioPlacementViewManager.kt +105 -0
- package/ios/JoryioCardFeedViewManager.m +14 -0
- package/ios/JoryioCardFeedViewManager.swift +77 -0
- package/ios/JoryioModule.m +76 -0
- package/ios/JoryioModule.swift +296 -4
- package/ios/JoryioPlacementViewManager.m +14 -0
- package/ios/JoryioPlacementViewManager.swift +75 -0
- package/lib/index.d.ts +326 -2
- package/lib/index.js +570 -3
- package/lib/index.js.map +1 -1
- package/package.json +2 -1
- package/src/index.ts +724 -2
package/lib/index.d.ts
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This package's version - the same number every Joryio SDK carries
|
|
3
|
+
* (sdk-version-parity.spec.ts pins it; the release tooling rewrites it).
|
|
4
|
+
* Handed to the native SDK at initialize() as `sdkWrapperVersion`, which
|
|
5
|
+
* sends it on every request as `X-Joryio-SDK-Wrapper-Version` next to
|
|
6
|
+
* `X-Joryio-SDK-Wrapper: react-native` (D427), so the dashboard shows the
|
|
7
|
+
* version of THIS package, the one the app upgrades.
|
|
8
|
+
*/
|
|
9
|
+
export declare const SDK_VERSION = "1.4.0";
|
|
1
10
|
/**
|
|
2
11
|
* Mirrors the backend's SUBSCRIPTION_CHANNELS and the web SDK. Five, including
|
|
3
12
|
* viber - it was added to the backend and to no SDK.
|
|
@@ -113,6 +122,18 @@ export interface JoryioConfig {
|
|
|
113
122
|
* Same option, same name, on iOS, Android and Unity.
|
|
114
123
|
*/
|
|
115
124
|
holdInAppMessagesForHandler?: boolean;
|
|
125
|
+
/**
|
|
126
|
+
* iOS only (default false): an https link from Joryio content - an in-app
|
|
127
|
+
* message, a placement, a card, a push - whose host is one of your app's
|
|
128
|
+
* associated domains (`applinks:` entries, `*.shop.com` included) goes to
|
|
129
|
+
* your app's own universal-link handling (`scene(_:continue:)` /
|
|
130
|
+
* `application(_:continue:restorationHandler:)`) instead of Safari. With
|
|
131
|
+
* React Native that usually means the `Linking` 'url' event. Ignored on
|
|
132
|
+
* Android, which routes verified App Links to the app itself. A handler set
|
|
133
|
+
* with {@link JoryioSDK.setLinkHandler} runs first. Same option on iOS
|
|
134
|
+
* (`JoryioConfig.forwardUniversalLinks`) and Unity.
|
|
135
|
+
*/
|
|
136
|
+
forwardUniversalLinks?: boolean;
|
|
116
137
|
/**
|
|
117
138
|
* Tracking consent at start-up. Same option and values as the web, iOS,
|
|
118
139
|
* Android and Unity SDKs.
|
|
@@ -324,6 +345,211 @@ export declare const MAX_PRE_INIT_CALLS = 1000;
|
|
|
324
345
|
* apply the same rule - see {@link Joryio.trackInAppImpression}.
|
|
325
346
|
*/
|
|
326
347
|
export declare const IN_APP_DISPLAY_DWELL_MS = 1000;
|
|
348
|
+
/** Share of an item that must be on screen for it to count as seen - the same on every Joryio SDK. */
|
|
349
|
+
export declare const PLACEMENT_VIEWABLE_FRACTION = 0.5;
|
|
350
|
+
/** A placement key is fetched from the network at most once per this many seconds - the same on every Joryio SDK. */
|
|
351
|
+
export declare const PLACEMENT_MIN_REFRESH_SECONDS = 30;
|
|
352
|
+
/**
|
|
353
|
+
* A drawn product card's tap is reported as `clicked` with the elementId
|
|
354
|
+
* `product:<product id>` (at most 128 characters) - the same on every Joryio SDK.
|
|
355
|
+
*/
|
|
356
|
+
export declare const PLACEMENT_PRODUCT_ELEMENT_PREFIX = "product:";
|
|
357
|
+
/** Width of a drawn product card when the app does not set one (dp / points) - the same on every Joryio SDK. */
|
|
358
|
+
export declare const PLACEMENT_PRODUCT_CARD_WIDTH = 160;
|
|
359
|
+
/** The elementId a product card's click is reported with - use it with `markClicked` when you draw the cards yourself. */
|
|
360
|
+
export declare function placementProductElementId(productId: string): string;
|
|
361
|
+
export type PlacementEmptyBehavior = 'collapse' | 'keep_space';
|
|
362
|
+
export interface PlacementContent {
|
|
363
|
+
kind: 'native' | 'html';
|
|
364
|
+
title?: string;
|
|
365
|
+
body?: string;
|
|
366
|
+
imageUrl?: string;
|
|
367
|
+
buttons?: Array<{
|
|
368
|
+
id: string;
|
|
369
|
+
text: string;
|
|
370
|
+
action: string;
|
|
371
|
+
url?: string;
|
|
372
|
+
}>;
|
|
373
|
+
closeButton?: boolean;
|
|
374
|
+
html?: string;
|
|
375
|
+
css?: string;
|
|
376
|
+
}
|
|
377
|
+
/** A product card of a recommendation placement item (D444 Phase 2b). Same names on all five SDKs. */
|
|
378
|
+
export interface PlacementProduct {
|
|
379
|
+
id: string;
|
|
380
|
+
title: string | null;
|
|
381
|
+
price: string | null;
|
|
382
|
+
compareAtPrice: string | null;
|
|
383
|
+
discountPercent: number | null;
|
|
384
|
+
imageUrl: string | null;
|
|
385
|
+
url: string | null;
|
|
386
|
+
}
|
|
387
|
+
/** An item to draw, with the calls that report what the person did with it. */
|
|
388
|
+
export interface PlacementItem {
|
|
389
|
+
id: string;
|
|
390
|
+
variantId?: string | null;
|
|
391
|
+
kind: 'native' | 'html' | 'data';
|
|
392
|
+
data: Record<string, string | number | boolean | null>;
|
|
393
|
+
content?: PlacementContent | null;
|
|
394
|
+
/** Products picked for the person by a recommendation model; [] when the item has none. Draw them as cards. */
|
|
395
|
+
products: PlacementProduct[];
|
|
396
|
+
/** A viewable impression (your UI drew it): once at least half of it was on screen for IN_APP_DISPLAY_DWELL_MS. */
|
|
397
|
+
markDisplayed(): void;
|
|
398
|
+
markClicked(elementId?: string): void;
|
|
399
|
+
markDismissed(): void;
|
|
400
|
+
}
|
|
401
|
+
export interface Placement {
|
|
402
|
+
placementKey: string;
|
|
403
|
+
items: PlacementItem[];
|
|
404
|
+
isControl: boolean;
|
|
405
|
+
emptyBehavior: PlacementEmptyBehavior;
|
|
406
|
+
maxItems: number;
|
|
407
|
+
ttlSeconds: number;
|
|
408
|
+
/** For a held-out person (`isControl`): the empty spot was on screen. */
|
|
409
|
+
markDisplayed(): void;
|
|
410
|
+
}
|
|
411
|
+
export interface JoryioPlacementProps {
|
|
412
|
+
placementKey: string;
|
|
413
|
+
style?: unknown;
|
|
414
|
+
/** After each draw: what was drawn and its height (0 when collapsed). */
|
|
415
|
+
onRender?: (info: {
|
|
416
|
+
placementKey: string;
|
|
417
|
+
itemCount: number;
|
|
418
|
+
isControl: boolean;
|
|
419
|
+
emptyBehavior: PlacementEmptyBehavior;
|
|
420
|
+
height: number;
|
|
421
|
+
}) => void;
|
|
422
|
+
/**
|
|
423
|
+
* A `deep_link` button with an app link (`myapp://cart`) was tapped: route
|
|
424
|
+
* it. An http(s) link is opened by the native SDK instead, and any other
|
|
425
|
+
* scheme (javascript:, data:, intent:, ...) is refused - see isAppDeepLink.
|
|
426
|
+
* A handler set with setLinkHandler sees every link first; this one is
|
|
427
|
+
* called when it declines.
|
|
428
|
+
*/
|
|
429
|
+
onDeepLink?: (url: string) => void;
|
|
430
|
+
/**
|
|
431
|
+
* Draw an item's recommended products as a horizontal row of product cards
|
|
432
|
+
* (image, title, price, optional button) - the native view does it. Default true.
|
|
433
|
+
*/
|
|
434
|
+
showProducts?: boolean;
|
|
435
|
+
/** Label of a button on every product card; unset = no button (the whole card opens the product). */
|
|
436
|
+
productButtonText?: string;
|
|
437
|
+
/** Width of one product card in dp / points (default PLACEMENT_PRODUCT_CARD_WIDTH). */
|
|
438
|
+
productCardWidth?: number;
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* An app deep link (`myapp://cart`) that may go to the app's own handler: a
|
|
442
|
+
* `scheme://` link whose scheme is not http(s) and not a refused one. The
|
|
443
|
+
* native PlacementView applies the same rule before a link reaches JS; this
|
|
444
|
+
* layer checks again. The same rule on every Joryio SDK.
|
|
445
|
+
*/
|
|
446
|
+
export declare function isAppDeepLink(url: unknown): boolean;
|
|
447
|
+
/**
|
|
448
|
+
* Where a link the SDK is about to open came from. The same wire values on
|
|
449
|
+
* every Joryio SDK. `push` comes from iOS only: on Android the native SDK
|
|
450
|
+
* never opens a push link itself - your launcher activity receives it.
|
|
451
|
+
*/
|
|
452
|
+
export type JoryioLinkSource = 'in_app' | 'placement' | 'card' | 'push';
|
|
453
|
+
/** A link the native SDK is about to open, handed to {@link JoryioSDK.setLinkHandler} first. */
|
|
454
|
+
export interface JoryioLink {
|
|
455
|
+
/** An http(s) link or an app deep link (`myapp://cart`); a push link may be another scheme the system opens. */
|
|
456
|
+
url: string;
|
|
457
|
+
source: JoryioLinkSource;
|
|
458
|
+
campaignId?: string;
|
|
459
|
+
placementKey?: string;
|
|
460
|
+
itemId?: string;
|
|
461
|
+
cardId?: string;
|
|
462
|
+
/** True for an app-scheme link, false for http(s). */
|
|
463
|
+
isAppDeepLink: boolean;
|
|
464
|
+
}
|
|
465
|
+
/**
|
|
466
|
+
* Return true (or a Promise of true) to take the link over, false to let the
|
|
467
|
+
* native SDK open it as it does without a handler. A Promise is how to decide
|
|
468
|
+
* later: the link waits for it.
|
|
469
|
+
*/
|
|
470
|
+
export type JoryioLinkHandler = (link: JoryioLink) => boolean | Promise<boolean>;
|
|
471
|
+
/**
|
|
472
|
+
* `<JoryioPlacement placementKey="home_hero" />` - the native SDK's own
|
|
473
|
+
* PlacementView (iOS and Android): fetching, caching, viewability, the
|
|
474
|
+
* holdout and the reports are the native ones. The component sizes itself to
|
|
475
|
+
* the drawn content (0 when the placement collapses); a `style` height wins.
|
|
476
|
+
*/
|
|
477
|
+
export declare function JoryioPlacement(props: JoryioPlacementProps): any;
|
|
478
|
+
/** The feed goes to the network at most once per this many seconds; extra calls coalesce - the same on every Joryio SDK. */
|
|
479
|
+
export declare const CARD_MIN_REFRESH_SECONDS = 30;
|
|
480
|
+
/** How long the feed is served from the device cache before it is asked for again - the same on every Joryio SDK. */
|
|
481
|
+
export declare const CARD_FEED_TTL_SECONDS = 300;
|
|
482
|
+
/**
|
|
483
|
+
* `server`: read / clicked / dismissed are kept per person on the server, the
|
|
484
|
+
* same on every device. `device`: an anonymous visitor - this device keeps
|
|
485
|
+
* what was read and dismissed (the native SDK does it).
|
|
486
|
+
*/
|
|
487
|
+
export type CardStateScope = 'server' | 'device';
|
|
488
|
+
/** One card of the person's feed. */
|
|
489
|
+
export interface Card {
|
|
490
|
+
/** Stable id of this card for this person. */
|
|
491
|
+
id: string;
|
|
492
|
+
/** Campaign id, or `journey:<canvasId>:<nodeId>` for a journey card. */
|
|
493
|
+
campaignId: string;
|
|
494
|
+
variantId: string | null;
|
|
495
|
+
title: string | null;
|
|
496
|
+
body: string | null;
|
|
497
|
+
imageUrl: string | null;
|
|
498
|
+
/** Button label; null = no button (the whole card opens `url` when set). */
|
|
499
|
+
buttonText: string | null;
|
|
500
|
+
/** An http(s) URL or the app's own deep link; null = nothing to open. */
|
|
501
|
+
url: string | null;
|
|
502
|
+
pinned: boolean;
|
|
503
|
+
/** ISO 8601. */
|
|
504
|
+
createdAt: string;
|
|
505
|
+
/** ISO 8601, or null. */
|
|
506
|
+
expiresAt: string | null;
|
|
507
|
+
read: boolean;
|
|
508
|
+
clicked: boolean;
|
|
509
|
+
}
|
|
510
|
+
/** The person's feed (or one page of it). */
|
|
511
|
+
export interface CardFeed {
|
|
512
|
+
/** Pinned first, then newest first. */
|
|
513
|
+
cards: Card[];
|
|
514
|
+
/** Unread cards across the whole feed, not this page: the badge. */
|
|
515
|
+
unreadCount: number;
|
|
516
|
+
/** Pass to `getCards({ cursor })` for the next page; null on the last one. */
|
|
517
|
+
nextCursor: string | null;
|
|
518
|
+
stateScope: CardStateScope;
|
|
519
|
+
}
|
|
520
|
+
export interface JoryioCardFeedProps {
|
|
521
|
+
/** Give it a size (e.g. `{ flex: 1 }`, the default): the feed scrolls inside it. */
|
|
522
|
+
style?: unknown;
|
|
523
|
+
/** Shown when the feed is empty. Default "No messages yet". */
|
|
524
|
+
emptyText?: string;
|
|
525
|
+
/** The marker on a pinned card. Default "Pinned". */
|
|
526
|
+
pinnedLabel?: string;
|
|
527
|
+
/** The accessible label of the dismiss control. Default "Dismiss". */
|
|
528
|
+
dismissLabel?: string;
|
|
529
|
+
/** The accessible label of the unread dot. Default "Unread". */
|
|
530
|
+
unreadLabel?: string;
|
|
531
|
+
/**
|
|
532
|
+
* A card's url is an app deep link (`myapp://...`): route it in your app
|
|
533
|
+
* (the click is already reported). Without this only an http(s) link is
|
|
534
|
+
* opened; no other scheme is ever handed to the system.
|
|
535
|
+
*/
|
|
536
|
+
onDeepLink?: (url: string, cardId: string) => void;
|
|
537
|
+
/** After each draw: how many cards were drawn, and the unread count. */
|
|
538
|
+
onRender?: (info: {
|
|
539
|
+
cardCount: number;
|
|
540
|
+
unreadCount: number;
|
|
541
|
+
}) => void;
|
|
542
|
+
}
|
|
543
|
+
/**
|
|
544
|
+
* `<JoryioCardFeed />` - the person's content cards as a plain scrolling list:
|
|
545
|
+
* the native SDK's own feed view (iOS CardFeedViewController, Android
|
|
546
|
+
* CardFeedView), so paging, the unread dot, the dismiss control, the
|
|
547
|
+
* viewed / read / clicked / dismissed reports (a card at least
|
|
548
|
+
* PLACEMENT_VIEWABLE_FRACTION on screen for IN_APP_DISPLAY_DWELL_MS is viewed
|
|
549
|
+
* then read) and the link rule are the native ones. The look follows the
|
|
550
|
+
* system theme, dark mode included.
|
|
551
|
+
*/
|
|
552
|
+
export declare function JoryioCardFeed(props: JoryioCardFeedProps): any;
|
|
327
553
|
/**
|
|
328
554
|
* Outcome of `registerPushToken`. Same four fields as the native
|
|
329
555
|
* `PushRegistrationResult` on Android and iOS.
|
|
@@ -421,6 +647,10 @@ declare class JoryioSDK {
|
|
|
421
647
|
* decide whether the start-up hold ends with native drawing.
|
|
422
648
|
*/
|
|
423
649
|
private _inAppHandedToJs;
|
|
650
|
+
private _placementListeners;
|
|
651
|
+
private _cardListeners;
|
|
652
|
+
private _linkHandler;
|
|
653
|
+
private _linkSubscription;
|
|
424
654
|
constructor();
|
|
425
655
|
/**
|
|
426
656
|
* Ask native, first thing, for the decisions an earlier launch stored. The
|
|
@@ -624,8 +854,10 @@ declare class JoryioSDK {
|
|
|
624
854
|
*
|
|
625
855
|
* Pass the URL that opened the app - `Linking.getInitialURL()` at start
|
|
626
856
|
* and each `Linking.addEventListener('url', ...)` event. When it carries the
|
|
627
|
-
* `jr_t` token the click redirect added, this
|
|
628
|
-
* contact the message was sent to.
|
|
857
|
+
* `jr_t` token the click redirect added, this app's events are attributed
|
|
858
|
+
* to the contact the message was sent to. Attribution only: the person is
|
|
859
|
+
* not identified and this profile is never merged into the contact (only
|
|
860
|
+
* `identify()` does that). Fire-and-forget; a URL without `jr_t`
|
|
629
861
|
* does nothing.
|
|
630
862
|
*
|
|
631
863
|
* Nothing happens when the person is already identified, has opted out or
|
|
@@ -1086,6 +1318,98 @@ declare class JoryioSDK {
|
|
|
1086
1318
|
* "undefined is not a function".
|
|
1087
1319
|
*/
|
|
1088
1320
|
syncInAppCampaigns(): void;
|
|
1321
|
+
/** A flag's value of any type, or `defaultValue`. The first read in a session logs an exposure. */
|
|
1322
|
+
getFlag<T = unknown>(key: string, defaultValue: T): Promise<T>;
|
|
1323
|
+
/** A boolean flag, or `defaultValue` (also for a flag of another type). */
|
|
1324
|
+
getBoolFlag(key: string, defaultValue: boolean): Promise<boolean>;
|
|
1325
|
+
/** A string flag, or `defaultValue`. */
|
|
1326
|
+
getStringFlag(key: string, defaultValue: string): Promise<string>;
|
|
1327
|
+
/** A number flag, or `defaultValue`. */
|
|
1328
|
+
getNumberFlag(key: string, defaultValue: number): Promise<number>;
|
|
1329
|
+
/** A JSON flag (object, array or scalar), or `defaultValue`. */
|
|
1330
|
+
getJsonFlag<T = unknown>(key: string, defaultValue: T): Promise<T>;
|
|
1331
|
+
/** Every flag held for this person, key -> value. Logs no exposure. */
|
|
1332
|
+
getAllFlags(): Promise<Record<string, unknown>>;
|
|
1333
|
+
/** Ask the server now; resolves when the answer is in (or the request failed: the held flags stay). */
|
|
1334
|
+
refreshFlags(): Promise<void>;
|
|
1335
|
+
/**
|
|
1336
|
+
* `callback(keys)` is called with the keys whose value changed. Returns an
|
|
1337
|
+
* unsubscribe function. Safe before initialize(): updates start once the
|
|
1338
|
+
* SDK runs.
|
|
1339
|
+
*/
|
|
1340
|
+
onFlagsUpdated(callback: (keys: string[]) => unknown): () => void;
|
|
1341
|
+
/**
|
|
1342
|
+
* The placements for `placementKeys`, to draw with your own components
|
|
1343
|
+
* (or use `<JoryioPlacement placementKey=... />`). Report with
|
|
1344
|
+
* `item.markDisplayed()` once at least half of it was on screen for
|
|
1345
|
+
* IN_APP_DISPLAY_DWELL_MS, `item.markClicked()`, `item.markDismissed()`,
|
|
1346
|
+
* and `placement.markDisplayed()` for a held-out person's empty spot.
|
|
1347
|
+
* Waits for initialize(); resolves `{}` without the native module.
|
|
1348
|
+
*/
|
|
1349
|
+
getPlacements(placementKeys: string[]): Promise<Record<string, Placement>>;
|
|
1350
|
+
/** Ask the server again (all placements on screen when no keys). At most once per key per PLACEMENT_MIN_REFRESH_SECONDS. */
|
|
1351
|
+
refreshPlacements(placementKeys?: string[]): void;
|
|
1352
|
+
/**
|
|
1353
|
+
* Called with the placements whose content changed. Returns an unsubscribe.
|
|
1354
|
+
* An app with its own push messaging handler should call
|
|
1355
|
+
* refreshPlacements() on a `jry_sync: "placements"` data message; the
|
|
1356
|
+
* native SDKs handle it themselves otherwise.
|
|
1357
|
+
*/
|
|
1358
|
+
onPlacementsUpdated(callback: (placements: Record<string, Placement>) => unknown): () => void;
|
|
1359
|
+
/**
|
|
1360
|
+
* The person's content cards - pinned first, newest first - with the unread
|
|
1361
|
+
* count for a badge, from the native SDK's cache for CARD_FEED_TTL_SECONDS.
|
|
1362
|
+
* Pass a feed's `nextCursor` as `{ cursor }` for the next page (the native
|
|
1363
|
+
* SDK adds it to the cached feed). Draw it with `<JoryioCardFeed />`, or
|
|
1364
|
+
* yourself and report with markCardViewed / markCardRead /
|
|
1365
|
+
* markCardClicked / dismissCard. Waits for initialize(); resolves the empty
|
|
1366
|
+
* feed without the native module.
|
|
1367
|
+
*/
|
|
1368
|
+
getCards(options?: {
|
|
1369
|
+
cursor?: string | null;
|
|
1370
|
+
}): Promise<CardFeed>;
|
|
1371
|
+
/**
|
|
1372
|
+
* Unread cards, from the native SDK's cache (never a network call): the
|
|
1373
|
+
* badge. A Promise here because every React Native read crosses the bridge;
|
|
1374
|
+
* the native SDKs answer synchronously.
|
|
1375
|
+
*/
|
|
1376
|
+
getUnreadCardCount(): Promise<number>;
|
|
1377
|
+
/** The card was on screen (`viewed`). Once per card; `<JoryioCardFeed />` does it itself. */
|
|
1378
|
+
markCardViewed(card: Card | string): void;
|
|
1379
|
+
/** The person read the card (`read`): it stops counting as unread at once. */
|
|
1380
|
+
markCardRead(card: Card | string): void;
|
|
1381
|
+
/** The person tapped the card or its button (`clicked`, which also marks it read). Open its url yourself. */
|
|
1382
|
+
markCardClicked(card: Card | string): void;
|
|
1383
|
+
/** The person removed the card (`dismissed`): it leaves the feed at once and never comes back. */
|
|
1384
|
+
dismissCard(card: Card | string): void;
|
|
1385
|
+
/**
|
|
1386
|
+
* Ask the server for the feed again. At most once per
|
|
1387
|
+
* CARD_MIN_REFRESH_SECONDS; extra calls coalesce. An app with its own push
|
|
1388
|
+
* messaging handler calls this on a `jry_sync: "cards"` data message; the
|
|
1389
|
+
* native SDKs handle it themselves otherwise.
|
|
1390
|
+
*/
|
|
1391
|
+
refreshCards(): void;
|
|
1392
|
+
/** Called with the whole feed whenever it changes (a refresh, a report, an identity change). Returns an unsubscribe. */
|
|
1393
|
+
onCardsUpdated(callback: (feed: CardFeed) => unknown): () => void;
|
|
1394
|
+
/**
|
|
1395
|
+
* Receive EVERY link the native SDK is about to open - an in-app message
|
|
1396
|
+
* button or link, a `<JoryioPlacement />` button, a `<JoryioCardFeed />`
|
|
1397
|
+
* tap, an iOS push tap - before it opens: http(s) links and app deep links
|
|
1398
|
+
* (`myapp://cart`) alike, with where it came from (`link.source`) and the
|
|
1399
|
+
* ids that go with it. Return true to take the link over (navigate in your
|
|
1400
|
+
* app), false to let the native SDK open it as it does without a handler -
|
|
1401
|
+
* http(s) to the system (or your universal-link handling with
|
|
1402
|
+
* `forwardUniversalLinks` on iOS), an app deep link to the component's
|
|
1403
|
+
* `onDeepLink`. A Promise decides later. A refused scheme (javascript:,
|
|
1404
|
+
* data:, intent:, ...) never reaches it. One handler: a second call
|
|
1405
|
+
* replaces the first. Works before initialize(). Same name on iOS,
|
|
1406
|
+
* Android, web and Unity (`SetLinkHandler`).
|
|
1407
|
+
*/
|
|
1408
|
+
setLinkHandler(handler: JoryioLinkHandler): void;
|
|
1409
|
+
/** Remove the handler set with setLinkHandler: links open as they do without one. */
|
|
1410
|
+
clearLinkHandler(): void;
|
|
1411
|
+
/** A link from native: ask the handler, then tell native whether it was taken. */
|
|
1412
|
+
private _onLink;
|
|
1089
1413
|
/**
|
|
1090
1414
|
* Forget which in-app campaigns have already been shown on this device.
|
|
1091
1415
|
*
|