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

React Native Detox: Can't accept location permission from system alert pop up

$
0
0

Launch app from command line using detox test --configuration ios.sim.debug

Launch app in code via await device.launchApp({ permissions: { location: 'always', notifications: 'YES' } })

Go through login flow until app asks for location via react-native-permissions Permissions.request('location', { type: 'always' }) (with prior check to see if location permission check already set to'always' (in which case app doesn't ask) )

See system alert pop up asking to confirm location permission

Detox cannot see system alert pop up and thus can't click on button to choose permission always for location

Should be able to tap on 'Always Allow' button in location permission system button. But can't.

See my code at: github.com/wix/Detox/issues/1330 .


Detect if picture of picture taken in mobile app

$
0
0

I am working on a face recognition app where the picture is taken and sent to server for recognition.

I have to add a validation that user should capture picture of real person and of another picture. I have tried a feature of eye blink and in which the camera waits for eye blink and captures as soon as eye is blinked, but that is not working out because it detects as eye blink if mobile is shaken during capture.

Would like to ask for help here, is there any way that we can detect if user is capturing picture of another picture. Any ideas would help.

I am using react native to build both Android and iOS apps.

Thanks in advance.

Refresh contentComponent in react-navigation

$
0
0

I am using React-Navigation where I am using functionality of custom drawer by using contentComponent of React-Navigation.

const DrawerNavigation = DrawerNavigator({
  DrawerStack: { screen: DrawerStack }
}, {
  contentComponent: DrawerComponent,
  drawerWidth: 300
})

Here DrawerComponent is my custom navigation drawer where I have used custom navigation items like username, profile picture, email address and other menus.

Now whenever user updates their profile I want to refresh my DrawerComponent, I am not able to find any way to do it. Can anybody suggest me a good way to implement this?

Firebase custom dynamic link is not working with ios 12 in react native

$
0
0

I'm developing hybrid app using react-native and have used firebase dynamic link which is working fine in android but in ios it is not working as expected. React native app is installed on device but the custom dynamic link is redirecting to Appstore (with alert message - app is not available for your region) instead of opening the app. I have used Invertase react native firebase and currently testing it on ios 12. It works fine with ios 13, but fails to open app in ios 12.

Expected Behaviour:

On click of custom dynamic link it should redirect to app if app is installed on device or redirects to App store if app is not installed on device.

Current Behaviour:

Custom dynamic link redirects to Appstore in both the scenarios (app installed on device or not installed on device).

Version Details:

React Native - 0.59.0
React Native Firebase - 5.5.6
Pod Firebase/core - 6.3.0
ios Device version - 12.4.1

Thanks in advance.

Does React Native translates JavaScript into native code in the background?

$
0
0

I am currently developing a hybrid mobile application using the React Native library. But I am not sure how it executes in the Android or iOS platforms just like how a native application executes. So could someone please help me understand the background process of react-native. Is it translating the JavaScript code written into native code(Java or Objective C) and then compile & executes the native code?

AlertIOS undefined errors (React Native)

$
0
0

I'm trying to use AlertIOS in a brand new React Native project, but for some reason I'm getting undefined-related errors.

The relevant parts of the code:

import { AlertIOS } from 'react-native';

// Callback for a button press
const _alert = () => {
  AlertIOS.alert('title', 'text')
}

If I'm not in debug mode, after clicking the button I get the error undefined is not an object (evaluating '_reactNative.AlertIOS.alert').

When debugging, the error changes to Cannot read property alert of undefined and AlertIOS has the value shown in the print below, which doesn't seem right.

Also, if I just use Alert.alert, it works (obviously changing the import).

enter image description here

Why is Google Maps failing to resolve the directions when opening the App with a iOS URL Schema?

$
0
0

I'm developing a React Native application that links out to Google Maps and Apple Maps to provide Turn by Turn navigation.

We've had some interest from Users of being able to use Google Maps on iOS due to the availability of Offline Maps.

When attempting to Link out to Google Maps (using the React Native Linking API) the Google Maps app opens fine. However, the App isn't resolving the Route, and spins forever.

If I go back to my App, leaving Google Maps open, and click the Button that Links out to Google Maps again, it opens Google Maps and resolves almost straight away. As an additional kick in the teeth, it works when Offline and using the Offline Maps feature perfectly.

Below is the link I'm trying to use, where destination is usually a latlong but can be an address.

comgooglemapsurl://maps.google.com/maps?f=d&daddr=${destination}&nav=1

Bonus points:

If you can tell me how start the navigation automagically using the non url Schema; the following does not work with nav=1 at the end:

comgooglemaps://?f=d&daddr=${destination}&nav=1

Google Maps Failing to Resolve

React Native bundle loading slowly or not at all

$
0
0

The problem seems to be network-specific, the console log points to two possible errors causing the slowdown:

nw_resolver_create_dns_service_locked [C150094] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)

or

nw_socket_handle_socket_event Socket SO_ERROR [61: Connection refused]

I tried two network configurations:

  1. The development Mac and the iPhone on the same subnet (WiFi) of a larger corporate network - JS bundle loads slowly or not at all
  2. Direct connection between the development Mac (WiFi hotspot) and the iPhone - JS bundle loads very fast

AppDelegate.m

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  [NSThread sleepForTimeInterval:2.0];
  NSURL *jsCodeLocation;

  //debug and release configuration for firebase
  [FIRApp configure];
  [[UNUserNotificationCenter currentNotificationCenter] setDelegate:self];
  [RNFirebaseNotifications configure];

  jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];

  RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
                                                      moduleName:@"MyApp"
                                               initialProperties:nil
                                                   launchOptions:launchOptions];
  rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];

  self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
  UIViewController *rootViewController = [UIViewController new];
  rootViewController.view = rootView;
  self.window.rootViewController = rootViewController;
  [self.window makeKeyAndVisible];
  return YES;
}

