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

React Native Crashing on IOS

$
0
0

I made an app for my family that lives in other city and I have a huge problem, I am without the computer with my app and my react native app is crashing when I open on ios. The app load the react native splash screen but crashes. How I can solve this problem? I need to show this app to my family


React-native iOS: Could not connect to development server

$
0
0

After restarting Wi-Fi router my local ip has changed from "192.168.1.4" to "192.168.1.3" so I've changed it in AppDelegate.m to"http://192.168.1.3:8081/index.bundle?platform=ios&dev=true&minify=false"

But I still get error on real device:

Could not connect to development server ...URL http://192.168.1.3:8081/index.bundle?platform=ios&dev=true&minify=false

When I shake my phone and configure bundler to the same IP 192.168.1.3 and port 8081 app loads successfully. But Fast Refresh is not working and I need to build app and configure bundler every time I make changes in my code.

I also checked "http://192.168.1.3:8081/index.bundle?platform=ios&dev=true&minify=false" in my browser and on another computer in my local network and it works fine. Tried to load the same link on mobile browser with no success.All devices are using the same network.

I have already tried:

  • cleaned tmp folders and watchman
  • cleaned iOS build folder
  • removed and reinstalled node_modules and pods
  • killed node process and restarted npm with --reset-cache
  • restarted xcode, iphone and computer (many times)
  • reinstalled watchman
  • set "Connect via Network" in Xcode Devices window

How to build and run an existing react-native app?

$
0
0

I am trying to build and run an existing react-native app, but after the latest xcode update I cannot run the app.

In return to 'react-native run-ios' I get a crazy big log error that looks like that:

CompileC/Users/admin/Library/Developer/Xcode/DerivedData/snowJobProvider-cizkghqnckqjvabshallhgplnxpj/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-Core.build/Objects-normal/x86_64/RCTSRWebSocket.o/Users/admin/Desktop/Snow-Project/snow-mobile-jobprovider/node_modules/react-native/Libraries/WebSocket/RCTSRWebSocket.mnormal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler(in target 'React-Core' from project 'Pods')cd /Users/admin/Desktop/Snow-Project/snow-mobile-jobprovider/ios/Podsexport LANG=en_US.US-ASCII/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang-x objective-c -target x86_64-apple-ios10.0-simulator -fmessage-length\

Any ideas?

How can i access phone's developer mode in flutter?

$
0
0

How can I access the phone's developer mode option and its features using flutter or react native, is there any way, then how, can I do it?

Migrate native app (android/ios) to react

$
0
0

I have a situation that maybe you can help and would love to hear your opinions. I have an app from a startup with android and iOS version and the backend with Django.Right now is so expensive to maintain because there’s different technologies and I was wondering if to migrate to a multi platform technology as Reactjs (PWA) and maybe use firebase as a service for backend.

The app is live now (pinwins) but it’s a MBP that needs corrections and development.

Its has been developed by an agencie and for the moment I can count on a junior profile on react.

What do you think? Would you keep working in this one or would you migrate to a new technology with more agile development? (In this case what would be the best way?)

Thanks a lot in advance,

Have a nice weekend!

ld: entry point(_main) undefined for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) on xcode 12.5

$
0
0

getting this type error on xcode 12.5 . i can try previous all solution but still getting same

error :

The following build commands failed:Ld build/Build/Products/Debug-iphonesimulator/AppName.app/AppName normal x86_64(1 failure)

How to download pdf with blob url in react-native-webview

$
0
0

Pdf is show in ios preview.Response url: blob:baseurl/e4fb3bfa-270b-4799-8330-6e0e061ee875

let xnr = new XMLHttpRequest();        xnr.open('GET', navState.url, true);        xnr.responseType = 'blob';        xnr.onreadystatechange = function(e) {          if (this.status === 200) {            let url = window.URL || window.webkitURL;            let pdf = url.createObjectURL(this.response)          } else {            console.log(e)          }        }        xnr.send();

Is it possible to combine React Native with socket.io

$
0
0

I was working on an app with Phonegap + React.js and Socket.io. However, then React-Native got released and the native feel is amazing.

I tried getting socket.io-client working with React Native, but unfortunately without much success. I did some research and I'm getting the exact same errors as described in this issue: https://github.com/facebook/react-native/issues/375

The comments on the issue said to try and use the fetch API to fetch JS modules, but I think I'm doing this wrong:

var socketScript;    fetch('https://cdn.socket.io/socket.io-1.2.0.js')    .then(function(response) {        socketScript = response._bodyText;    }).done(function() {        var socket = socketScript.io();    });

This returns an undefined is not a function.

Is there any way to make socket.io-client work with React Native? Or am I looking at this the wrong way? Perhaps there are other, better suited solutions?


Is it possible to make a multiplatform mobile app only using Windows?

$
0
0

With my team from the university, we are carrying out the final degree project. We need to create a multiplatform mobile application, each of us has Windows computers.

We are thinking of using react or flutter, if you know any other technology that we can use, we are open to ideas.

The question is the following, to deploy the application in IOS, is it necessary to have a MAC computer?

React navigation in react native, how to make talkback read the name of the tab when double-tapping?

$
0
0

Hi Guys

So, I'm coding an app using react native and react navigation's bottom tab navigator.

Now, since I'm a blind user, I use talkback. The problem arises, however, when I double tap on a tab. It just says selected. However, in quite a few applications, when doouble-tapping on a tab, it says the name of the tab before the word selected.

Is there any way I can implement this in my app?

Thanks in advance.

Hi Guys

