@applicaster/quick-brick-core 13.0.0-alpha.5428512514 → 13.0.0-alpha.5855333506

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.
@@ -10,7 +10,11 @@ import * as ReactNative from "react-native";
10
10
 
11
11
  import { isWeb } from "@applicaster/zapp-react-native-utils/reactUtils";
12
12
  import { log_debug, log_error, log_info } from "../logger";
13
-
13
+ import { getAppUrlScheme } from "@applicaster/zapp-react-native-utils/appDataUtils";
14
+ import {
15
+ getZappPlatform,
16
+ ZappPlatform,
17
+ } from "@applicaster/zapp-react-native-utils/appUtils/platform";
14
18
  type Props = {
15
19
  listenerSpy?: (...any) => void;
16
20
  children: ReactChild;
@@ -34,6 +38,15 @@ const initialState = { url: null, done: () => {} };
34
38
 
35
39
  export const URLSchemeContext = createContext<State>(initialState);
36
40
 
41
+ const getWebDeepLink = (initialURL: string) => {
42
+ if (!initialURL) return null;
43
+
44
+ const index = initialURL.indexOf("?");
45
+ if (index === -1) return;
46
+
47
+ return getAppUrlScheme() + "://open" + initialURL.slice(index);
48
+ };
49
+
37
50
  function URLSchemeContextProvider(props: Props) {
38
51
  const [state, setState] = useState<string | null>(initialState.url);
39
52
 
@@ -51,10 +64,24 @@ function URLSchemeContextProvider(props: Props) {
51
64
  props?.listenerSpy?.("getInitialURL");
52
65
 
53
66
  try {
54
- if (isWeb()) return;
55
-
56
67
  const url = await Linking.getInitialURL();
57
68
 
69
+ if (isWeb()) {
70
+ if (getZappPlatform() === ZappPlatform.Vizio) {
71
+ const deepLink = getWebDeepLink(url);
72
+
73
+ if (deepLink) {
74
+ log_info(
75
+ `URLSchemeContextProvider: Retrieved initial deep link: ${deepLink}`
76
+ );
77
+
78
+ return setState(deepLink);
79
+ }
80
+ }
81
+
82
+ return;
83
+ }
84
+
58
85
  log_info(
59
86
  `URLSchemeContextProvider: Retrieved initial url: ${url || "not exist"}`
60
87
  );
@@ -497,8 +497,7 @@ export function NavigationProvider({ children }: Props) {
497
497
  ({ hookPlugin, payload, callback }, dispose) => {
498
498
  if (hookPlugin?.lastHook) {
499
499
  dispose({ disposeAll: true });
500
-
501
- startUpHooks.current && setStartUpHooks(false);
500
+ currentStartUpHooks.current && setStartUpHooks(false);
502
501
  }
503
502
 
504
503
  dispatch(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/quick-brick-core",
3
- "version": "13.0.0-alpha.5428512514",
3
+ "version": "13.0.0-alpha.5855333506",
4
4
  "description": "Core package for Applicaster's Quick Brick App",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -29,13 +29,13 @@
29
29
  },
30
30
  "homepage": "https://github.com/applicaster/quickbrick#readme",
31
31
  "dependencies": {
32
- "@applicaster/applicaster-types": "13.0.0-alpha.5428512514",
33
- "@applicaster/quick-brick-core-plugins": "13.0.0-alpha.5428512514",
34
- "@applicaster/zapp-pipes-v2-client": "13.0.0-alpha.5428512514",
35
- "@applicaster/zapp-react-native-bridge": "13.0.0-alpha.5428512514",
36
- "@applicaster/zapp-react-native-redux": "13.0.0-alpha.5428512514",
37
- "@applicaster/zapp-react-native-ui-components": "13.0.0-alpha.5428512514",
38
- "@applicaster/zapp-react-native-utils": "13.0.0-alpha.5428512514",
32
+ "@applicaster/applicaster-types": "13.0.0-alpha.5855333506",
33
+ "@applicaster/quick-brick-core-plugins": "13.0.0-alpha.5855333506",
34
+ "@applicaster/zapp-pipes-v2-client": "13.0.0-alpha.5855333506",
35
+ "@applicaster/zapp-react-native-bridge": "13.0.0-alpha.5855333506",
36
+ "@applicaster/zapp-react-native-redux": "13.0.0-alpha.5855333506",
37
+ "@applicaster/zapp-react-native-ui-components": "13.0.0-alpha.5855333506",
38
+ "@applicaster/zapp-react-native-utils": "13.0.0-alpha.5855333506",
39
39
  "atob": "^2.1.2",
40
40
  "axios": "^0.28.0",
41
41
  "btoa": "^1.2.1",