Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all 16569 articles
Browse latest View live

Error React Native IOS Exception '-[__NSDictionaryM length]: unrecognised selector sent to

$
0
0

I am new to IOS development and i have developed and build an app for IOS & Android in React Native and the app is fully working in Android. I have also installed the app on the iPhone simulator for testing, and after successfull build when the apps opens then it crashes and Xcode shows the stack of error.

Stack Trace

2018-03-26 17:18:59.537548+0530 VwWoocommerceAppMain[57934:681649] -[__NSDictionaryM length]: unrecognized selector sent to instance 0x60000023abc0
2018-03-26 17:18:59.555 [fatal][tid:com.facebook.react.AsyncLocalStorageQueue] Exception '-[__NSDictionaryM length]: unrecognized selector sent to instance 0x60000023abc0' was thrown while invoking multiSet on target AsyncLocalStorage with params (
        (
                (
            cart,
                        {
            }
        )
    ),
    5873
)
callstack: (
	0   CoreFoundation                      0x0000000103f8212b __exceptionPreprocess + 171
	1   libobjc.A.dylib                     0x0000000102874f41 objc_exception_throw + 48
	2   CoreFoundation                      0x0000000104003024 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
	3   CoreFoundation                      0x0000000103f04f78 ___forwarding___ + 1432
	4   CoreFoundation                      0x0000000103f04958 _CF_forwarding_prep_0 + 120
	5   VwWoocommerceAppMain                0x0000000101956824 -[RCTAsyncLocalStorage _writeEntry:changedManifest:] + 258
	6   VwWoocommerceAppMain                0x0000000101957104 -[RCTAsyncLocalStorage multiSet:callback:] + 436
	7   CoreFoundation                      0x0000000103f0636c __invoking___ + 140
	8   CoreFoundation                      0x0000000103f06240 -[NSInvocation invoke] + 320
	9   CoreFoundation                      0x0000000103f1ec26 -[NSInvocation invokeWithTarget:] + 54
	10  VwWoocommerceAppMain                0x0000000101966929 -[RCTModuleMethod invokeWithBridge:module:arguments:] + 602
	11  VwWoocommerceAppMain                0x00000001019ac7a8 _ZN8facebook5reactL11invokeInnerEP9RCTBridgeP13RCTModuleDatajRKN5folly7dynamicE + 266
	12  VwWoocommerceAppMain                0x00000001019ac522 ___ZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEi_block_invoke + 78
	13  libdispatch.dylib                   0x0000000108bf32f7 _dispatch_call_block_and_release + 12
	14  libdispatch.dylib                   0x0000000108bf433d _dispatch_client_callout + 8
	15  libdispatch.dylib                   0x0000000108bfc855 _dispatch_queue_serial_drain + 1162
	16  libdispatch.dylib                   0x0000000108bfd1ea _dispatch_queue_invoke + 336
	17  libdispatch.dylib                   0x0000000108bf8f7c _dispatch_queue_override_invoke + 733
	18  libdispatch.dylib                   0x0000000108c00102 _dispatch_root_queue_drain + 772
	19  libdispatch.dylib                   0x0000000108bffda0 _dispatch_worker_thread3 + 132
	20  libsystem_pthread.dylib             0x00000001091465a2 _pthread_wqthread + 1299
	21  libsystem_pthread.dylib             0x000000010914607d start_wqthread + 13
)
2018-03-26 17:18:59.558030+0530 VwWoocommerceAppMain[57934:681649] Exception '-[__NSDictionaryM length]: unrecognized selector sent to instance 0x60000023abc0' was thrown while invoking multiSet on target AsyncLocalStorage with params (
        (
                (
            cart,
                        {
            }
        )
    ),
    5873
)
callstack: (
	0   CoreFoundation                      0x0000000103f8212b __exceptionPreprocess + 171
	1   libobjc.A.dylib                     0x0000000102874f41 objc_exception_throw + 48
	2   CoreFoundation                      0x0000000104003024 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
	3   CoreFoundation                      0x0000000103f04f78 ___forwarding___ + 1432
	4   CoreFoundation                      0x0000000103f04958 _CF_forwarding_prep_0 + 120
	5   VwWoocommerceAppMain                0x0000000101956824 -[RCTAsyncLocalStorage _writeEntry:changedManifest:] + 258
	6   VwWoocommerceAppMain                0x0000000101957104 -[RCTAsyncLocalStorage multiSet:callback:] + 436
	7   CoreFoundation                      0x0000000103f0636c __invoking___ + 140
	8   CoreFoundation                      0x0000000103f06240 -[NSInvocation invoke] + 320
	9   CoreFoundation                      0x0000000103f1ec26 -[NSInvocation invokeWithTarget:] + 54
	10  VwWoocommerceAppMain                0x0000000101966929 -[RCTModuleMethod invokeWithBridge:module:arguments:] + 602
	11  VwWoocommerceAppMain                0x00000001019ac7a8 _ZN8facebook5reactL11invokeInnerEP9RCTBridgeP13RCTModuleDatajRKN5folly7dynamicE + 266
	12  VwWoocommerceAppMain                0x00000001019ac522 ___ZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEi_block_invoke + 78
	13  libdispatch.dylib                   0x0000000108bf32f7 _dispatch_call_block_and_release + 12
	14  libdispatch.dylib                   0x0000000108bf433d _dispatch_client_callout + 8
	15  libdispatch.dylib                   0x0000000108bfc855 _dispatch_queue_serial_drain + 1162
	16  libdispatch.dylib                   0x0000000108bfd1ea _dispatch_queue_invoke + 336
	17  libdispatch.dylib                   0x0000000108bf8f7c _dispatch_queue_override_invoke + 733
	18  libdispatch.dylib                   0x0000000108c00102 _dispatch_root_queue_drain + 772
	19  libdispatch.dylib                   0x0000000108bffda0 _dispatch_worker_thread3 + 132
	20  libsystem_pthread.dylib             0x00000001091465a2 _pthread_wqthread + 1299
	21  libsystem_pthread.dylib             0x000000010914607d start_wqthread + 13
)
2018-03-26 17:18:59.561965+0530 VwWoocommerceAppMain[57934:681649] *** Terminating app due to uncaught exception 'RCTFatalException: Exception '-[__NSDictionaryM length]: unrecognized selector sent to instance 0x60000023abc0' was thrown while invoking multiSet on target AsyncLocalStorage with params (
        (
                (
            cart,
                        {
            }
        )
    ),
    5873
)
callstack: (
	0   CoreFoundation                      0x0000000103f8212b __exceptionPreprocess + 171
	1   libobjc.A.dylib                     0x0000000102874f41 objc_exception_throw + 48
	2   CoreFoundation                      0x0000000104003024 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
	3   CoreFoundation                      0x0000000103f04f78 ___forwarding___ + 1432
	4   CoreFoundation                      0x0000000103f04958 _CF_forwarding_prep_0 + 120
	5   VwWoocommerceAppMain                0x0000000101956824 -[RCTAsyncLocalStorage _writeEntry:changedManifest:] + 258
	6   VwWoocommerceAppMain                0x0000000101957104 -[RCTAsyncLocalStorage multiSet:callback:] + 436
	7   CoreFoundation                      0x0000000103f0636c __invoking___ + 140
	8   CoreFoundation                      0x0000000103f06240 -[NSInvocation invoke] + 320
	9   CoreFoundation                      0x0000000103f1ec26 -[NSInvocation invokeWithTarget:] + 54
	10  VwWoocommerceAppMain                0x0000000101966929 -[RCTModuleMethod invokeWithBridge:module:arguments:] + 602
	11  VwWoocommerceAppMain                0x00000001019ac7a8 _ZN8facebook5reactL11invokeInnerEP9RCTBridgeP13RCTModuleDatajRKN5folly7dynamicE + 266
	12  VwWoocommerceAppMain                0x00000001019ac522 ___ZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEi_block_invoke + 78
	13  libdispatch.dylib                   0x0000000108bf32f7 _dispatch_call_block_and_release + 12
	14  libdispatch.dylib                   0x0000000108bf433d _dispatch_client_callout + 8
	15  libdispatch.dylib                   0x0000000108bfc855 _dispatch_queue_serial_drain + 1162
	16  libdispatch.dylib                   0x0000000108bfd1ea _dispatch_queue_invoke + 336
	17  libdispatch.dylib                   0x0000000108bf8f7c _dispatch_queue_override_invoke + 733
	18  libdispatch.dylib                   0x0000000108c00102 _dispatch_root_queue_drain + 772
	19  libdispatch.dylib                   0x0000000108bffda0 _dispatch_worker_thread3 + 132
	20  libsystem_pthread.dylib             0x00000001091465a2 _pthread_wqthread + 1299
	21  libsystem_pthread.dylib             0x000000010914607d start_wqthread + 13
)', reason: 'Exception '-[__NSDictionaryM length]: unrecognized selector sent to instanc...'
*** First throw call stack:
(
	0   CoreFoundation                      0x0000000103f8212b __exceptionPreprocess + 171
	1   libobjc.A.dylib                     0x0000000102874f41 objc_exception_throw + 48
	2   VwWoocommerceAppMain                0x0000000101953a22 RCTFormatError + 0
	3   VwWoocommerceAppMain                0x00000001019ac9bc _ZN8facebook5reactL11invokeInnerEP9RCTBridgeP13RCTModuleDatajRKN5folly7dynamicE + 798
	4   VwWoocommerceAppMain                0x00000001019ac522 ___ZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEi_block_invoke + 78
	5   libdispatch.dylib                   0x0000000108bf32f7 _dispatch_call_block_and_release + 12
	6   libdispatch.dylib                   0x0000000108bf433d _dispatch_client_callout + 8
	7   libdispatch.dylib                   0x0000000108bfc855 _dispatch_queue_serial_drain + 1162
	8   libdispatch.dylib                   0x0000000108bfd1ea _dispatch_queue_invoke + 336
	9   libdispatch.dylib                   0x0000000108bf8f7c _dispatch_queue_override_invoke + 733
	10  libdispatch.dylib                   0x0000000108c00102 _dispatch_root_queue_drain + 772
	11  libdispatch.dylib                   0x0000000108bffda0 _dispatch_worker_thread3 + 132
	12  libsystem_pthread.dylib             0x00000001091465a2 _pthread_wqthread + 1299
	13  libsystem_pthread.dylib             0x000000010914607d start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 

If anyone knows please help.


How do you check/change iOS version in React Native?

$
0
0

I heard that a new version of iOS came out the other day, and wanted to know if my React Native project would be using that version by default when I build it with XCode, and if not, how can I force it to?

My Questions Are:

1) How do you check what version of iOS a React Native app is using?