Console log:

error   17:09:36.741707+0100    MyApp   nw_resolver_create_dns_service_locked [C29701] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:36.743554+0100    MyApp   nw_resolver_create_dns_service_locked [C29702] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:36.745285+0100    MyApp   nw_resolver_create_dns_service_locked [C29703] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:36.745877+0100    MyApp   nw_resolver_create_dns_service_locked [C29704] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:36.747514+0100    MyApp   nw_resolver_create_dns_service_locked [C29705] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:36.748616+0100    MyApp   nw_resolver_create_dns_service_locked [C29714] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:36.749197+0100    MyApp   nw_resolver_create_dns_service_locked [C29715] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:36.750118+0100    MyApp   nw_resolver_create_dns_service_locked [C29716] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:36.751705+0100    MyApp   nw_resolver_create_dns_service_locked [C29717] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:36.752599+0100    MyApp   nw_resolver_create_dns_service_locked [C29718] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:36.753707+0100    MyApp   nw_resolver_create_dns_service_locked [C29719] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.257411+0100    MyApp   nw_resolver_create_dns_service_locked [C29725] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.258018+0100    MyApp   nw_resolver_create_dns_service_locked [C29731] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.258969+0100    MyApp   nw_resolver_create_dns_service_locked [C29732] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.259757+0100    MyApp   nw_resolver_create_dns_service_locked [C29733] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.261023+0100    MyApp   nw_resolver_create_dns_service_locked [C29734] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.261598+0100    MyApp   nw_resolver_create_dns_service_locked [C29735] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.263278+0100    MyApp   nw_resolver_create_dns_service_locked [C29736] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.264353+0100    MyApp   nw_resolver_create_dns_service_locked [C29737] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.265340+0100    MyApp   nw_resolver_create_dns_service_locked [C29745] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.265913+0100    MyApp   nw_resolver_create_dns_service_locked [C29746] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.266989+0100    MyApp   nw_resolver_create_dns_service_locked [C29747] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.267868+0100    MyApp   nw_resolver_create_dns_service_locked [C29748] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.269294+0100    MyApp   nw_resolver_create_dns_service_locked [C29749] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.270294+0100    MyApp   nw_resolver_create_dns_service_locked [C29750] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.271071+0100    MyApp   nw_resolver_create_dns_service_locked [C29751] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.271384+0100    MyApp   nw_resolver_create_dns_service_locked [C29758] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.271955+0100    MyApp   nw_resolver_create_dns_service_locked [C29759] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.273083+0100    MyApp   nw_resolver_create_dns_service_locked [C29760] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.273659+0100    MyApp   nw_resolver_create_dns_service_locked [C29761] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.274663+0100    MyApp   nw_resolver_create_dns_service_locked [C29762] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.275233+0100    MyApp   nw_resolver_create_dns_service_locked [C29763] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.275813+0100    MyApp   nw_resolver_create_dns_service_locked [C29764] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.276921+0100    MyApp   nw_resolver_create_dns_service_locked [C29765] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.278096+0100    MyApp   nw_resolver_create_dns_service_locked [C29766] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.278948+0100    MyApp   nw_resolver_create_dns_service_locked [C29775] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.280069+0100    MyApp   nw_resolver_create_dns_service_locked [C29776] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.281327+0100    MyApp   nw_resolver_create_dns_service_locked [C29777] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.282205+0100    MyApp   nw_resolver_create_dns_service_locked [C29778] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.282999+0100    MyApp   nw_resolver_create_dns_service_locked [C29779] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.283580+0100    MyApp   nw_resolver_create_dns_service_locked [C29780] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.284501+0100    MyApp   nw_resolver_create_dns_service_locked [C29781] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.286073+0100    MyApp   nw_resolver_create_dns_service_locked [C29788] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.286667+0100    MyApp   nw_resolver_create_dns_service_locked [C29789] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.287760+0100    MyApp   nw_resolver_create_dns_service_locked [C29790] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.288697+0100    MyApp   nw_resolver_create_dns_service_locked [C29791] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.289472+0100    MyApp   nw_resolver_create_dns_service_locked [C29792] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.290365+0100    MyApp   nw_resolver_create_dns_service_locked [C29793] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.291999+0100    MyApp   nw_resolver_create_dns_service_locked [C29801] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.293474+0100    MyApp   nw_resolver_create_dns_service_locked [C29802] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.294349+0100    MyApp   nw_resolver_create_dns_service_locked [C29803] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.295423+0100    MyApp   nw_resolver_create_dns_service_locked [C29804] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.297020+0100    MyApp   nw_resolver_create_dns_service_locked [C29805] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.297929+0100    MyApp   nw_resolver_create_dns_service_locked [C29806] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.299973+0100    MyApp   nw_resolver_create_dns_service_locked [C29814] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.300942+0100    MyApp   nw_resolver_create_dns_service_locked [C29815] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.301518+0100    MyApp   nw_resolver_create_dns_service_locked [C29816] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.303319+0100    MyApp   nw_resolver_create_dns_service_locked [C29817] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.304447+0100    MyApp   nw_resolver_create_dns_service_locked [C29818] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.374444+0100    MyApp   nw_connection_get_connected_socket [C29819] Client called nw_connection_get_connected_socket on unconnected nw_connection
error   17:09:37.374644+0100    MyApp   TCP Conn 0x2817b6a00 Failed : error 0:-65539 [-65539]
error   17:09:37.375264+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.375571+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.375977+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.376354+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.376669+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.376986+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.377598+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.378521+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.379112+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.379523+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.379827+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]