So, I'm building a react native app with react-navigation's bottom tab navigator.

Now, when I double tap on a tab with talkback on android, it just

React native iOS not connecting to packager from xcode

$
0
0

I have a react native (0.55.4) project and it is working fine on Android or iOS simulator. But when I am running it from Xcode (9.3), the app starts on the device, shows the splash screen, the metro bundler starts on the mac BUT the app is not getting connected to the bundler/packager.

There is no process shown (green bar) which bundles the js code.

Also I am getting these logs on the xcode output :

2018-05-18 17:00:46.613995+0530 Thunderpod[42517:6526595] NSURLConnection finished with error - code -10012018-05-18 17:00:46.637 [info][tid:main][RCTCxxBridge.mm:210] Initializing <RCTCxxBridge: 0x1c01c3480> (parent: <RCTBridge: 0x1c00c6270>, executor: (null))2018-05-18 17:00:46.633051+0530 Thunderpod[42517:6526595] Task <CE0CD57D-C025-4768-91D1-C9A03F02C072>.<0> HTTP load failed (error code: -999 [1:89])2018-05-18 17:00:46.645156+0530 Thunderpod[42517:6526510] Initializing <RCTCxxBridge: 0x1c01c3480> (parent: <RCTBridge: 0x1c00c6270>, executor: (null))2018-05-18 17:00:46.689 [warn][tid:main][RCTBridge.m:119] Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?2018-05-18 17:00:46.689056+0530 Thunderpod[42517:6526510] Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?

After these my app's (named: Thunderpod) logs are being shown:

2018-05-18 17:00:46.771 [info][tid:main][RCTRootView.m:293] Running application Thunderpod ({    initialProps =     {    };    rootTag = 1;})2018-05-18 17:00:46.770981+0530 Thunderpod[42517:6526510] Running application Thunderpod ({    initialProps =     {    };    rootTag = 1;})2018-05-18 17:00:47.377 [info][tid:com.facebook.react.JavaScript] Running application "Thunderpod" with appParams: {"rootTag":1,"initialProps":{}}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF2018-05-18 17:00:47.376715+0530 Thunderpod[42517:6527004] Running application "Thunderpod" with appParams: {"rootTag":1,"initialProps":{}}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF2018-05-18 17:00:47.395 [warn][tid:com.facebook.react.JavaScript] Persistor added to window variable2018-05-18 17:00:47.394879+0530 Thunderpod[42517:6527004] Persistor added to window variable2018-05-18 17:00:47.407 [info][tid:com.facebook.react.JavaScript] On before lift2018-05-18 17:00:47.406652+0530 Thunderpod[42517:6527004] On before lift2018-05-18 17:00:47.409 [info][tid:com.facebook.react.JavaScript] 'Persistor restored:', { rootReducer: { isFirstTime: true },  userDataReducer:    { userRegistrationType: 'none',     userCountryData: { name: '-', callingCode: '-', countryCode: '-' },     userMobileNumber: '',     userFacebookData: {},     userPhoneData: {} },  _persist: { version: -1, rehydrated: true } }2018-05-18 17:00:47.408920+0530 Thunderpod[42517:6527004] 'Persistor restored:', { rootReducer: { isFirstTime: true },  userDataReducer:    { userRegistrationType: 'none',     userCountryData: { name: '-', callingCode: '-', countryCode: '-' },     userMobileNumber: '',     userFacebookData: {},     userPhoneData: {} },  _persist: { version: -1, rehydrated: true } }2018-05-18 17:00:47.412 [info][tid:com.facebook.react.JavaScript] [App] Render2018-05-18 17:00:47.412247+0530 Thunderpod[42517:6527004] [App] Render2018-05-18 17:00:47.509556+0530 Thunderpod[42517:6526510] refreshPreferences: HangTracerEnabled: 02018-05-18 17:00:47.509604+0530 Thunderpod[42517:6526510] refreshPreferences: HangTracerDuration: 5002018-05-18 17:00:47.509622+0530 Thunderpod[42517:6526510] refreshPreferences: ActivationLoggingEnabled: 0 ActivationLoggingTaskedOffByDA:02018-05-18 17:00:47.717 [info][tid:com.facebook.react.JavaScript] Component did mount.. Checking user authentication..2018-05-18 17:00:47.717345+0530 Thunderpod[42517:6527004] Component did mount.. Checking user authentication..2018-05-18 17:00:47.801047+0530 Thunderpod[42517:6527003] [] nw_connection_get_connected_socket 2 Connection has no connected handler2018-05-18 17:00:47.801124+0530 Thunderpod[42517:6527003] TCP Conn 0x1c416f780 Failed : error 0:61 [61]2018-05-18 17:00:47.916899+0530 Thunderpod[42517:6527008] [] nw_connection_get_connected_socket 3 Connection has no connected handler2018-05-18 17:00:47.916938+0530 Thunderpod[42517:6527008] TCP Conn 0x1c416dec0 Failed : error 0:61 [61]2018-05-18 17:00:48.075 [warn][tid:com.facebook.react.JavaScript] Warning: isMounted(...) is deprecated in plain JavaScript React classes. Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks.2018-05-18 17:00:48.074829+0530 Thunderpod[42517:6527004] Warning: isMounted(...) is deprecated in plain JavaScript React classes. Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks.20

Also note that the logs are being repeated !!

What is wrong with my setup ?

Edit: I created a new project and without making any changes I ran it using xcode and its giving me the same issue !!

Here is the package.json & my XCode version is 9.3 (9E145) which was working fine till yesterday:

{"name": "TestXcode","version": "0.0.1","private": true,"scripts": {"start": "node node_modules/react-native/local-cli/cli.js start","test": "jest"  },"dependencies": {"react": "16.3.1","react-native": "0.55.4"  },"devDependencies": {"babel-jest": "22.4.3","babel-preset-react-native": "4.0.0","jest": "22.4.3","react-test-renderer": "16.3.1"  },"jest": {"preset": "react-native"  }}

React Native run on device iOS crash

$
0
0

I'm trying to run my react native app on my iPhone 6, but when it goes in the debug phase it crashes, but there are no problems on running it on simulator.

My react native version is 0.60.5

These are my dependencies:

"dependencies": {<br>"@react-native-community/netinfo": "^4.1.5",<br>"jwt-decode": "^2.2.0",<br>"react": "16.8.6",<br>"react-native": "^0.60.5",<br>"react-native-auth0": "^1.5.0",<br>"react-native-calendars": "^1.210.0",<br>"react-native-device-info": "^2.3.2",<br>"react-native-document-picker": "git://github.com/Elyx0/react-native-document-picker.git#v3",<br>"react-native-file-viewer": "^2.0.0",<br>"react-native-fs": "^2.14.1",<br>"react-native-gesture-handler": "^1.4.1",<br>"react-native-image-picker": "^1.0.2",<br>"react-native-offline": "^5.0.0",<br>"react-native-progress": "^3.6.0",<br>"react-native-queue": "^1.2.1",<br>"react-native-splash-screen": "^3.2.0",<br>"react-native-svg": "^9.6.4",<br>"react-navigation": "^3.11.1",<br>"react-redux": "^7.1.0",<br>"realm": "^2.29.2",<br>"redux": "^4.0.4"<br>  },<br>"devDependencies": {<br>"@babel/core": "^7.5.5",<br>"@babel/runtime": "^7.5.5",<br>"@react-native-community/eslint-config": "^0.0.5",<br>"babel-jest": "^24.9.0",<br>"eslint": "^6.2.0",<br>"jest": "^24.9.0",<br>"metro-react-native-babel-preset": "^0.56.0",<br>"react-test-renderer": "16.8.6"<br>  },<br>

And this is the full log:

2019-08-26 17:02:18.721172+0200 iDiary[14898:1856748] [Accessibility] ****************** Loading GAX Client Bundle ****************2019-08-26 17:03:18.996939+0200 iDiary[14898:1856834] Task <9BC4C6D4-EA36-4C9E-AE26-EA910C6A991F>.<1> finished with error - code: -10012019-08-26 17:03:19.030974+0200 iDiary[14898:1856834] Task <9BC4C6D4-EA36-4C9E-AE26-EA910C6A991F>.<1> HTTP load failed (error code: -999 [1:89])2019-08-26 17:03:19.027 [info][tid:main][RCTCxxBridge.mm:236] Initializing <RCTCxxBridge: 0x103b13170> (parent: <RCTBridge: 0x283f536b0>, executor: (null))2019-08-26 17:03:19.037682+0200 iDiary[14898:1856748] Initializing <RCTCxxBridge: 0x103b13170> (parent: <RCTBridge: 0x283f536b0>, executor: (null))2019-08-26 17:03:19.214 [info][tid:main][RCTRootView.m:293] Running application iDiary ({    initialProps =     {    };    rootTag = 1;})2019-08-26 17:03:19.214706+0200 iDiary[14898:1856748] Running application iDiary ({    initialProps =     {    };    rootTag = 1;})2019-08-26 17:03:19.299503+0200 iDiary[14898:1856748] [NetworkInfo] Signal strength query returned error: Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied", descriptor: <CTServiceDescriptor 0x281472f00, domain=1, instance=1>2019-08-26 17:03:19.551522+0200 iDiary[14898:1856748] [NetworkInfo] Signal strength query returned error: Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied", descriptor: <CTServiceDescriptor 0x281469300, domain=1, instance=1>2019-08-26 17:03:19.785 [info][tid:main][RCTCxxBridge.mm:1061] Invalidating <RCTCxxBridge: 0x103b13170> (parent: <RCTBridge: 0x283f536b0>, executor: RCTWebSocketExecutor)2019-08-26 17:03:19.786216+0200 iDiary[14898:1856748] Invalidating <RCTCxxBridge: 0x103b13170> (parent: <RCTBridge: 0x283f536b0>, executor: RCTWebSocketExecutor)2019-08-26 17:03:20.091 [info][tid:com.facebook.react.JavaScript][RCTNativeModule.mm:86] Attempted to invoke `5` (method ID) on `WebSocketModule` (NativeModule name) without a method queue.2019-08-26 17:03:20.091389+0200 iDiary[14898:1856934] Attempted to invoke `5` (method ID) on `WebSocketModule` (NativeModule name) without a method queue.2019-08-26 17:03:20.097 [info][tid:com.facebook.react.JavaScript][RCTNativeModule.mm:86] Attempted to invoke `5` (method ID) on `WebSocketModule` (NativeModule name) without a method queue.2019-08-26 17:03:20.097325+0200 iDiary[14898:1856934] Attempted to invoke `5` (method ID) on `WebSocketModule` (NativeModule name) without a method queue.2019-08-26 17:03:20.097 [info][tid:com.facebook.react.JavaScript][RCTNativeModule.mm:86] Attempted to invoke `5` (method ID) on `WebSocketModule` (NativeModule name) without a method queue.2019-08-26 17:03:20.097585+0200 iDiary[14898:1856934] Attempted to invoke `5` (method ID) on `WebSocketModule` (NativeModule name) without a method queue.2019-08-26 17:03:20.098 [info][tid:com.facebook.react.JavaScript][RCTNativeModule.mm:86] Attempted to invoke `5` (method ID) on `WebSocketModule` (NativeModule name) without a method queue.2019-08-26 17:03:20.097817+0200 iDiary[14898:1856934] Attempted to invoke `5` (method ID) on `WebSocketModule` (NativeModule name) without a method queue.2019-08-26 17:03:20.098 [info][tid:com.facebook.react.JavaScript][RCTNativeModule.mm:86] Attempted to invoke `1` (method ID) on `WebSocketModule` (NativeModule name) without a method queue.2019-08-26 17:03:20.098149+0200 iDiary[14898:1856934] Attempted to invoke `1` (method ID) on `WebSocketModule` (NativeModule name) without a method queue.2019-08-26 17:03:20.098 [info][tid:com.facebook.react.JavaScript][RCTNativeModule.mm:86] Attempted to invoke `0` (method ID) on `BlobModule` (NativeModule name) without a method queue.2019-08-26 17:03:20.098306+0200 iDiary[14898:1856934] Attempted to invoke `0` (method ID) on `BlobModule` (NativeModule name) without a method queue.2019-08-26 17:03:20.329 [info][tid:com.facebook.react.JavaScript][RCTNativeModule.mm:86] Attempted to invoke `4` (method ID) on `BlobModule` (NativeModule name) without a method queue.2019-08-26 17:03:20.328815+0200 iDiary[14898:1856934] Attempted to invoke `4` (method ID) on `BlobModule` (NativeModule name) without a method queue.2019-08-26 17:03:20.362 [warn][tid:com.facebook.react.JavaScript] [SECURITY] node-uuid: crypto not usable, falling back to insecure Math.random()2019-08-26 17:03:20.362037+0200 iDiary[14898:1856934] [SECURITY] node-uuid: crypto not usable, falling back to insecure Math.random()2019-08-26 17:03:20.376 [warn][tid:com.facebook.react.JavaScript] Accessing view manager configs directly off UIManager via UIManager['getConstants'] is no longer supported. Use UIManager.getViewManagerConfig('getConstants') instead.2019-08-26 17:03:20.375708+0200 iDiary[14898:1856934] Accessing view manager configs directly off UIManager via UIManager['getConstants'] is no longer supported. Use UIManager.getViewManagerConfig('getConstants') instead.2019-08-26 17:03:20.437 [warn][tid:com.facebook.react.JavaScript] Require cycle: src/navigation/AppNavigator.js -> src/components/SideMenu.js -> src/navigation/AppNavigator.jsRequire cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.2019-08-26 17:03:20.437272+0200 iDiary[14898:1856934] Require cycle: src/navigation/AppNavigator.js -> src/components/SideMenu.js -> src/navigation/AppNavigator.jsRequire cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.2019-08-26 17:03:20.541 [error][tid:com.facebook.react.JavaScript] undefined is not an object (evaluating 'result.viewConfig')2019-08-26 17:03:20.541567+0200 iDiary[14898:1856934] undefined is not an object (evaluating 'result.viewConfig')2019-08-26 17:03:20.564 [info][tid:com.facebook.react.JavaScript][RCTNativeModule.mm:86] Attempted to invoke `1` (method ID) on `ExceptionsManager` (NativeModule name) without a method queue.2019-08-26 17:03:20.564373+0200 iDiary[14898:1856934] Attempted to invoke `1` (method ID) on `ExceptionsManager` (NativeModule name) without a method queue.2019-08-26 17:03:20.573 [info][tid:com.facebook.react.JavaScript][RCTNativeModule.mm:86] Attempted to invoke `0` (method ID) on `Timing` (NativeModule name) without a method queue.2019-08-26 17:03:20.573063+0200 iDiary[14898:1856934] Attempted to invoke `0` (method ID) on `Timing` (NativeModule name) without a method queue.2019-08-26 17:03:20.586 [warn][tid:com.facebook.react.JavaScript] Unable to symbolicate stack trace: Bundle was not loaded from the packager2019-08-26 17:03:20.586445+0200 iDiary[14898:1856934] Unable to symbolicate stack trace: Bundle was not loaded from the packager2019-08-26 17:03:20.587 [info][tid:com.facebook.react.JavaScript][RCTNativeModule.mm:86] Attempted to invoke `1` (method ID) on `Timing` (NativeModule name) without a method queue.2019-08-26 17:03:20.587586+0200 iDiary[14898:1856934] Attempted to invoke `1` (method ID) on `Timing` (NativeModule name) without a method queue.2019-08-26 17:03:20.593 [error][tid:com.facebook.react.JavaScript] Module AppRegistry is not a registered callable module (calling runApplication)2019-08-26 17:03:20.593304+0200 iDiary[14898:1856934] Module AppRegistry is not a registered callable module (calling runApplication)2019-08-26 17:03:20.601 [info][tid:com.facebook.react.JavaScript][RCTNativeModule.mm:86] Attempted to invoke `1` (method ID) on `ExceptionsManager` (NativeModule name) without a method queue.2019-08-26 17:03:20.601356+0200 iDiary[14898:1856934] Attempted to invoke `1` (method ID) on `ExceptionsManager` (NativeModule name) without a method queue.2019-08-26 17:03:20.602 [info][tid:com.facebook.react.JavaScript][RCTNativeModule.mm:86] Attempted to invoke `0` (method ID) on `Timing` (NativeModule name) without a method queue.2019-08-26 17:03:20.601715+0200 iDiary[14898:1856934] Attempted to invoke `0` (method ID) on `Timing` (NativeModule name) without a method queue.2019-08-26 17:03:20.610 [warn][tid:com.facebook.react.JavaScript] Unable to symbolicate stack trace: Bundle was not loaded from the packager2019-08-26 17:03:20.609688+0200 iDiary[14898:1856934] Unable to symbolicate stack trace: Bundle was not loaded from the packager2019-08-26 17:03:20.610 [info][tid:com.facebook.react.JavaScript][RCTNativeModule.mm:86] Attempted to invoke `1` (method ID) on `Timing` (NativeModule name) without a method queue.2019-08-26 17:03:20.610356+0200 iDiary[14898:1856934] Attempted to invoke `1` (method ID) on `Timing` (NativeModule name) without a method queue.2019-08-26 17:03:30.614 [error][tid:com.facebook.react.JavaScript][RCTCxxBridge.mm:1108] Timed out waiting for modules to be invalidated2019-08-26 17:03:30.614340+0200 iDiary[14898:1856934] Timed out waiting for modules to be invalidated2019-08-26 17:04:19.798616+0200 iDiary[14898:1856834] Task <EC7C12E8-0C02-4260-906B-5BE0B9224C15>.<2> finished with error - code: -10012019-08-26 17:04:19.801 [info][tid:main][RCTCxxBridge.mm:236] Initializing <RCTCxxBridge: 0x103b269c0> (parent: <RCTBridge: 0x283f536b0>, executor: RCTWebSocketExecutor)2019-08-26 17:04:19.801222+0200 iDiary[14898:1856748] Initializing <RCTCxxBridge: 0x103b269c0> (parent: <RCTBridge: 0x283f536b0>, executor: RCTWebSocketExecutor)2019-08-26 17:04:19.803884+0200 iDiary[14898:1856834] Task <EC7C12E8-0C02-4260-906B-5BE0B9224C15>.<2> HTTP load failed (error code: -999 [1:89])2019-08-26 17:04:19.834 [error][tid:main][RCTCxxBridge.mm:502] Unable to find module for AccessibilityManager2019-08-26 17:04:19.833846+0200 iDiary[14898:1856748] Unable to find module for AccessibilityManager2019-08-26 17:04:19.840714+0200 iDiary[14898:1856834] [] nw_socket_handle_socket_event [C3.1:1] Socket SO_ERROR [61: Connection refused]2019-08-26 17:04:19.847779+0200 iDiary[14898:1856834] [] nw_socket_handle_socket_event [C4.1:2] Socket SO_ERROR [61: Connection refused]2019-08-26 17:04:19.848193+0200 iDiary[14898:1856834] [] nw_socket_handle_socket_event [C3.2:1] Socket SO_ERROR [61: Connection refused]2019-08-26 17:04:19.849213+0200 iDiary[14898:1856835] [] nw_connection_get_connected_socket [C3] Client called nw_connection_get_connected_socket on unconnected nw_connection2019-08-26 17:04:19.849290+0200 iDiary[14898:1856835] TCP Conn 0x28215a7c0 Failed : error 0:61 [61]2019-08-26 17:04:19.856 [error][tid:main][RCTCxxBridge.mm:502] Unable to find module for EventDispatcher2019-08-26 17:04:19.855794+0200 iDiary[14898:1856748] Unable to find module for EventDispatcher2019-08-26 17:04:19.856171+0200 iDiary[14898:1856834] [] nw_socket_handle_socket_event [C4.2:2] Socket SO_ERROR [61: Connection refused]2019-08-26 17:04:19.857102+0200 iDiary[14898:1856834] TIC TCP Conn Failed [4:0x28215ae80]: 1:61 Err(61)2019-08-26 17:04:19.859256+0200 iDiary[14898:1856834] Task <41F50C0D-6D7D-4438-99AC-A58F0678DBF7>.<3> HTTP load failed (error code: -1004 [1:61])2019-08-26 17:04:19.859761+0200 iDiary[14898:1856834] Task <41F50C0D-6D7D-4438-99AC-A58F0678DBF7>.<3> finished with error - code: -10042019-08-26 17:04:19.868 [fatal][tid:com.facebook.react.JavaScript] Connection to http://localhost:8081/debugger-proxy?role=client timed out. Are you running node proxy? If you are running on the device, check if you have the right IP address in `RCTWebSocketExecutor.m`.2019-08-26 17:04:19.868264+0200 iDiary[14898:1857060] Connection to http://localhost:8081/debugger-proxy?role=client timed out. Are you running node proxy? If you are running on the device, check if you have the right IP address in `RCTWebSocketExecutor.m`.2019-08-26 17:04:19.869 [info][tid:com.facebook.react.WebSocketExecutor][RCTWebSocketExecutor.m:145] WebSocket connection failed with error Error Domain=NSPOSIXErrorDomain Code=61 "Connection refused" UserInfo={_kCFStreamErrorCodeKey=61, _kCFStreamErrorDomainKey=1}2019-08-26 17:04:19.868969+0200 iDiary[14898:1856834] WebSocket connection failed with error Error Domain=NSPOSIXErrorDomain Code=61 "Connection refused" UserInfo={_kCFStreamErrorCodeKey=61, _kCFStreamErrorDomainKey=1}2019-08-26 17:04:19.881896+0200 iDiary[14898:1856748] *** Assertion failure in -[RCTCxxBridge ensureOnJavaScriptThread:](), /Users/dev/Desktop/iDiary/app-mobile/iDiary/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm:2932019-08-26 17:04:19.882588+0200 iDiary[14898:1856748] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'This method must not be called before the JS thread is created'*** First throw call stack:(0x188bad27c 0x187d879f8 0x188ac6988 0x1895d6ee8 0x10083199c 0x10083a1b0 0x103a3f6f0 0x103a40c74 0x103a4e6fc 0x188b3ec1c 0x188b39b54 0x188b390b0 0x18ad3979c 0x1b536f978 0x10072817c 0x1885fe8e0)libc++abi.dylib: terminating with uncaught exception of type NSException(lldb) 

