对本地ios做出反应:在目标

时间:2019-10-30 04:02:25

标签: react-native react-native-ios react-native-navigation

说明

我正在处理本机应用程序,当我运行本机ios应用程序时抛出异常。对于导航,我使用了react-native-navigation软件包,软件包链接:: https://www.npmjs.com/package/react-native-navigation

错误::

  

导航中不允许使用异常'UINavigationControllers   在目标上调用setRoot时引发了控制器'   带有参数的RNNBridgeModule ...

查看此屏幕截图::

enter image description here

在我调用此函数时发生此错误:

export const setRootWithSideBar = (componentId, screen) => {
    isInitial = false;
    screenId = screen;
    currentStackId = componentId;
    Navigation.setRoot({
        root: {
            sideMenu: {
                id: MAIN_MENU,
                left: {
                    component: {
                        id: MAIN_MENU,
                        name: MAIN_MENU
                    }
                },
                center: {
                    stack: {
                        id: 'Main',
                        children: [
                            {
                                stack: {
                                    id: componentId,
                                    children: [
                                        {
                                            component: {
                                                id: screen,
                                                name: screen,
                                                options: sidebarOptions(screen)
                                            }
                                        }
                                    ]
                                }
                            }
                        ]
                    }
                }
            }
        }
    });
}

我的环境信息::

  • 系统:操作系统:macOS Mojave 10.14.5
  • 节点:12.10.0-〜/ .nvm / versions / node / v12.10.0 / bin / node
  • npm:6.10.3-〜/ .nvm / versions / node / v12.10.0 / bin / npm
  • Watchman:4.9.0-/ usr / local / bin / watchman
  • 平台:iOS 12.0,macOS 10.14
  • 反应:16.11.0
  • 本机:0.61.2

0 个答案:

没有答案