2) How do you update the version of iOS in a React Native app?

-[RCTRootView cancelTouches]` is deprecated and will be deleted soon in react native map

$
0
0

I am using react-native-map and it works well on ios and android.

my react native version is 0.61.2. But in ios, when I click map, then shows warning "-[RCTRootView cancelTouches]` is deprecated and will be deleted soon.".

What is this and how to remove this warning?

Podfile.lock missing when initial react-native run-ios

$
0
0

I am setting up IOS dev for React Native (0.61) app which has the working android version. What I did was to copy src of components and package.json file after react native environment is setup by following online post (installed xcode command line tool 10.2). But launching run-ios failed:

$ react-native run-ios
error Could not find "Podfile.lock" at /Users/mine/Documents/code/js/emps_fe6/ios/Podfile.lock. Did you run "pod install" in iOS directory?
error Could not find the following native modules: RNCAsyncStorage, RNDeviceInfo, RNGestureHandler, RNKeychain, BVLinearGradient, RNLocalize, RNReanimated, RNVectorIcons, react-native-video. Did you forget to run "pod install" ?
info Found Xcode project "emps_fe6.xcodeproj"
xcrun: error: unable to find utility "simctl", not a developer tool or in PATH
error Could not parse the simulator list output. Run CLI with --verbose flag for more details.
Error: Command failed: xcrun simctl list --json devices
xcrun: error: unable to find utility "simctl", not a developer tool or in PATH

    at checkExecSyncError (child_process.js:629:11)
    at Object.execFileSync (child_process.js:647:13)
    at runOnSimulator (/Usersamine/Documents/code/js/emps_fe6/node_modules/@react-native-community/cli-platform-ios/build/commands/runIOS/index.js:130:54)
    at Object.runIOS [as func] (/Users/mine/Documents/code/js/emps_fe6/node_modules/@react-native-community/cli-platform-ios/build/commands/runIOS/index.js:100:12)
    at Command.handleAction (/Users/mine/Documents/code/js/emps_fe6/node_modules/@react-native-community/cli/build/index.js:164:23)
    at Command.listener (/Users/mine/Documents/code/js/emps_fe6/node_modules/commander/index.js:315:8)
    at Command.emit (events.js:198:13)
    at Command.parseArgs (/Users/amine/Documents/code/js/emps_fe6/node_modules/commander/index.js:651:12)
    at Command.parse (/Users/mine/Documents/code/js/emps_fe6/node_modules/commander/index.js:474:21)
    at setupAndRun (/Users/mine/Documents/code/js/emps_fe6/node_modules/@react-native-community/cli/build/index.js:237:24)

