expo

react-native run-ios Could not find iPhone X simulator | XRPackageModel 9.0.omo

为君一笑 提交于 2019-12-02 12:41:21
I first started my project with Expo and ejected it. Now, I'm trying to run the command react-native run-ios and it comes back with this error: CoreData: annotation: Failed to load optimized model at path '/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/Frameworks/InstrumentsPackaging.framework/Versions/A/Resources/XRPackageModel.momd/XRPackageModel 9.0.omo' Then it gives another error: error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening

createStackNavigation invariant violation element type is invalid expected a string

柔情痞子 提交于 2019-12-02 09:34:09
Upon creating importing and using createStackNavigation I'm getting the following error. Any help would be greatly appreciated! Also, this is my first app in react-native so please be patient with me. I've tried other versions of StackNavigation read other posts relating to the error but none of them seem to get me anywhere. import React, { Component } from "react"; import { Center } from "@builderx/utils"; import { View, StyleSheet, Image, Text } from "react-native"; import { createAppContainer } from 'react-navigation'; import { MainNavigation } from '../screens/MainNavigator'; const

Reading a file from Expo's cache as base64, writing to firebase storage (Cloud Storage for Firebase)

北战南征 提交于 2019-12-02 07:47:20
After using expo's ImagePicker and saving the image in the local cache, I am trying to save the image to firebase storage (or its new name, Cloud Storage for Firebase). The relevant code is: base64String = FileSystem.readAsStringAsync(photoUri, { encoding: FileSystem.EncodingTypes.Base64 }); and then ref.putString(base64String,'base64', { contentType: 'image/jpeg' }) However, something is wrong with the image that I save to firestore, and I cannot view it (either directly from the firestore console or my code). Am I doing anything wrong? 来源: https://stackoverflow.com/questions/53294492/reading

Undefined is not a function near _reactNavigation.StackNavigator

[亡魂溺海] 提交于 2019-12-02 02:33:48
I want to setup a React Native app with a side menu and a tab menu at the same time. I was following this tutorial. My code . I get the error: undefined is not a function (near '...(0 , _reactNavigation.TabNavigator)...') Which you can see here: Preview of some of the files: App.js import React from 'react'; import { Drawer } from './src/navigators'; export default class App extends React.Component { render() { return ( <Drawer /> ); } } navigators.js import React, { Component } from 'react'; import { StyleSheet, Text, View } from 'react-native'; // Navigators import { DrawerNavigator,

Disable Debugging in Expo For React Native App

大城市里の小女人 提交于 2019-12-02 00:38:50
问题 So I've opened up my react-native app in Expo today (using the iOS simulator) and I am creating by what looks like a debugging overlay. Screenshot here: I don't need this and it's blocking some of the UI for testing. How does one turn it off? 回答1: You have the Element Inspector open. To toggle it off do either: ⌘+D if you are in the simulator Shake your phone if you are on an actual device This should open up the debugging menu. You can then click on Toggle Element Inspector to close it. 来源:

Expo CLI is installed globally but “npm start” command still asks

旧城冷巷雨未停 提交于 2019-12-01 23:43:37
问题 I have installed expo-cli globally. But when I try to run command npm start it still asks to install expo-cli globally. Why? I have reinstalled expo-cli again but same issue, even after machine restart. Here is the screenshot for further details: 回答1: The same happened to me, I just started using expo start instead of npm start and is working now. 回答2: Actually as I reinstalled expo-cli which was an updated version and was not matching with the project files, as the project was initialized

Undefined is not a function near _reactNavigation.StackNavigator

北城以北 提交于 2019-12-01 22:54:14
问题 I want to setup a React Native app with a side menu and a tab menu at the same time. I was following this tutorial. My code. I get the error: undefined is not a function (near '...(0 , _reactNavigation.TabNavigator)...') Which you can see here: Preview of some of the files: App.js import React from 'react'; import { Drawer } from './src/navigators'; export default class App extends React.Component { render() { return ( <Drawer /> ); } } navigators.js import React, { Component } from 'react';

Disable Debugging in Expo For React Native App

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-01 22:18:59
So I've opened up my react-native app in Expo today (using the iOS simulator) and I am creating by what looks like a debugging overlay. Screenshot here: I don't need this and it's blocking some of the UI for testing. How does one turn it off? You have the Element Inspector open. To toggle it off do either: ⌘+D if you are in the simulator Shake your phone if you are on an actual device This should open up the debugging menu. You can then click on Toggle Element Inspector to close it. 来源: https://stackoverflow.com/questions/45615032/disable-debugging-in-expo-for-react-native-app

React Native reload page

落爺英雄遲暮 提交于 2019-12-01 08:37:25
So I have an app with an activity. The app checks for Internet connection at the beginning. If there are no Internet connection, it will show a screen with a button to refresh the page. The problem is that my API calls (Axios) is located on componentDidMount() where it's called only once after the first render. Is there any way I can reload the page so it calls componentDidMount again? I mean like total refresh. I am using EXPO btw. Any help is appreciated. Sorry there are no examples, I just wanted to get the idea if possible You can force update the component. Check this: https://reactjs.org

React Native Overflow Touchable is Not Working in Android

巧了我就是萌 提交于 2019-12-01 06:41:59
问题 Please have a look at my Expo Snack. Dropdown items are touchable in iOS but not in Android. Fixed container's height (grey box) causes this issue but I need to keep the fixed height for my toolbar. I have tried using react-native-view-overflow package but no luck. It requires react-native link , meanwhile I can't eject my project because I'm using some Expo packages which will be broken if I eject. Any suggestion to make the dropdown items touchable in Android? 回答1: I changed your code,