Later...

error   17:09:37.560003+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.580106+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.580409+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.580713+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.581020+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.581325+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.581624+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.581927+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.662981+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.663283+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.663631+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.664028+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.664376+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.664755+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.665090+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.665432+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.665777+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.666107+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.666439+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.743908+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.799060+0100    MyApp   nw_resolver_create_dns_service_locked [C29857] DNSServiceGetAddrInfo failed: Unknown(-65537)
error   17:09:37.799824+0100    MyApp   nw_resolver_create_dns_service_locked [C29858] DNSServiceGetAddrInfo failed: Unknown(-65537)
error   17:09:37.800467+0100    MyApp   nw_resolver_create_dns_service_locked [C29859] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.801033+0100    MyApp   nw_resolver_create_dns_service_locked [C29860] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.801603+0100    MyApp   nw_resolver_create_dns_service_locked [C29861] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.802180+0100    MyApp   nw_resolver_create_dns_service_locked [C29862] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.802745+0100    MyApp   nw_resolver_create_dns_service_locked [C29863] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.803313+0100    MyApp   nw_resolver_create_dns_service_locked [C29864] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.804091+0100    MyApp   nw_resolver_create_dns_service_locked [C29874] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.804668+0100    MyApp   nw_resolver_create_dns_service_locked [C29875] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.805233+0100    MyApp   nw_resolver_create_dns_service_locked [C29876] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.805802+0100    MyApp   nw_resolver_create_dns_service_locked [C29877] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.806370+0100    MyApp   nw_resolver_create_dns_service_locked [C29878] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.806932+0100    MyApp   nw_resolver_create_dns_service_locked [C29879] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.807502+0100    MyApp   nw_resolver_create_dns_service_locked [C29880] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.808068+0100    MyApp   nw_resolver_create_dns_service_locked [C29881] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.808645+0100    MyApp   nw_resolver_create_dns_service_locked [C29882] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.809211+0100    MyApp   nw_resolver_create_dns_service_locked [C29883] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.809777+0100    MyApp   nw_resolver_create_dns_service_locked [C29884] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.810345+0100    MyApp   nw_resolver_create_dns_service_locked [C29885] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.901485+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.901839+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.902196+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.902527+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.902852+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.903191+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.903529+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.903848+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.904181+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.904510+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.904864+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.905194+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.905538+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.905893+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.906202+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.906529+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.906866+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.912981+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.918026+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.929966+0100    MyApp   nw_resolver_create_dns_service_locked [C29902] DNSServiceGetAddrInfo failed: Unknown(-65537)
error   17:09:37.930722+0100    MyApp   nw_resolver_create_dns_service_locked [C29903] DNSServiceGetAddrInfo failed: Unknown(-65537)
error   17:09:37.931337+0100    MyApp   nw_resolver_create_dns_service_locked [C29904] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.931911+0100    MyApp   nw_resolver_create_dns_service_locked [C29905] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.932475+0100    MyApp   nw_resolver_create_dns_service_locked [C29906] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.933039+0100    MyApp   nw_resolver_create_dns_service_locked [C29907] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.933240+0100    MyApp   nw_resolver_create_dns_service_locked [C29914] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.933819+0100    MyApp   nw_resolver_create_dns_service_locked [C29915] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.934386+0100    MyApp   nw_resolver_create_dns_service_locked [C29916] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.934966+0100    MyApp   nw_resolver_create_dns_service_locked [C29917] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.935533+0100    MyApp   nw_resolver_create_dns_service_locked [C29918] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.936104+0100    MyApp   nw_resolver_create_dns_service_locked [C29919] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.936665+0100    MyApp   nw_resolver_create_dns_service_locked [C29920] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.937233+0100    MyApp   nw_resolver_create_dns_service_locked [C29921] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.937805+0100    MyApp   nw_resolver_create_dns_service_locked [C29922] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.945795+0100    MyApp   nw_connection_get_connected_socket [C29922] Client called nw_connection_get_connected_socket on unconnected nw_connection
error   17:09:38.999588+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:38.999922+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:38.000298+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]