Here is the output of react native info:

$ react-native info
info Fetching system and libraries information...
System:
    OS: macOS High Sierra 10.13.6
    CPU: (8) x64 Intel(R) Core(TM) i7-2675QM CPU @ 2.20GHz
    Memory: 194.93 MB / 8.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 10.17.0 - /usr/local/bin/node
    Yarn: 1.19.1 - /usr/local/bin/yarn
    npm: 6.11.3 - /usr/local/bin/npm
  IDEs:
    Xcode: /undefined - /usr/bin/xcodebuild
  npmPackages:
    react: 16.11.0 => 16.11.0 
    react-native: 0.61.2 => 0.61.2 
  npmGlobalPackages:
    react-native-cli: 2.0.1

Here is the package.json:

"dependencies": {
    "@react-native-community/async-storage": "^1.6.2",
    "moment": "^2.24.0",
    "react": "16.11.0",
    "react-native": "0.61.2",
    "react-native-cli": "^2.0.1",
    "react-native-confirmation-code-field": "^4.1.0",
    "react-native-device-info": "^4.0.1",
    "react-native-elements": "^1.2.6",
    "react-native-gesture-handler": "^1.4.1",
    "react-native-gifted-chat": "^0.11.3",
    "react-native-keychain": "^4.0.1",
    "react-native-linear-gradient": "^2.5.6",
    "react-native-localize": "^1.3.1",
    "react-native-modal": "^11.4.0",
    "react-native-modal-datetime-picker": "^7.6.0",
    "react-native-reanimated": "^1.3.0",
    "react-native-segmented-control-tab": "^3.4.1",
    "react-native-vector-icons": "^6.6.0",
    "react-native-video": "^5.0.2",
    "react-navigation": "^4.0.10",
    "react-navigation-stack": "^1.10.2",
    "react-navigation-tabs": "^2.5.6",
    "simctl": "^2.0.0",
    "socket.io-client": "2.1.1",
    "xcode": "^2.0.0"
  },