Hope anyone knows how to solve it, thanks in advance

Swipe card on button click using panresponder

$
0
0

I am trying to make a tinder-like app component to swipe cards, it is working fine when I swipe using a finger, however, I want to achieve the same on button click as well. I have used Panresponder so far for creating swipe action, below is my code

render() {return (<SafeAreaView style={{ flex: 1 }}><View style={{ flex: 1, justifyContent: 'center', alignContent: 'center', alignItems: 'center', backgroundColor: 'white' }}><View style={{        height: Dimensions.get('window').height * .75,        borderRadius: 5,        width: Dimensions.get('window').width * .75,      }}>        {          this.state.ARRAY.map((item, index) => {            this.position = new Animated.ValueXY()            this.rotate = this.position.x.interpolate({              inputRange: [-CONST_WIDTH / 2, 0, CONST_WIDTH / 2],              outputRange: ['-30deg', '0deg', '10deg'],              extrapolate: 'clamp'            })            this.rotateAndTranslate = {              transform: [{                rotate: this.rotate              },              ...this.position.getTranslateTransform()              ]            }            this.isPanDisabled = true            this.PanResponder = PanResponder.create({              onStartShouldSetPanResponder: (evt, gestureState) => this.isPanDisabled,              onPanResponderMove: (evt, gestureState) => {                this.position.setValue({ x: gestureState.dx, y: 0 })              },              onPanResponderRelease: (evt, gestureState) => {                if (gestureState.dx > 120) {                  this.isPanDisabled = true                  // console.log('dxgreaterThan120', gestureState.dx)                  Animated.spring(this.position, {                    toValue: { x: CONST_WIDTH + 100, y: 0 },                    useNativeDriver: Platform.OS === 'android'                  }).start(() => {                    let modified = this.state.ARRAY.filter((x, ind) => { return ind != index })                    console.log('modified', modified)                    this.setState({ ARRAY: modified })                  })                }                else if (gestureState.dx < -120) {                  this.isPanDisabled = true                  Animated.spring(this.position, {                    toValue: { x: -CONST_WIDTH - 150, y: 0 },                    useNativeDriver: Platform.OS === 'android'                  }).start(() => {                    let modified = this.state.ARRAY.filter((x, ind) => { return ind != index })                    console.log('modified', modified)                    this.setState({ ARRAY: modified })                  })                }                else if (gestureState.dy < -120 || gestureState.dy > 120) {                  this.isPanDisabled = false                }                else {                  this.isPanDisabled = true                  Animated.spring(this.position, {                    toValue: { x: 0, y: 0 },                    friction: 4,                    useNativeDriver: Platform.OS === 'android'                  }).start()                }              }            })            return (<Animated.View                key={index}                {...this.PanResponder.panHandlers}                style={[this.rotateAndTranslate, {                  borderRadius: 5,                  backgroundColor: color[index],                  position: 'absolute',                  top: 0, bottom: 0,                  left: 0, right: 0,                }]}><Animated.ScrollView                  onScrollEndDrag={() => {                    this.isPanDisabled = true                  }}><View style={{ flex: 1, flexGrow: 1 }}>                    {                      ARRAY_SUUMB.map((item, index) => {                        return (<Text style={{                            padding: 16,                            color: 'white'                          }}>                            Swiper</Text>                        )                      })                    }</View></Animated.ScrollView></Animated.View>            )          })        }</View><View style={{ justifyContent: 'center', flexDirection: 'row', alignContent: 'center', alignItems: 'center' }}><TouchableOpacity          onPress={() => this.swipeLeft()}          style={{            justifyContent: 'center',            height: 60,            width: 60,            borderRadius: 60 >> 1,            backgroundColor: 'gray',            alignContent: 'center',            alignItems: 'center'          }}><Text>Left</Text></TouchableOpacity><TouchableOpacity          onPress={() => this.swipeRight()}          style={{            justifyContent: 'center',            height: 60, width: 60, borderRadius: 60 >> 1,            backgroundColor: 'gray',            alignContent: 'center', alignItems: 'center'          }}><Text>Right</Text></TouchableOpacity></View></View></SafeAreaView>)

}

I want to make a function this.swipeRight() which I can swipe the card just like as if I am swiping using finger, I have tried creating a similar function but it just removes the top card instantly and afterwards it stops working

  swipeRight = () => {this.position.setValue({ x: Dimensions.get('screen').width * 1.5, y: 0 }, () => {  this.isPanDisabled = true  Animated.spring(this.position, {    toValue: { x: CONST_WIDTH + 100, y: 0 },    useNativeDriver: Platform.OS === 'android'  }).start()  let modified = this.state.ARRAY.splice(0, -1)  console.log('modified', modified)  this.setState({ ARRAY: modified })})

}

Any help would be appreciated, I have the panresponder inside a map function

Panresponder swipe not working on button click

$
0
0

I am trying to make a tinder-like app component to swipe cards, it is working fine when I swipe using a finger, however, I want to achieve the same on button click as well. I have used Panresponder so far for creating swipe action, below is my code

render() {return (<SafeAreaView style={{ flex: 1 }}><View style={{ flex: 1, justifyContent: 'center', alignContent: 'center', alignItems: 'center', backgroundColor: 'white' }}><View style={{        height: Dimensions.get('window').height * .75,        borderRadius: 5,        width: Dimensions.get('window').width * .75,      }}>        {          this.state.ARRAY.map((item, index) => {            this.position = new Animated.ValueXY()            this.rotate = this.position.x.interpolate({              inputRange: [-CONST_WIDTH / 2, 0, CONST_WIDTH / 2],              outputRange: ['-30deg', '0deg', '10deg'],              extrapolate: 'clamp'            })            this.rotateAndTranslate = {              transform: [{                rotate: this.rotate              },              ...this.position.getTranslateTransform()              ]            }            this.isPanDisabled = true            this.PanResponder = PanResponder.create({              onStartShouldSetPanResponder: (evt, gestureState) => this.isPanDisabled,              onPanResponderMove: (evt, gestureState) => {                this.position.setValue({ x: gestureState.dx, y: 0 })              },              onPanResponderRelease: (evt, gestureState) => {                if (gestureState.dx > 120) {                  this.isPanDisabled = true                  // console.log('dxgreaterThan120', gestureState.dx)                  Animated.spring(this.position, {                    toValue: { x: CONST_WIDTH + 100, y: 0 },                    useNativeDriver: Platform.OS === 'android'                  }).start(() => {                    let modified = this.state.ARRAY.filter((x, ind) => { return ind != index })                    console.log('modified', modified)                    this.setState({ ARRAY: modified })                  })                }                else if (gestureState.dx < -120) {                  this.isPanDisabled = true                  Animated.spring(this.position, {                    toValue: { x: -CONST_WIDTH - 150, y: 0 },                    useNativeDriver: Platform.OS === 'android'                  }).start(() => {                    let modified = this.state.ARRAY.filter((x, ind) => { return ind != index })                    console.log('modified', modified)                    this.setState({ ARRAY: modified })                  })                }                else if (gestureState.dy < -120 || gestureState.dy > 120) {                  this.isPanDisabled = false                }                else {                  this.isPanDisabled = true                  Animated.spring(this.position, {                    toValue: { x: 0, y: 0 },                    friction: 4,                    useNativeDriver: Platform.OS === 'android'                  }).start()                }              }            })            return (<Animated.View                key={index}                {...this.PanResponder.panHandlers}                style={[this.rotateAndTranslate, {                  borderRadius: 5,                  backgroundColor: color[index],                  position: 'absolute',                  top: 0, bottom: 0,                  left: 0, right: 0,                }]}><Animated.ScrollView                  onScrollEndDrag={() => {                    this.isPanDisabled = true                  }}><View style={{ flex: 1, flexGrow: 1 }}>                    {                      ARRAY_SUUMB.map((item, index) => {                        return (<Text style={{                            padding: 16,                            color: 'white'                          }}>                            Swiper</Text>                        )                      })                    }</View></Animated.ScrollView></Animated.View>            )          })        }</View><View style={{ justifyContent: 'center', flexDirection: 'row', alignContent: 'center', alignItems: 'center' }}><TouchableOpacity          onPress={() => this.swipeLeft()}          style={{            justifyContent: 'center',            height: 60,            width: 60,            borderRadius: 60 >> 1,            backgroundColor: 'gray',            alignContent: 'center',            alignItems: 'center'          }}><Text>Left</Text></TouchableOpacity><TouchableOpacity          onPress={() => this.swipeRight()}          style={{            justifyContent: 'center',            height: 60, width: 60, borderRadius: 60 >> 1,            backgroundColor: 'gray',            alignContent: 'center', alignItems: 'center'          }}><Text>Right</Text></TouchableOpacity></View></View></SafeAreaView>)

}

I want to make a function this.swipeRight() which I can swipe the card just like as if I am swiping using finger, I have tried creating a similar function but it just removes the top card instantly and afterwards it stops working

  swipeRight = () => {this.position.setValue({ x: Dimensions.get('screen').width * 1.5, y: 0 }, () => {  this.isPanDisabled = true  Animated.spring(this.position, {    toValue: { x: CONST_WIDTH + 100, y: 0 },    useNativeDriver: Platform.OS === 'android'  }).start()  let modified = this.state.ARRAY.splice(0, -1)  console.log('modified', modified)  this.setState({ ARRAY: modified })})

}

Any help would be appreciated, I have the panresponder inside a map function

How can I scroll a React Native ScrollView using KIF?

$
0
0

I've been using KIF to do iOS testing. I have a section of my app that is React Native.

I am definitely finding the correct view, because I can make it scroll a tiny amount (20px?), but I can't make it scroll more than that, no matter what number I use for vertical in tester.scrollView(withAccessibilityIdentifier:byFractionOfSizeHorizontal:vertical:). Calling scroll multiple times also does nothing.

The view:

<ScrollView    testID="screen-scroll"    bounces={false}    alwaysBounceVertical={false}    style={{ flex: 1 }}    contentContainerStyle={{ flex: 1 }}    canCancelContentTouches={autoScroll}>   {...}</ScrollView>

The KIF test:

tester.scrollView(withAccessibilityIdentifier: "screen-scroll", byFractionOfSizeHorizontal: 0, vertical: 1)

Some images not showing up on iOS(ReactNative)

$
0
0

I am facing an issue in a react-native application where some images are not showing up in iOS, however same images are being displayed on android. Is there any issue in the images? Please check both attached images below:

Image showing up on both android and ios:https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/static/path-2+4080ff-1(oxdjGu_ucA),url-http%3A%2F%2Fdev.abc.com%2Fmpin1.png(11.25387620,43.77496190)/11.2538762,43.7749619,7/1024x1024?access_token=[ACCESS_TOKEN]

Image not showing up iOS:https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/static/path-2+4080ff-1(oeu|B_m%7D%60No~tcBrjci%60@),url-http%3A%2F%2Fdev.abc.com%2Fmpin1.png(78.96288000,20.59368400),url-http%3A%2F%2Fdev.abc.com%2Fmpin1.png(-95.71289100,37.09024000)/51.407439337712,80.48698662388,0/1024x1024?access_token=[ACCESS_TOKEN]

Code I am using is:

import {Image} from 'react-native'<Image    style={{height: 100, width: 100}}    source={{uri: imageUrl}    resizeMode={'contain}/>

Is there anything I am missing?

Data-only notification not received on react native iOS app

$
0
0

Sending a data-only notification from FCM to a react-native iOS app in foreground is not received by react-native-firebase/messaging onMessage() method. However it works for an android app and for iOS if we send data + notification message. A notification-only message works completely fine on iOS and android getting this issue for data-only message.

I have used a real device to test this and also tried to send content_available parameter with the payload but that didn't work for me.

package.json

"@react-native-firebase/app": "10.0.0","@react-native-firebase/crashlytics": "10.0.0","@react-native-firebase/messaging": "10.0.0"

Podfile

  pod 'Firebase/Core'  pod 'Firebase/Firestore'  pod 'Firebase/Messaging'

Payload

   {"token":"TOKEN","data":{"Nick" : "Mario","body" : "great match!","Room" : "PortugalVSDenmark"     }  }

App.js

async componentDidMount() {        //Get notification permission from user and token        await this.checkPermission();        messaging().onMessage(async remoteMessage => {            console.log("Remote notification inside onMessage" + JSON.stringify(remoteMessage));        });        messaging().onNotificationOpenedApp(remoteMessage => {            console.log('Notification caused app to open from background state:', remoteMessage);        });        // Check whether an initial notification is available        messaging().getInitialNotification().then(remoteMessage => {            if (remoteMessage) {                console.log('Notification caused app to open from quit state:',                    remoteMessage.notification,                );            }        });    }

fatal error: module map file YogaKit.modulemap not found

$
0
0

I am trying to build an iOS app and get this error. I have the project, target, and podfile all specifying iOS deployment target of 14.2. I am using Xcode V12.2.

fatal error: module map file '/Users/USERNAME/Library/Developer/Xcode/DerivedData/APPNAME-hevjyrbzqmxstztjalctjwmbxffm/Build/Products/Debug-iphonesimulator/YogaKit/YogaKit.modulemap' not found1 error generated.

When I navigate to that directory I do not see the YogaKit.modulemap file in there. How do I configure the build to copy it to that directory or otherwise fix this error?

I am opening the .xcworkspace project file.

I already did:

rm -rf ~/Library/Developer/Xcode/DerivedData/pod deintegratepod update

This is an expo ejected bare app using react-native 0.63.3 and cocoapods v1.10.0. I'm building on a Mac Mini M1.

Any help would be greatly appreciated.

Using RCTBridge before RCTRootView

$
0
0

I Was trying to document steps for integrating React Naive component I built into objective c.

I was going through RN docs: https://reactnative.dev/docs/integration-with-existing-apps

where they have wriiten this (inside event handler section note)

use RCTBridge initWithBundleURL to create a bridge and then use RCTRootView initWithBridge.

but I couldn't get how to do it.

From their example

- (IBAction)highScoreButtonPressed:(id)sender {    NSLog(@"High Score Button Pressed");    NSURL *jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.bundle?platform=ios"];    RCTRootView *rootView =      [[RCTRootView alloc] initWithBundleURL: jsCodeLocation                                  moduleName: @"RNHighScores"                           initialProperties:                             @{                               @"scores" : @[                                 @{                                   @"name" : @"Alex",                                   @"value": @"42"                                  },                                 @{                                   @"name" : @"Joel",                                   @"value": @"10"                                 }                               ]                             }                               launchOptions: nil];    UIViewController *vc = [[UIViewController alloc] init];    vc.view = rootView;    [self presentViewController:vc animated:YES completion:nil];}

Can someone explain/help me with above code example on how to achieve it?

PS: If I do something like this

RCTBridge *bridge = [[RCTBridge alloc] initWithBundleURL:jsCodeLocation];

where

NSURL *jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.bundle?platform=ios"];

it gives error

No visible @interface for 'RCTBridge' declares the selector 'initWithBundleURL:'

How to share pdf file in ios react-native-webview which is generated using blob url

$
0
0

Pdf is visible in ios preview. Response url:-blob:baseurl/e4fb3bfa-270b-4799-8330-6e0e061ee875No option show to save to file or print

sharePdf = (bloburl) => {    const options = {      url: blobUrl,      type: 'application/pdf',    };    Share.open(options)      .then(res => {        console.log(res);      })      .catch(err => {        err && console.log(err);      });  };

enter image description here

enter image description here

Viewing all 16907 articles
Browse latest View live


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