Later...

error   17:10:30.563154+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:30.563445+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:30.563740+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:30.564030+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:30.564331+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:30.564630+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:30.564924+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:31.898529+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:32.144762+0100    MyApp   nw_socket_connect [C35257.1:1] connectx(16, [srcif=0, srcaddr=<private>, dstaddr=<private>], SAE_ASSOCID_ANY, 0, NULL, 0, NULL, SAE_CONNID_ANY) failed: [61: Connection refused]
error   17:10:32.144828+0100    MyApp   nw_socket_connect <private> connectx failed (fd 16) [61: Connection refused]
error   17:10:32.144884+0100    MyApp   nw_socket_connect connectx failed [61: Connection refused]
error   17:10:32.153072+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:32.153362+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:32.153783+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:32.155424+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:32.156145+0100    MyApp   nw_connection_get_connected_socket [C35259] Client called nw_connection_get_connected_socket on unconnected nw_connection
error   17:10:32.156346+0100    MyApp   TCP Conn 0x2817bd440 Failed : error 0:61 [61]
error   17:10:33.271516+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:33.272726+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:33.278913+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:33.285942+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]

Later...

error   17:10:34.096239+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:34.096532+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:34.096827+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:34.097116+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:34.097414+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:34.097708+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:34.098004+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:35.816966+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:35.817272+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.050535+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.051439+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.051804+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.052109+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.052398+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.052694+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.052989+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.053281+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.053576+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.053900+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.054222+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.054553+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.054884+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.055226+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.055583+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.055923+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.056241+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.056566+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.056895+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.057221+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.057526+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.057820+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.058268+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.058896+0100    MyApp   nw_connection_get_connected_socket [C35675] Client called nw_connection_get_connected_socket on unconnected nw_connection
error   17:10:36.059063+0100    MyApp   TCP Conn 0x2818da4c0 Failed : error 0:61 [61]
error   17:10:36.167032+0100    MyApp   nw_socket_connect [C35676.1:1] connectx(16, [srcif=0, srcaddr=<private>, dstaddr=<private>], SAE_ASSOCID_ANY, 0, NULL, 0, NULL, SAE_CONNID_ANY) failed: [61: Connection refused]
error   17:10:36.167088+0100    MyApp   nw_socket_connect <private> connectx failed (fd 16) [61: Connection refused]
error   17:10:36.167164+0100    MyApp   nw_socket_connect connectx failed [61: Connection refused]