In the error message, there mentioned quite a few modules which are missing. But those modules have been installed as it shows in the package.json. I am not sure about what the error message means. Also I installed the simctl but scrum simctl still can not find it. I am using VS Code as IDE.

UPDATE:

created an empty Podfile.lock under /ios, the error becomes when run-ios:

error Cannot read property 'SPEC CHECKSUMS' of undefined. Run CLI with --verbose flag for more details.
TypeError: Cannot read property 'SPEC CHECKSUMS' of undefined
    at getDependenciesFromPodfileLock (/Users/mine/Documents/code/js/emps_fe6/node_modules/@react-native-community/cli-platform-ios/build/link-pods/getDependenciesFromPodfileLock.js:63:58)
    at warnAboutPodInstall (/Users/mine/Documents/code/js/emps_fe6/node_modules/@react-native-community/cli-platform-ios/build/link/warnAboutPodInstall.js:43:67)
    at Object.runIOS [as func] (/Users/mine/Documents/code/js/emps_fe6/node_modules/@react-native-community/cli-platform-ios/build/commands/runIOS/index.js:80:36)
    at Command.handleAction (/Users/mine/Documents/code/js/emps_fe6/node_modules/@react-native-community/cli/build/index.js:164:23)
    at Command.listener (/Users/mine/Documents/code/js/emps_fe6/node_modules/commander/index.js:315:8)
    at Command.emit (events.js:198:13)
    at Command.parseArgs (/Users/mine/Documents/code/js/emps_fe6/node_modules/commander/index.js:651:12)
    at Command.parse (/Users/mine/Documents/code/js/emps_fe6/node_modules/commander/index.js:474:21)
    at setupAndRun (/Users/mine/Documents/code/js/emps_fe6/node_modules/@react-native-community/cli/build/index.js:237:24)
    at Object.run (/Users/mine/Documents/code/js/emps_fe6/node_modules/@react-native-community/cli/build/index.js:184:11)

