-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
index.ts
36 lines (30 loc) · 1008 Bytes
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import ReactNativeAppClipModule from "./ReactNativeAppClipModule";
export function isClip(): boolean {
const bundleIdentifier = ReactNativeAppClipModule.getBundleIdentifier() as
| string
| undefined;
const isClip =
bundleIdentifier?.slice(bundleIdentifier.lastIndexOf(".") + 1) === "Clip";
return isClip;
}
export function getContainerURL(groupIdentifier: string): string {
return ReactNativeAppClipModule.getContainerURL(groupIdentifier);
}
export function getBundleIdentifier(): string {
return ReactNativeAppClipModule.getBundleIdentifier();
}
export function displayOverlay(): void {
return ReactNativeAppClipModule.displayOverlay();
}
export function setSharedCredential(
groupIdentifier: string,
credential: string
): void {
return ReactNativeAppClipModule.setSharedCredential(
groupIdentifier,
credential
);
}
export function getSharedCredential(groupIdentifier: string): string {
return ReactNativeAppClipModule.getSharedCredential(groupIdentifier);
}