@applicaster/zapp-react-native-app 16.0.0-rc.2 → 16.0.0-rc.3

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.
@@ -2,54 +2,14 @@ import * as React from "react";
2
2
  import { BackHandler } from "react-native";
3
3
  import * as R from "ramda";
4
4
 
5
- import {
6
- QUICK_BRICK_EVENTS,
7
- sendQuickBrickEvent,
8
- } from "@applicaster/zapp-react-native-bridge/QuickBrick";
9
5
  import { useNavigation } from "@applicaster/zapp-react-native-utils/reactHooks/navigation";
10
6
  import { useAnalytics } from "@applicaster/zapp-react-native-utils/analyticsUtils";
11
7
  import { useRivers } from "@applicaster/zapp-react-native-utils/reactHooks/state";
12
8
  import { useErrorStore } from "@applicaster/quick-brick-core/App/ErrorBoundary/store";
13
- import { isApplePlatform } from "@applicaster/zapp-react-native-utils/reactUtils";
9
+ import { platformToBackground } from "@applicaster/zapp-react-native-utils/appUtils/platform";
14
10
 
15
11
  const getHome = R.compose(R.find(R.propEq("home", true)), R.values);
16
12
 
17
- const isIOS = isApplePlatform();
18
- /* Set to `false` in production, do not commit this change */
19
- const IS_DEBUGGER_ENABLED = false;
20
-
21
- /**
22
- * This is a workaround to fix an error on start when debugger is connected.
23
- * Update function body for this function `callNativeSyncHook`
24
- * node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:167
25
-
26
- this.processCallbacks(moduleID, methodID, params, onFail, onSucc);
27
- if(global.nativeCallSyncHook) {
28
- return global.nativeCallSyncHook(moduleID, methodID, params);
29
- }
30
- */
31
-
32
- // Assign this to a dev-only button or useEffect call
33
- const connectToRemoteDebugger = () => {
34
- if (__DEV__ && isIOS) {
35
- try {
36
- const { DevSettings, NativeModules } = require("react-native");
37
-
38
- // eslint-disable-next-line no-console
39
- console.warn(`Debugger connected: ${IS_DEBUGGER_ENABLED}`);
40
-
41
- if (DevSettings?.setIsDebuggingRemotely) {
42
- DevSettings.setIsDebuggingRemotely(IS_DEBUGGER_ENABLED);
43
- }
44
-
45
- NativeModules?.DevSettings?.setIsDebuggingRemotely?.(IS_DEBUGGER_ENABLED);
46
- } catch (error) {
47
- // eslint-disable-next-line no-console
48
- console.error(`connectToRemoteDebugger message: ${error.message}`);
49
- }
50
- }
51
- };
52
-
53
13
  const InteractionManagerComponent = () => {
54
14
  const { sendHardwareBackButtonClickEvent } = useAnalytics();
55
15
  const rivers = useRivers();
@@ -63,9 +23,7 @@ const InteractionManagerComponent = () => {
63
23
  };
64
24
 
65
25
  const exitToBackground = () => {
66
- sendQuickBrickEvent(QUICK_BRICK_EVENTS.MOVE_APP_TO_BACKGROUND, {
67
- MOVE_APP_TO_BACKGROUND: true,
68
- });
26
+ platformToBackground();
69
27
  };
70
28
 
71
29
  const goToHome = () => {
@@ -102,10 +60,6 @@ const InteractionManagerComponent = () => {
102
60
  return true; // Take care! see jsdoc above
103
61
  }, [navigator.currentRoute]);
104
62
 
105
- React.useEffect(() => {
106
- connectToRemoteDebugger();
107
- }, []);
108
-
109
63
  React.useEffect(() => {
110
64
  const unsubscribe = BackHandler.addEventListener(
111
65
  "hardwareBackPress",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/zapp-react-native-app",
3
- "version": "16.0.0-rc.2",
3
+ "version": "16.0.0-rc.3",
4
4
  "description": "Zapp App Component for Applicaster's Quick Brick React Native App",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -27,11 +27,11 @@
27
27
  },
28
28
  "homepage": "https://github.com/applicaster/quickbrick#readme",
29
29
  "dependencies": {
30
- "@applicaster/quick-brick-core": "16.0.0-rc.2",
31
- "@applicaster/zapp-react-native-bridge": "16.0.0-rc.2",
32
- "@applicaster/zapp-react-native-redux": "16.0.0-rc.2",
33
- "@applicaster/zapp-react-native-ui-components": "16.0.0-rc.2",
34
- "@applicaster/zapp-react-native-utils": "16.0.0-rc.2",
30
+ "@applicaster/quick-brick-core": "16.0.0-rc.3",
31
+ "@applicaster/zapp-react-native-bridge": "16.0.0-rc.3",
32
+ "@applicaster/zapp-react-native-redux": "16.0.0-rc.3",
33
+ "@applicaster/zapp-react-native-ui-components": "16.0.0-rc.3",
34
+ "@applicaster/zapp-react-native-utils": "16.0.0-rc.3",
35
35
  "axios": "^0.28.0",
36
36
  "camelize": "^1.0.0",
37
37
  "query-string": "7.1.3",