How to have React Native project versions seamless across project and platforms

$
0
0

It is very annoying to change build version of my React Native (not Expo) application every time I build it.

It needs to be changed in at leats 4 places at moment:

  • /android/app/build.gradle
  • /ios/projectname/Info.plist
  • package.json
  • My config file (But I think I can handle this by loading it from package.json)

Is there any way to automatize this? For example every place gets updates when package.json version changes?

React Native ios and watchman

$
0
0

I'm trying to run my react native project (AwesomeProject) in macOS Catalina 10.15, watchman 4.9, XCode 11.1, ios 13.

it shows to me that Build Succeed, but the app couldn't be installed at this time, also the simulator shows this error in the running Metro:

Loading dependency graph...jest-haste-map: Watchman crawl failed. Retrying once with node crawler.

Usually this happens when watchman isn't running. Create an empty .watchmanconfig file in your project's root folder or initialize a git or hg repository in your project.

Error: Watchman error: query failed: synchronization failed: Operation timed out. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.html. Loading dependency graph, done.

Also is it okay that my simulator all the time shows black screen? can anyone help me, please?

React Native: Build Missing iOS + Android folders

$
0
0

I recently update my React Native + React dependencies. I then removed by iOS + android folders to create fresh ones, but the following command that used to work in the past is now giving an error

Dependencies:

  • React (16.11.0)
  • React Native (0.61.2)

What worked in the past:

react-native upgrade --legacy true

Error:

