react-native-ios

React Native reload page

我的未来我决定 提交于 2019-12-19 08:56:57
问题 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

How to check net Info in React Native iOS?

天涯浪子 提交于 2019-12-18 16:38:13
问题 I need to check Internet connection in react native iOS I would try following code: NetInfo.isConnected.fetch().then(isConnected => { console.log(isConnected); }); that can work fine in react native android application, But it always return 'false' in react native iOS . 回答1: There is currently an open issue about this in react native's github. You can see the discussion there, but in short - the fetch is always returning false , but you can work around it by listening to the connection

How to generate .ipa file for react-native?

拜拜、爱过 提交于 2019-12-17 20:32:54
问题 I am currently using React-Native version 0.40.0. Can somebody give me a link on the process and steps on how to generate an .ipa file for ios?? I'm currently new to react-native. Btw I'm using version 8 of Xcode 回答1: Try Following react-native bundle --dev false --entry-file index.ios.js --bundle-output ios/main.jsbundle --platform ios 回答2: Get .app file : Run this command -> react-native run-ios --configuration=release Convert .app to .ipa : Create folder Payload. paste .app file into

componentWillMount is deprecated and will be removed in the next major version 0.54.0 in React Native

ぐ巨炮叔叔 提交于 2019-12-17 07:23:51
问题 I use the react native latest version of 0.54.0 and Whenever run the apps on iOS there is found warning about deprecate the lifecycle methods. and also please update the components. Warning : componentWillMount is deprecated and will be removed in the next major version. Use componentDidMount instead. As a temporary workaround, you can rename to UNSAFE_componentWillMount. Please update the following components: Container, Text, TouchableOpacity, Transitioner, View I Have also change according

Lexical or processor issue: boost/config/user.hpp' file not found

白昼怎懂夜的黑 提交于 2019-12-13 15:15:05
问题 When i run my react native app in Xcode, it shows an error "boost/config/user.hpp' file not found" . And also when i run the application using the command "react-native run-ios" ,I got an error in terminal , "Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/sample2.app/Info.plist" Print: Entry, ":CFBundleIdentifier", Does Not Exist " . How can i solve this. I am a bigginer in react native app development. 回答1: It's related to this

libobjc.A.dylib objc_msgSend - React Native iOS - How do I read this crash report?

五迷三道 提交于 2019-12-13 10:07:45
问题 My React Native iOS app is randomly crashing with this, and I do not know how to interpret it. Any ideas as to what it means? EDIT: If this is a bad question, please let me know where I can help on this, as I do not know where to begin looking. It's a random crash that has been bugging me for a while now. 回答1: Use chrome-debugger. That should help you tracking the cause of the crash. Also you need to draw the pattern out of the randomness. The image you have sent was not helpful enough to me

'babelHelpers.asyncToGenerator is not a function' error

不羁的心 提交于 2019-12-13 09:00:11
问题 Expected Behavior App to load as it does on android. Actual Behavior Error: babelHelpers.asyncToGenerator is not a function Environment: OS: macOS Sierra 10.12.1 Node: 7.9.0 Yarn: 0.20.3 npm: 4.2.0 Watchman: 4.9.0 Xcode: Xcode 8.3.3 Build version 8E3004b Android Studio: 2.3 AI-162.4069837 回答1: Check your .babelrc file. Is it including the babel transform-async-to-generator plugin? If so, remove it. The babel helpers that React Native includes do not include the helper for that transform. I'm

React-navigation contentComponent is not working

心不动则不痛 提交于 2019-12-13 08:38:04
问题 I am trying to customize drawer navigator in my app. I am using react-navigation. When first time I've inserted this code it showed just white screen and even navigation links were disappeared after making few things it showed this error screen. Before that it showed just white screen inside drawer without my links. Here is the code. App.js import React from 'react'; import {StyleSheet, Text, View } from 'react-native'; import WelcomeScreen from './screens/WelcomeScreen'; import SigninScreen

How to pass data From one Scene to another in ReactNaive

旧巷老猫 提交于 2019-12-13 06:45:59
问题 My Question i have two Scene OnceScene and TwoScene I want to Navigate from OnceScene to TwoScene and at the same time i want to pass some array from 1st the 2nd so for that i have written the below code this.props.navigator.push({ id: "productdetails", passProps: {arr: arr[rowID]} }); you can see i am passing the array in passProps but how can i acess that array in TwoScene Its seems simple but since i am new i dont have much idea. 回答1: Have you tried using react-native router? https:/

Does load large amount of images in flatList hurt performance and how to avoid it

杀马特。学长 韩版系。学妹 提交于 2019-12-13 04:45:38
问题 ( just to note I don't want to use pagination I want to load very large list ) I am using flatlist to render about 5000 items. Each item reference photo like this ( not same photo just example ): 256 × 256 PNG 30,759 bytes (30 kilobytes) Or larger. When I go over 1000 items I start to experience performance issues. First is this realistic concern does image that is referenced from url go in to phone memory? Is there better way to reduce memory pressure when load this amount of images? I