Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
472 votes
17 answers
141k views

Error Running React Native App From Terminal (iOS)

I am following the tutorial on the official React Native website. Using the following to build my project: react-native run-ios I get the error: Found Xcode project TestProject.xcodeproj xcrun: ...
JacobSiegel's user avatar
  • 5,361
365 votes
6 answers
202k views

What are my options for storing data when using React Native? (iOS and Android) [closed]

I am still new in the React Native world, and generally in the mobile/native world as well, and I am finding the documentation a bit lacking when it comes to data persistence. What are my options for ...
Sia's user avatar
  • 9,144
347 votes
51 answers
333k views

How do you debug React Native?

How does one debug their React code with React Native while the app is running in app simulator?
McG's user avatar
  • 4,959
329 votes
25 answers
378k views

React Native: How to select the next TextInput after pressing the "next" keyboard button?

I defined two TextInput fields as follows: <TextInput style = {styles.titleInput} returnKeyType = {"next"} autoFocus = {true} placeholder = "Title" /> <TextInput style = {...
andreaswienes's user avatar
313 votes
76 answers
256k views

What is the meaning of 'No bundle URL present' in react-native?

When I run a react-native project, I get a error no bundle URL present, but I don't know what mistakes I do, I was very confused.
Yingch Xue's user avatar
  • 3,223
304 votes
20 answers
291k views

React Native Change Default iOS Simulator Device

When I run this command: react-native run-ios My app runs by default in the iPhone6 simulator device: Found Xcode project RN.xcodeproj Launching iPhone 6 (9.2)... How can I have the app run in a ...
Wonka's user avatar
  • 8,594
251 votes
10 answers
351k views

Get size of a View in React Native

Is it possible to get the size (width and height) of a certain view? For example, I have a view showing the progress: <View ref='progressBar' style={{backgroundColor:'red',flex:this.state.progress}...
Matthew's user avatar
  • 5,065
215 votes
12 answers
249k views

NSPhotoLibraryUsageDescription key must be present in Info.plist to use camera roll

Recently I started to get this error: NSPhotoLibraryUsageDescription key must be present in Info.plist to use camera roll. I am using React Native to build my app (I am not familiar with ios ...
Murat Ozgul's user avatar
  • 11.6k
214 votes
22 answers
436k views

react-native: command not found

I am getting -bash: react-native: command not found error while creating a react-native project. Below are the additional info 1. brew --version homebrew 0.9.9 2 brew info watchman watchman `...
Ashok R's user avatar
  • 20.5k
212 votes
21 answers
234k views

How do you hide the warnings in React Native iOS simulator?

I just upgraded my React Native and now the iOS simulator has a bunch of warnings. Besides fixing them, how do I hide these warnings so that I can see what's underneath?
Some Guy's user avatar
  • 13.3k
203 votes
13 answers
268k views

Run react-native application on iOS device directly from command line?

Is it possible to run react-native application on an iOS device directly from the command line like we do on simulator with react-native run ios --simulator "iPhone 5s"?
Aakash Sigdel's user avatar
170 votes
12 answers
154k views

how to disable rotation in React Native?

I would like to support only portrait view. How can I make a React Native app not to autorotate? I tried searching documentation and Github issues, but I didn't find anything helpful.
zachguo's user avatar
  • 6,536
169 votes
4 answers
27k views

Custom navigation with Navigator component in React-Native

I’m exploring possibilities of React Native while developing a demo app with custom navigation between views with the help of Navigator component. The main app class renders navigator and inside ...
Kosmetika's user avatar
  • 21.1k
166 votes
12 answers
293k views

Get current scroll position of ScrollView in React Native

Is it possible to get the current scroll position, or the current page of a <ScrollView> component in React Native? So something like: <ScrollView horizontal={true} pagingEnabled={true} ...
Sang's user avatar
  • 1,685
162 votes
17 answers
293k views

React Native Responsive Font Size

I would like to ask how react native handle or do the responsive font. For example in iphone 4s i Have fontSize: 14, while in iphone 6 I have fontSize: 18.
Sydney Loteria's user avatar
151 votes
4 answers
228k views

Open Url in default web browser

I am new in react-native and i want to open url in default browser like Chrome in Android and iPhone both. We open url via intent in Android same like functionality i want to achieve. I have search ...
Mohit Suthar's user avatar
  • 9,205
149 votes
25 answers
196k views

`React/RCTBridgeModule.h` file not found

Getting this error while building a react-native iOS app on xcode. Started getting this error after npm install and rpm linking react-native-fs library. But after searching online for a solution, I ...
Simar's user avatar
  • 2,505
139 votes
45 answers
154k views

Print: Entry, ":CFBundleIdentifier", Does Not Exist

When I run react-native run-ios the build succeeds but I get the error below. I've checked all over the place but nothing seems to be working. Using sudo in front of the command does not help either. ...
astiefel's user avatar
  • 2,038
130 votes
16 answers
144k views

How to align text input correctly in react native?

The Text input is center aligned, how to fix this text input so that it takes input from top left corner Here is my css for text input: /* The Text input is center aligned, how to fix this text ...
Vikramaditya's user avatar
  • 5,564
130 votes
1 answer
48k views

How can I determine if my React Native app is a debug or release build from JavaScript code?

I'd like to add some debug-only UI to my React Native app, but I can't find any equivalent of RCT_DEBUG or RCT_DEV compile-time flags in the JavaScript environment. Is there one? Use case: I want to ...
escouten's user avatar
  • 2,973
128 votes
26 answers
84k views

"RCTBundleURLProvider.h" file not found - AppDelegate.m

I am trying to run my React Native app in XCode and I keep getting this error. I cannot figure out how to resolve the issue. Any suggestions? Screen Shot of Error in XCode:
FilosoferKing's user avatar
122 votes
36 answers
266k views

How to get current route name in react-navigation?

I want the name of the current route or screen in react-navigation which I want to use inside if condition to make some changes.
Eshant Bist's user avatar
  • 1,585
118 votes
22 answers
107k views

React Native ios build : Can't find node

I have a prototype ready to go and the project is jammed with build: error: Can't find 'node' binary to build React Native bundle If you have non-standard nodejs installation, select your project ...
Seeliang's user avatar
  • 2,771
116 votes
13 answers
81k views

iOS Launch screen in React Native

I'm working with a React Native app and I'm trying to set a customize launch screen but I'm not able to. React Native creates a LaunchScreen.xib by default, so I've created a LaunchImage inside Images....
JV Lobo's user avatar
  • 6,176
111 votes
9 answers
205k views

React Native: Getting the position of an element

I am styling an Image component with flexbox to be in the center of the screen which works pretty well. Now I want a second Image component to be displayed directly on the top of the first one. The ...
Johannes Stein's user avatar
111 votes
11 answers
97k views

How to prevent layout from overlapping with iOS status bar

I am working on tutorial for React Native navigation. I found out that all layout starts loading from top of screen instead of below of the status bar. This causes most layouts to overlap with the ...
Cliff's user avatar
  • 1,538
109 votes
20 answers
216k views

How can I regenerate ios folder in React Native project?

So a while ago I deleted the /ios directory in my react native app (let's call it X). I've been developing and testing using the android emulator but now I'd like to make sure it works on ios with ...
Tam Borine's user avatar
  • 1,534
108 votes
14 answers
202k views

How to set iOS status bar background color in React Native?

Is there a single place in the react native iOS native code that I could modify to set iOS statusbar backgroundColor? RCTRootView.m ? The react native StatusBar component only support backgroundColor ...
Ed of the Mountain's user avatar
108 votes
17 answers
57k views

Xcode 15: Unable to boot the Simulator

I was able to run iOS simulator fine with Xcode 14 and my Mac recently updated the latest version of Xcode which is 15 then I'm no longer able to boot a device from its new simulator. I did try many ...
tmhao2005's user avatar
  • 16.9k
107 votes
16 answers
159k views

React Native iOS and Android folders not present

I'm new to react native, and I've been having some trouble understanding the folder structure of the app which should supposedly be present in the project folder on creation. Basically, when creating ...
Simon Eliasson's user avatar
107 votes
8 answers
164k views

How can I run background tasks in React Native?

I've built a little iOS app in React Native that does location tracking, sending the lat/lng regularly to a server of the user's choosing. However this only works when the app is in the foreground. ...
liamzebedee's user avatar
  • 14.3k
106 votes
19 answers
142k views

TypeError: cli.init is not a function for react native

While running npx react-native init appName in MacBook air M1 chip TypeError: cli.init is not a function at run (/opt/homebrew/lib/node_modules/react-native-cli/index.js:302:7) at createProject (/opt/...
Bandish Kumar's user avatar
100 votes
11 answers
141k views

React Native init specific version

I upgraded my latest project to React Native 0.19 and instantly the video no longer works. How can I create a new project with a specific version? I want to init a new project at version 0.18.1. I did ...
Hasen's user avatar
  • 12.2k
95 votes
11 answers
66k views

No template named 'unary_function' in namespace 'std'; did you mean '__unary_function'?

Just upgraded my Xcode to 15.0, and suddenly it started giving me the following error in RCT_Folly No template named 'unary_function' in namespace 'std'; did you mean '__unary_function'? this is the ...
Mitesh Baraiya's user avatar
93 votes
15 answers
93k views

"Invariant Violation: Application AwesomeProject has not been registered" When building for iOS device with static jsbundle

First off, I don't know react, but I figured deploying to an iOS device instead of the simulator wouldn't be too difficult to do with the docs. They were a bit sparse but I got somewhere and now I'm ...
cmp's user avatar
  • 1,613
93 votes
6 answers
71k views

clang: error: SDK does not contain 'libarclite' at the path

After Updating to Xcode 15 I am getting the following error in my react-native app while it try to build it. clang: error: SDK does not contain 'libarclite' at the path '/Applications/Xcode.app/...
Engr.Aftab Ufaq's user avatar
92 votes
11 answers
284k views

setTimeout in React Native

I'm trying to load a splash screen for an iOS app built in React Native. I'm trying to accomplish this through class states and then a setTimeout function as follows: class CowtanApp extends ...
Phil's user avatar
  • 1,664
91 votes
3 answers
49k views

Warning : Failed child context type: Invalid child context 'virtualizedCell.cellKey' of type 'number' supplied to 'CellRenderer', expected 'string'

I updgraded from react 16.2 -> 16.3-alpha-1 and react-native 0.52->0.54 and I get the warning above in the simulator.
dhj's user avatar
  • 4,805
91 votes
2 answers
57k views

Use of bitwise '|' with boolean operands | Xcode 14.3 fails builds using react-native Yoga [closed]

Just updated my Xcode to Version 14.3 today and the build is failing with the following error in the Yoga file: Use of bitwise '|' with boolean operands Looks like we have some issues with the iOS ...
Mitesh Baraiya's user avatar
88 votes
4 answers
105k views

Identify Return Key action in React Native

I have a TextInput which I have enabled multiline as true. Thing is the Keyboard won't hide after Return is pressed. It goes to a new line. So I was hoping to use react-native-dismiss-keyboard. To ...
Nimila Hiranya's user avatar
87 votes
5 answers
122k views

React-native: How to build for ios from windows

We are starting to work with react-native at my company. We have one mac and the rest of the team is running on windows. Is there a way to write the app on windows with the ios device connected to ...
simon Le Ster's user avatar
86 votes
4 answers
40k views

Save sensitive data in React Native

I am building a React Native application and I need to save some sensitive data like a token and a refresh token. The obvious solution is to save that information using AsyncStorage. The problem is ...
Sandro Machado's user avatar
86 votes
10 answers
150k views

How to change styling of TextInput placeholder in React Native?

Is there a way to set fontStyle: 'italic' only for the placeholder of the TextInput in React Native? looking here at the documentation seems like you can only set a placeholder and ...
Zohar Levin's user avatar
  • 2,424
83 votes
29 answers
170k views

"Reanimated 2 failed to create a worklet, maybe you forgot to add Reanimated's babel plugin?"

How can I solve this error? Reanimated 2 failed to create a worklet, maybe you forgot to add Reanimated's babel plugin? This is my babel.config.js file : module.exports = { presets: ['module:metro-...
Ajay Pandey's user avatar
82 votes
5 answers
110k views

react native use variable for image file

I know that to use a static image in react native you need to do a require to that image specifically, but I am trying to load a random image based on a number. For example I have 100 images called ...
bgrober's user avatar
  • 836
76 votes
6 answers
54k views

How to change display name of an app in react-native

Apple have clear instructions on how to change the display name of an IOS app, but they are not useful for a react-native app because the folder structure is different. How do you change the display ...
Obromios's user avatar
  • 16.1k
74 votes
25 answers
104k views

React-Native: Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template

While executing npx react-native init MyProject I ran into the following error: ✖ Installing CocoaPods dependencies (this may take a few minutes) error Error: Failed to install CocoaPods dependencies ...
Vaiden's user avatar
  • 16k
73 votes
6 answers
69k views

React Native on Apple Silicon M1 - The linked library 'libPods-ProjectName.a' is missing one or more architectures required by this target: x86_64

I'm trying to build a React Native project on a MacBook Pro with a M1 architecture, for iOS simulator. The project built nicely on Intel architecture. It also build on device and archive well on M1. ...
Xiiryo's user avatar
  • 3,207
71 votes
15 answers
164k views

How to check internet connection in React Native application for both iOS and Android?

I have a React Native application and I'm seeking to add functionality that checks if there is an active internet connection when the app first starts up, and continuously thereafter. If there is no ...
zstardust225's user avatar

1
2 3 4 5
243