error: unknown option `--legacy'

What I've tried

  • I've even tried using just one dash too with -legacy
  • react-native upgrade (Doesn't work since I'm on the latest version of React Native)

Expo Camera preview component started displaying black screen out of the blue

$
0
0

The Camera preview component from the npm package 'expo-camera' doesn't show anything but a black screen. I've even created a brand new managed Expo project with nothing but this code:

import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { Camera } from 'expo-camera';

export default function App() {
  return (
    <View style={styles.container}>
      <Camera />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
});

This is my package.json file:

{
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "expo": "^35.0.0",
    "expo-camera": "^7.0.0",
    "react": "16.8.3",
    "react-dom": "16.8.3",
    "react-native": "https://github.com/expo/react-native/archive/sdk-35.0.0.tar.gz",
    "react-native-web": "^0.11.7"
  },
  "devDependencies": {
    "babel-preset-expo": "^7.1.0"
  },
  "private": true
}

And this is my app.json:

{
  "expo": {
    "name": "testcamera",
    "slug": "testcamera",
    "privacy": "public",
    "sdkVersion": "35.0.0",
    "platforms": [
      "ios",
      "android",
      "web"
    ],
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "supportsTablet": true
    }
  }
}

It just stopped working out of the blue. Last thing I did was publish the Expo project, and it was working before that.


Cannot read property 'navigate' of undefined - React Native Navigation

$
0
0

I am currently working on a app which works with react native and I tried to make a flow using react-navigation working on this tutorial but I am having trouble at the point of running my project, I've done a lot of research and i just cant get to the solution, first for all I am using react-native-cli: 2.0.1 and react-native: 0.48.3, this is my code:

App.js:

import React, { Component } from 'react';
import { Text, Button, View } from 'react-native';
import {
    StackNavigator,
} from 'react-navigation';

class App extends Component {
    static navigationOptions = {
        title: 'Welcome',
    };

    render() {
        console.log(this.props.navigation);
        const { navigate } = this.props.navigation;
        return (
            <View>
                <Text>Go to maps!</Text>
                <Button
                    onPress={() => navigate('Map')}
                    title="MAP"
                />
            </View>
        );
    }
}

export default App;

my Router.js

import {
    StackNavigator,
  } from 'react-navigation';

  import MapMarker from './MapMarker';
  import App from './App';

  export const UserStack = StackNavigator({
    ScreenMap: 
    {
        screen: MapMarker,
        navigationOptions:
        {
            title: "Map",
            header:null
        },
    },
    ScreenHome: 
    {
        screen: App,
        navigationOptions:
        {
            title: "Home",
            headerLeft:null
        },
    },
});

As you can see this is a pretty basic App which i just cant make work, this is a screenshot of my error on the simulator:

Whoops

I would really really appreciate if you guys could help me with this. Thanks.

React native track player fails to add songs to playlist

$
0
0

I am working on a music player in react native and have been using the package react-native-track-player. I have so far not had a problem with the package in android. but when I try to run it on ios I get the error You attempted to set the key0with the value

{"id":"0",
 "url":{"uri":"https://urltosong.mp3"},
 "artwork":"https://url_to_artwork.jpg",
 "artist":"author",
 "title":"song titile"
} 

on an object that is meant to be immutable and has been frozen.

The code that generate the error is

async function togglePlayback() {
    const currentTrack = await TrackPlayer.getCurrentTrack();
    if (currentTrack == null) {
      await TrackPlayer.reset();
      await TrackPlayer.add(playlist); //this was never adding and die silently
      await TrackPlayer.play();
    } else {
            await TrackPlayer.add(playlist); //adding this line the error above appeared
            await TrackPlayer.play();
            //console.warn(TrackPlayer.getCurrentTrack())
    }
  }

I am using this version of the package "react-native-track-player": "^2.0.0-rc13", I don't know if there is something I am missing. I will appreciate your help in fixing this.

Open a certain HealthKit screen in iOS within React Native

$
0
0

My React Native-driven app needs a user to subscribe for some health provider to fetch their medical records. To do that, my app should open a screen where a user can see a list of providers and choose those they need.

That screen might be reached by a path "iOS Desktop -> Health -> Health Data -> Health Records" which is pretty deep. How can I know a URL of that path to open it from my app using linking API?

Strange react-native warnings/errors

$
0
0

While working on an existing app, I have encountered a number of warning/errors:

1:

warning #1

2:

warning #2

3:

error #1

4:

error #2

5:

error #3

The yellow warnings seems to go away after dismissing them, however, I have to reload the app to get rid of the errors.

Here is the list of my dependencies:

"dependencies": {
  "@react-native-community/async-storage": "1.5.0",
  "@react-native-community/netinfo": "3.2.1",
  "axios": "0.18.0",
  "clock-format-utility": "0.0.5",
  "jsc-android": "241213.2.0",
  "lodash": "4.17.5",
  "moment": "2.22.2",
  "moment-timezone": "0.5.14",
  "prop-types": "15.6.1",
  "react": "16.8.6",
  "react-native": "0.59.8",
  "react-native-actionsheet": "2.2.2",
  "react-native-alphabetlistview": "0.3.0",
  "react-native-calendar-strip": "1.3.8",
  "react-native-calendars": "1.212.0",
  "react-native-camera": "2.9.0",
  "react-native-communications": "2.2.1",
  "react-native-datepicker": "1.72",
  "react-native-deprecated-custom-components": "0.1.2",
  "react-native-device-info": "2.1.2",
  "react-native-document-picker": "2.3.0",
  "react-native-drawer-layout": "2.0.0",
  "react-native-flurry-sdk": "3.2.0",
  "react-native-geolocation-service": "2.0.0",
  "react-native-global-props": "1.1.5",
  "react-native-image-crop-picker": "0.26.1",
  "react-native-image-manipulator": "0.1.0",
  "react-native-maps": "0.24.2",
  "react-native-masked-text": "1.6.5",
  "react-native-modal-dropdown": "0.6.1",
  "react-native-navbar": "2.1.0",
  "react-native-permissions": "1.1.1",
  "react-native-pinch": "0.1.0",
  "react-native-progress": "3.4.0",
  "react-native-push-notification": "3.1.9",
  "react-native-root-toast": "3.0.2",
  "react-native-segmented-control-tab": "3.2.2",
  "react-native-signature-pad": "0.1.0",
  "react-native-splash-screen": "3.2.0",
  "react-native-statusbar-alert": "0.4.0",
  "react-native-swipe-list-view": "1.5.8",
  "react-native-svg": "9.5.1",
  "react-native-touch-id": "4.4.1",
  "react-native-vector-icons": "6.6.0",
  "react-native-webview": "5.12.0",
  "react-native-wheel-picker-android": "2.0.5",
  "react-redux": "6.0.1",
  "redux": "3.7.2",
  "redux-logger": "3.0.6",
  "redux-thunk": "2.2.0",
  "rn-fetch-blob": "0.10.15",
  "uuid": "3.3.2"
}

"devDependencies": {
  "@babel/core": "7.4.5",
  "@babel/runtime": "7.4.5",
  "babel-eslint": "10.0.1",
  "babel-jest": "24.8.0",
  "babel-plugin-root-import": "6.2.0",
  "eslint": "5.16.0",
  "eslint-plugin-babel": "5.3.0",
  "eslint-plugin-react": "7.12.4",
  "eslint-plugin-react-native": "3.6.0",
  "jest": "24.8.0",
  "metro-react-native-babel-preset": "0.54.1",
  "react-test-renderer": "16.8.3"
}

Does anyone have any tips on how to get rid of warnings/errors above completely?

Could not find iPhone X simulator. Run CLI with --verbose flag for more details

$
0
0

I downloaded the recently released Xcode 11 beta version, and now I can't run my React-Native app on my simulator. I know there are some question on stack-overflow about this but they did'nt help. the problem is there is no

/node_modules/react-native/local-cli/runIOS/findMatchingSimulator.js

file at all. in the local-cli folder there is only one file named cli.js

'use strict';

var cli = require('@react-native-community/cli');

if (require.main === module) {
  cli.run();
}

module.exports = cli;

request failed when power button pressed or screen off automatically in IOS (only happens with real device)

$
0
0

I tried react native fetch and also with axios get and response from a server which may take a while to respond and pressed power key to put screen off. then power key pressed again to wake up mobile and unlocked and we have network error. this also happens when the screen automatically gets sleep while request in progress. I checked with android and this issue not exist with android. and even not with IOS emulators.

steps to reproduce:

  1. make a simple project with REST API call.
  2. add some delay from the server-side to above API.
  3. Run App on real device and call API.
  4. put screen off by press power key and unlock again.

now request will fail with a network error. is there any solution for this

How can we read device status in react native? (eg: phone in call , sleep mode, etc...)

$
0
0

I just need to read the status of the phone eg: in phone call /sleep mode etc ... is there any way to read all the status ?


react native. the close event of the application

$
0
0

On one of the pages of the developed application for ios on react native there is a switch components. When interacting with them, the state of the switches is stored in the Redux storage, but when leaving the page or leaving the application, you need to send the state data to the server. Leaving the page is implemented as follows:

props.navigation.addListener('willBlur', async() => {
  props.pushDataOnServer(data, token);
});

We add a navigation handler (StackNavigator) for the willBlur event, thus we can catch the transition to another page, but what about when closing the application directly from the edit page of the switches? Is there any event for this (e.g. willExit, willClose)? Or if you know a more effective way, please tell us

Check device for VoLTE support - ReactNative

$
0
0

I'm searching for a way to detect device is support VoLTE or not from my developed app using react native. Search on internet and couldn't find a correct answer. Could some one guide me to find out correct way of doing it.

No podspec found for `React-Core` in `../node_modules/react-native/React`

$
0
0

I'm using React Native. I get this issue when I try to upload pods. I've successfully installed node_modules, but I'm getting this problem. What is the problem? If we delete the package-lock.json and node_modules folder, I reinstalled npm. But I'm having this problem when I'm doing pod install.

platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

target '...' do

  # use_frameworks!

  pod 'React', :path => '../node_modules/react-native/'
  pod 'React-Core', :path => '../node_modules/react-native/React'
  pod 'React-DevSupport', :path => '../node_modules/react-native/React'
  pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
  pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
  pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
  pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
  pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
  pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
  pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
  pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
  pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
  pod 'React-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket'
  pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
  pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
  pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
  pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
  pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

  # Required by RNFirebase
  pod 'Firebase/Core', '~> 6.8.1'

  # [OPTIONAL PODS] - comment out pods for firebase products you won't be using.
  # pod 'Firebase/AdMob', '~> 6.8.1'
  pod 'Firebase/Auth', '~> 6.8.1'
  pod 'Firebase/Database', '~> 6.8.1'
  pod 'Firebase/Functions', '~> 6.8.1'
  pod 'Firebase/DynamicLinks', '~> 6.8.1'
  pod 'Firebase/Firestore', '~> 6.8.1'
  pod 'Firebase/Messaging', '~> 6.8.1'
  pod 'Firebase/RemoteConfig', '~> 6.8.1'
  pod 'Firebase/Storage', '~> 6.8.1'
  pod 'Firebase/Performance', '~> 6.8.1'
  pod 'Fabric', '~> 1.10.2'
  pod 'Crashlytics', '~> 3.14.0'


  target '..' do
    inherit! :search_paths
    # Pods for testing
  end

  use_native_modules!

end

target '...-tvOS' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for ..-tvOS

  target 'DeliveryApp-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

iOS Request Guided Access fails

$
0
0

I have supervised iPads managed through an MDM. We have a custom entreprise App which request Guided Access (Single App Mode).

UIAccessibilityRequestGuidedAccessSession(true or false, ^(BOOL didSucceed) { ... });

It works when app opens up and locks in that app.

During some interactions with the app, the app will request to disable guided access to open up another app. That works as well.

When the other app re-open the first custom app, it requests single app mode once again but this one fails with the folowing error message:

App: (org.company.applicationName) asked to self-lock into gax. desired style: 2 effective style: 0 result: 0 error: 4 availability:Guided Access Ready

Has anyone encountered this ? What does that mean ?

(I would also mention that i only get that error in release and not debug)

Application is React-Native app...

Thank you!

How to profile React Native source code using Xcode/Instruments/Time Profiler

$
0
0

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 Profiler configuration in Instruments, but none of our JS code is symbolicated.

Remotely debugging in Chrome seems to just debug the "remote inspector" page, which is entirely unhelpful.

Is there a way to build/attach a source map, or symbolicate the memory addresses seen below, to the JS function names/calls?

Instruments Callstack

Viewing all 16569 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>