react native iOS: Could not connect to development server

$
0
0

I have an issue while debug my app which is build by react native. Whenever i started to build, it gives me error that could not connect to development server. I tried various solutions like upgrading npm, clearing watchman cache, restarting npm. None of them is working. Any help is most welcome!!!

React native: how to get file size, mime type and extension?

$
0
0

I know react-native-fs and react-native-fetch-blob, but I'm missing simple helper functions like getFileInfo(file).

Desired pseudo code:

let fileInfo = getFileInfo('path/to/my/file.txt');
console.log('file size: ' + fileInfo.size);
console.log('mime type: ' + fileInfo.type);
console.log('extension: ' + fileInfo.extension);

What's the proper way to get the file size, mime type and extension?

Thanks in advance!

Register.h file not found in TfliteReactNative.h iOS

$
0
0

I'm working on a react native project and added Tensorflowlite through pod in it. I have added pod necessary lib in link binary with libraries enter image description here and also added it's search path like

enter image description here

but still getting an error

enter image description here

Any help would be much appreciated.

How to run multiple react native ios app in simulator

$
0
0

How can we run multiple react-native apps (cli instead of expo) on iOS simulator at once?

Apparently, whenever I try to do so I am welcomed with an error saying

Invariant Violation: Native module cannot be null

react native ios build succeeds but path to app bundle is wrong

$
0
0

When I run react-native run-ios build succeeds and created build folder under ios. But after build, when installation starts, get the below error. The project runs successfully when I run it through xcode. What I observed is that path beginning 'DerivedData' is wrong. Instead it should be 'build'. When I rename my 'build' folder to 'DerivedData' and re-run 'react-native run-ios' the whole process completes successfully but of course with the previous build.

How can I change the 'DerivedData' to 'build'?

This error occurred immediately after I upgraded from 0.59.9 to 0.60.0.

Error: info Installing "DerivedData/Build/Products/Debug-iphonesimulator/mobileappname.app" An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2): Failed to install the requested application An application bundle was not found at the provided path. Provide a valid path to the desired application bundle. Print: Entry, ":CFBundleIdentifier", Does Not Exist error Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier DerivedData/Build/Products/Debug-iphonesimulator/mobileappname.app/Info.plist Print: Entry, ":CFBundleIdentifier", Does Not Exist . Run CLI with --verbose flag for more details. Error: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier DerivedData/Build/Products/Debug-iphonesimulator/mobileappname.app/Info.plist Print: Entry, ":CFBundleIdentifier", Does Not Exist

at checkExecSyncError (child_process.js:616:11) at Object.execFileSync (child_process.js:634:13) at runOnSimulator (/Users/armaneker/WebstormProjects/mobileappname/node_modules/@react-native-community/cli-platform-ios/build/commands/runIOS/index.js:189:45) at process._tickCallback (internal/process/next_tick.js:68:7)

React Native version: System: OS: macOS 10.15 Binaries: Node: 10.15.3 - /usr/local/bin/node npm: 6.13.1 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 13.0, DriverKit 19.0, macOS 10.15, tvOS 13.0, watchOS 6.0 Xcode: 11.0/11A420a - /usr/bin/xcodebuild npmPackages: react: 16.8.6 => 16.8.6 react-native: 0.60.0 => 0.60.0 npmGlobalPackages: create-react-native-app: 1.0.0 react-native-cli: 2.0.1 react-native-git-upgrade: 0.2.7

Steps To Reproduce

  • used rn-diff-purge to upgrade from 0.59.9 to 0.60.0
  • android worked correctly
  • react-native run-ios build succeeded but installation of app failed

How to fix pod install error glog is too old or missing react native ios in windows 10

$
0
0

