Questions tagged [react-native]
React Native is a JavaScript library used to build native mobile apps using React. The focus of React Native is on developer efficiency across all the platforms you care about - learn once, write anywhere.
60,310
questions with no upvoted or accepted answers
50votes
1answer
2kviews
React Native Android run causes "Illegal number of arguments for updateHotspot command"
I am creating a simple app using React Native for both iOS and Android. I've tested both platforms for a while and all works very well. But recently, I was focusing on iOS and all my functionalities ...
47votes
1answer
2kviews
How to profile React Native source code using Xcode/Instruments/Time Profiler
We're using React Native 0.59.10 and React-Redux 5.0.7, and are experiencing a CPU-bound performance issue, in which our Redux actions are taking ~0.25s to complete.
We've profiled using the Time ...
36votes
1answer
1kviews
Swift package manager in React Native project
In iOS, React Native support CocoaPods for Objective-C and Swift code.
Is there any way to bring 3rd party libraries via Swift Package Manager?
33votes
1answer
1kviews
How do I setup java code completion for a react native project on intellij?
React-native organizes its project like :
android
--build.gradle
--settings.gradle
ios
node_modules
index.android.js
index.ios.js
It's a little messy and requires editing js, java and objective c ...
29votes
2answers
572views
React Native pseudo leaking memory after remove elements from screen (ios)
I'm experiencing some out of memory crashes in production. Trying to isolate the problem I could make a small app to reproduce the issue.
import React from 'react'; ...
28votes
1answer
3kviews
expo.io's BackgroundFetch is not running the defined task
I am currently developing an app for iOS with expo sdk-version 32. I have to call a REST service periodically from my app. In order to do that I tried to utilize the new BackgroundFetch API.
Here is ...
23votes
3answers
2kviews
React Native Android: Fetch Requests only working when React Native Debugger is connected
I have a weird issue with making fetch requests to my API on Android (using React Apollo). In the dev build as well as the release build fetch does not work. As soon as I power up React Native ...
22votes
3answers
4kviews
React-Native fetch through proxy
How can I set options in the fetch method of react-native to make a call to a webserver go through a proxy.
Currently I am using axios but this doesn't work.
After adding a host header to the fetch,...
21votes
1answer
624views
React Native - iOS - Local image invisible (works on android)
I'm mapping TouchableOpacity with an Image nested inside of it. It works great on Android but on iOS the image is invisible. There is still a 75x75 touchable opacity that I can tap but the image is ...
20votes
1answer
917views
Uploading File in parts using XMLHttpRequest and auth digest
I am trying to upload a local mp4/movie file with XMLHttpRequest() on a server. This is written with react-native and in a final version user would be able to upload any big files from his/her IOS/...
20votes
0answers
979views
react native console.debug does not show log using log-ios
After upgrading existing project to react native v 0.48.3, console.debug is not listing logs when I run the application on simulator.
It used to work till I upgraded using react-native upgrade option.
...
18votes
1answer
3kviews
Firebase & iOS 14 > Will dynamic links tracking and campaigns continue to work?
As most of you are probably aware of, iOS 14 will basically put an end to app acquisition tracking as we know it.
Here are two great articles that explore the issue in length:
The App Attribution ...
18votes
0answers
1kviews
How can i resolve crash Thread SIGSEGV 0x0000000000000010 in react native
I have an application published in play store,
i got a crash report but i can't figure out how to resolve it,
Trace:
Crashed: Thread: SIGSEGV 0x0000000000000010
at (Manquant)()
at (Manquant)(...
17votes
1answer
1kviews
How to get the Image URL of rct-image-store to upload image through api
How to get the image url from the rct-image-store? I cropped image using ImageEditingManager and it returned me rct-image-store://0. Now I need to upload this image to the server. How do i get the URL ...
16votes
3answers
5kviews
Debugging - How to profile react native memory usage
General question. I'm developing an app using React Native, and certain actions bring my app up to around 500MB of RAM, where it usually gets killed.
I've searched the web for good material on RN ...
16votes
3answers
3kviews
React Native - There is no route defined for Login
I'm learning react native with configuring tabNavigator, DrawerNavigator, and StackNavigator into one without NativeBase or Expo with a single react-navigation library.
I achieved it but there comes ...
15votes
1answer
2kviews
Where to put all the screens which are common in multiple stack navigators? - React Navigation v5
Following is the hierarchy of my app navigators
├── appNavigator ( Bottom Tab Navigator)
├── feed (Stack Navigator)
postDetailScreen
pageDetailScreen
ProfileDetailScreen
...other screens
├── ...
15votes
4answers
2kviews
Touchable opacity on press not working inside SVG tags
I have a component inside an <Svg> where I have a button (<TouchableOpacity> with <View>) inside the component.
While the button onClick worked fine standalone, it's not working ...
15votes
1answer
2kviews
VSCode auto imports for React Native with JavaScript
I know VSCode supports auto import for JavaScript.
For some reason, it does not work with React Native. There is even a dedicated section on the VSCode website for this. But it only answers how to ...
15votes
0answers
12kviews
"malformed calls from JS field sizes are different" error on Android - react-native
I'm using React-Native.I'm living trouble with Picker component on Android. I use Picker from Native-Base Library.
Here is my Picker code with it's parent view.
<View style={{height: 40, marginTop:...
14votes
1answer
3kviews
Failed to apply patch for package
I tried to run a new React Native (Android) project I got from somebody. When I run yarn install, the following error happens. How can I fix this ? I am new to react native.
patch-package: Applying ...
14votes
1answer
1kviews
Xcode: Embed Framework in React Native Module without modifying application project
I am developing a React Native Module that includes our Framework 'AntaviSense'.
I am able to include the framework in the main project and by "embed framework" in the Project Settings, everything ...
14votes
0answers
2kviews
Could not find generated setter @ React Native
I'm getting hundreds of warnings like the following
W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTRenderableViewManager
W/unknown:...
14votes
2answers
3kviews
React Native Pause/Play GIF
I have an animated GIF that I would like to use in React Native. I have it embedded in my app and playing, but I would like the ability to pause/play the GIF based on an event.
Is there currently a ...
13votes
1answer
1kviews
React native (expo) web view Error net::ERR_CACHE_MISS
I am using react native(expo) and try to use web view package
And i am getting this warning in console and didn't see anything on mobile screen.
"sdkVersion": "36.0.0",
"expo": "~36.0.0",
...
13votes
0answers
1kviews
How can i create a react-native module with storyboard
I have received a sdk with a storyboard and multiple view controllers.
In my react-native module I want to expose a method that will transition to this storyboard and the get the result back.
I have ...
13votes
0answers
1kviews
react-native log-ios returning no device found for real device
I am trying to run console.log from a js file for iOS application react native.
Before this, I have tried to use react native's debugging feature 'Shake Device' in which I couldn't succeed.
Now I ...
13votes
1answer
815views
Fetch API slow in react-native@0.55 release build
I use fetch in my react-native app for API calls.
This works fine in development builds, but slows down to several seconds in a release build.
The problem is not with the API; a request takes about ...
13votes
1answer
11kviews
How to select multiple values from Picker component in react-native?
react-native Picker component doesn't seem like providing multiselect option https://facebook.github.io/react-native/docs/picker.html#enabled
But, I have com across some libraries which provides ...
13votes
1answer
1kviews
React Native onPanResponderMove seems to be called too rarely
I'm trying to implement a custom, vertical slider in React Native. For this purpose, I'm using a PanResponder. Since the slider is vertical, I'm changing the y value only. To stop the object on slider'...
13votes
4answers
2kviews
How to temporarily disable rage shake opening the dev menu in react-native?
I'm developing an app in react-native for Android. I recently added a barcode scanning component. Whenever the scanner reads a barcode, the camera does a subtle click noise. It seems that this ...
13votes
2answers
2kviews
Locking scroll position in FlatList (and ScrollView)
I'm trying to create a FlatList that keeps the current scroll position locked and does not change by new items that are inserted at the top of the list.
I've created an expo snack to demonstrate my ...
13votes
1answer
2kviews
Different package versions for Android and iOS
I am developing an app for both Android and iOS using React Native.
One of the libraries I'm using is a bit problematic because the app only compiles correctly:
...on Android when using "react-...
12votes
1answer
2kviews
Android App crash "libjsc.so" missing with stacktrace Crashed: Thread: SIGSEGV 0x0000000000000010
Our react-native App seems to sometimes crash on Android, PRD instance with error "libjsc.so" missing and the only details in Firebase is this:
Crashed: Thread: SIGSEGV 0x0000000000000010
...
12votes
0answers
2kviews
React Native and Https Agent
Is possible use HTTPS Agent in React Native app?
My code right now is:
import axios from 'axios';
import ip from './ip';
import https from 'https';
const httpsAgent = new https.Agent({...
12votes
1answer
4kviews
Detox + Jest - App has not responded to the network requests below
I am currently setting up Detox for an existing project and running into snags.
I am using Detox + Jest and am receiving an error
[Client.js/PENDING_REQUESTS] App has not responded to the network ...
12votes
1answer
596views
Custom component topbar button event RNN v2
I have a custom component 'MenuButton' in my RNNv2 topbar. I want openMenu() to run when this button is clicked, but this doesn't happen. My typescript linting tells me Property openMenu does not ...
12votes
1answer
1kviews
Trigger an event to private channel in react app
I want to trigger an event to pusher private channel and my server side language is laravel I reviewed a lot of resources, but I did not find a comprehensive approach which covers both the server ...
12votes
0answers
2kviews
How to cold start a React Native app over device lock screen?
I'm building a VoIP app on React Native, which detects incoming calls using push notifications. I need to start the app and bring it to the foreground on receiving a push notification. I'm able to ...
12votes
3answers
2kviews
React Native multi-line vertically centered text on IOS trouble
I'm using a multi line TextInput in my react-native application and been stuck on this for a while. I can not get the text to be vertically aligned on IOS devices.
using textAlign='center' puts the ...
12votes
2answers
3kviews
High CPU Usage in React-Native
I'm working to reduce the CPU load on an RN app. I've built the app to a device, in release, and trimmed the console logs from the project. Even after doing this the app is still around 33% CPU usage ...
12votes
1answer
1kviews
Create a static library with React dependency
I created a library that uses the native navigation controller to navigate through react and native screens. The library is written in Swift and contains some objective-c code to setup the React ...
12votes
2answers
2kviews
Expo audio recording webm
I am using expo and I am trying to record on android by using the webm output format ( Expo.Audio.RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_WEBM ). My issue is that I have tried all the different ...
12votes
0answers
2kviews
How to draw over other apps in React-native
I was trying to create facebook messenger like chat heads in my react-native app .I used pan responder to create the dragging effect and collapsing to side effect but I am not able to figure out how ...