I wanted to detach expo in my expo project to get the bare react native project after expo detach i run pod install bring me this error that during installing glog that script is too old or is missing

[!] C:/Program Files/Git/usr/bin/bash.exe -c
set -e
#!/bin/bash
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

set -e

PLATFORM_NAME="${PLATFORM_NAME:-iphoneos}"
CURRENT_ARCH="${CURRENT_ARCH}"

if [ -z "$CURRENT_ARCH" ] || [ "$CURRENT_ARCH" == "undefined_arch" ]; then
    # Xcode 10 beta sets CURRENT_ARCH to "undefined_arch", this leads to incorrect linker arg.
    # it's better to rely on platform name as fallback because architecture differs between simulator and device

    if [[ "$PLATFORM_NAME" == *"simulator"* ]]; then
        CURRENT_ARCH="x86_64"
    else
        CURRENT_ARCH="armv7"
    fi
fi

export CC="$(xcrun -find -sdk $PLATFORM_NAME cc) -arch $CURRENT_ARCH -isysroot $(xcrun -sdk $PLATFORM_NAME --show-sdk-path)"
export CXX="$CC"

# Remove automake symlink if it exists
if [ -h "test-driver" ]; then
    rm test-driver
fi

./configure --host arm-apple-darwin

# Fix build for tvOS
cat << EOF >> src/config.h

/* Add in so we have Apple Target Conditionals */
#ifdef __APPLE__
#include <TargetConditionals.h>
#include <Availability.h>
#endif

/* Special configuration for AppleTVOS */
#if TARGET_OS_TV
#undef HAVE_SYSCALL_H
#undef HAVE_SYS_SYSCALL_H
#undef OS_MACOSX
#endif

/* Special configuration for ucontext */
#undef HAVE_UCONTEXT_H
#undef PC_FROM_UCONTEXT
#if defined(__x86_64__)
#define PC_FROM_UCONTEXT uc_mcontext->__ss.__rip
#elif defined(__i386__)
#define PC_FROM_UCONTEXT uc_mcontext->__ss.__eip
#endif
EOF

# Prepare exported header include
EXPORTED_INCLUDE_DIR="exported/glog"
mkdir -p exported/glog
cp -f src/glog/log_severity.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/logging.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/raw_logging.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/stl_logging.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/vlog_is_on.h "$EXPORTED_INCLUDE_DIR/"

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-apple-darwin-strip... no
checking for strip... no
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... no
checking whether make supports nested variables... no
checking for arm-apple-darwin-gcc...  -arch armv7 -isysroot
checking whether the C compiler works... no
/usr/bin/bash: line 24: xcrun: command not found
/usr/bin/bash: line 24: xcrun: command not found
/c/Users/DOZEN/Library/Caches/CocoaPods/Pods/External/glog/2263bd123499e5b93b5efe24871be317-aefd1/missing: Unknown `--is-lightweight' option
Try `/c/Users/DOZEN/Library/Caches/CocoaPods/Pods/External/glog/2263bd123499e5b93b5efe24871be317-aefd1/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
configure: error: in `/c/Users/DOZEN/Library/Caches/CocoaPods/Pods/External/glog/2263bd123499e5b93b5efe24871be317-aefd1':
configure: error: C compiler cannot create executables
See `config.log' for more details

i use react-native: 0.59.10 and my podfile

platform :ios, '10.0'

require_relative '../node_modules/react-native-unimodules/cocoapods'

target 'UdahiliPortal' do
  # Pods for UdahiliPortal
  pod 'React', :path => '../node_modules/react-native', :subspecs => [
    'Core',
    'CxxBridge',
    'DevSupport',
    'RCTActionSheet',
    'RCTAnimation',
    'RCTBlob',
    'RCTGeolocation',
    'RCTImage',
    'RCTLinkingIOS',
    'RCTNetwork',
    'RCTSettings',
    'RCTText',
    'RCTVibration',
    'RCTWebSocket',
  ]

  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'
  pod 'RNGestureHandler', :podspec => '../node_modules/react-native-gesture-handler/RNGestureHandler.podspec'
  pod 'RNReanimated', :podspec => '../node_modules/react-native-reanimated/RNReanimated.podspec'
  pod 'RNScreens', :path => '../node_modules/react-native-screens'


  use_unimodules!

end

in Mac I find out thy fix this error by

sudo xcode-select --switch /Applications/Xcode.app

but this does not work on window help please

React/RCTBundleURLProvider.h file not found while adding extension


My react native encountered a problem while building tvOS but iOS succeeded

$
0
0

I followed the link below to install new reactNative App ..

https://facebook.github.io/react-native/docs/getting-started

After Successfully Installed I am able to run the iOS target but not tvOS while running tvOS I am getting below error ..

Library not found for -lPods-AwesomeProject-tvOS

It seems in podfile cocoapods not included for tvos target .. So I added cocoaPods for tvos target and then build again but getting below warning and errors..

enter image description here

I am also adding my Podfile here please suggest any changes

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

  pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
  pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
  pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
  pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
  pod 'React', :path => '../node_modules/react-native/'
  pod 'React-Core', :path => '../node_modules/react-native/'
  pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
  pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
  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-Core/RCTWebSocket', :path => '../node_modules/react-native/'

  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 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"
  pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
  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'

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

  use_native_modules!
end

target 'ReactNativeSample-tvOS' do
  # Pods for ReactNativeSample-tvOS
platform :tvos, '9.2'

All same pods in above target included here as well..

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

end ```

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

$
0
0

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 native development) and I don't know how to add this key to Info.plist

Can you post an example? Thanks

I am using npm package "react-native-camera-roll-picker": "^1.1.7"

enter image description here

react-native: command not found

$
0
0

I am getting -bash: react-native: command not found error while creating react-native project.

Below are the additional info

1. brew --version
   homebrew 0.9.9
2  brew info watchman
   watchman `enter code here`stable 4.50
   /usr/local/Cellar/watchman/4.4.0
3. brew info flow
   stable 0.24.1
   /usr/local/Cellar/flow/0.24.1
4. brew info node
   stable 6.1.0
   /usr/local/Cellar/node/6.1.0
5. npm -version
   3.8.6
6. echo $PATH
/Users/Ashok/.rbenv/shims:/Users/Ashok/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

I tried suggested steps from the below link but still i am getting same error.

  1. react-native-command-not-found

I don't have any "npm" directory which they have specified in the solution

Ashoks-MacBook-Pro:share Ashok$ ls
aclocal     doc     info        ruby-build  zsh
autoconf    emacs       man     systemtap

But i found npm file exist in below location.

/usr/local/Cellar/node/6.1.0/etc/bash_completion.d

I uninstalled react-native and installed again but still i am facing same issue.

React-native formik form refs are always null

$
0
0

I have a component with an TextInput & Text :

const InputWithMessage = ({ label, formikProps, formikKey,ref, ...rest }) => {
  if (formikProps.touched[formikKey] && formikProps.errors[formikKey]) {
    styles.inputStyles.borderColor = 'red';
  }
  return (
    <View style={styles.inputStyles}>
      <TextField
        lineWidth={0}
        activeLineWidth={0}
        style={styles.textFieldStyles}
        label={label}
        ref={ref}
        tintColor={
          formikProps.touched[formikKey] && formikProps.errors[formikKey]
            ? colors.red
            : colors.primary
        }
        onChangeText={e => formikProps.setFieldValue(formikKey, e)}
        onBlur={formikProps.handleBlur(formikKey)}
        {...rest}
      /> .....  

This component is used in a formik form with refs to go from one input to another :

<View style={{width: '50%',marginRight: 1}}>
                    <InputWithMessage
                      formikProps={formikProps}
                      formikKey="firstName"
                      value={formikProps.values.firstName}
                      placeholder="Prénom*"
                      returnKeyType="next"
                      ref={this.firstName}
                      onSubmitEditing={() => {
                         this.birthName.current.focus()
                       }}
                      blurOnSubmit={false}
                      keyboardType='default'
                      autoFocus
                    /> ....  

I shove my refs like this in the constructor: this.birthName = React.createRef();

Except that my dreams are all the time null and so the focus can not be done...

any ideas?

How to play Youtube videos using Expo

$
0
0

I am trying to use the react-native-youtube component in my expo project. However, I couldn't get it to work. All I have so far is a black screen with red borders. I tried following the video instructions on online however, expo doesn't have an iOS or Android folder, which means I can't open it in XCode and fiddle with it. How can I play youtube videos using expo? As you might have noticed from my question I'm new to react-native using expo.

Viewing all 16565 articles
Browse latest View live