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

How to handle memory warnings in React Native iOS?

$
0
0

I'm implementing a native iOS map component in Swift to be used in my React Native app. It lazy loads tiles onto the map as the user zooms / pans around, which causes the memory usage to gradually increase.

Occasionally, the memory usage gets too high and I need to clear the tile cache to bring it back down. In iOS, I understand that you can implement didReceiveMemoryWarning in the UIViewController to release some memory, but native iOS components for React Native don't have a UIViewController, only a UIView.

I've tried listening for memory warnings at the React Native level (suggested here), and then calling a native method exposed by RCT_EXTERN_METHOD to free up some memory. However, I'd rather the native component take care of itself in terms of cleaning up memory.

TL;DR

How do I handle memory warnings at the iOS level for a React Native "native iOS" component?


Error trying to install react native, not building correctly when running pod install

$
0
0

I am trying to learn react native, and I'm running into an issue when trying to to install dependencies. I have installed CocoaPods and followed all steps via the documentation. I am unsure why I am getting this error. When running pod install and pod install --repo-update I am getting the following output:

tyler@Tylers-MacBook-Pro ios % pod install --repo-update     
Updating local specs repositories
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
Fetching podspec for `Folly` from `../node_modules/react-native/third-party-podspecs/Folly.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
Downloading dependencies
Installing DoubleConversion (1.1.6)
Installing FBLazyVector (0.61.5)
Installing FBReactNativeSpec (0.61.5)
Installing Folly (2018.10.22.00)
Installing RCTRequired (0.61.5)
Installing RCTTypeSafety (0.61.5)
Installing React (0.61.5)
Installing React-Core (0.61.5)
Installing React-CoreModules (0.61.5)
Installing React-RCTActionSheet (0.61.5)
Installing React-RCTAnimation (0.61.5)
Installing React-RCTBlob (0.61.5)
Installing React-RCTImage (0.61.5)
Installing React-RCTLinking (0.61.5)
Installing React-RCTNetwork (0.61.5)
Installing React-RCTSettings (0.61.5)
Installing React-RCTText (0.61.5)
Installing React-RCTVibration (0.61.5)
Installing React-cxxreact (0.61.5)
Installing React-jsi (0.61.5)
Installing React-jsiexecutor (0.61.5)
Installing React-jsinspector (0.61.5)
Installing ReactCommon (0.61.5)
Installing Yoga (1.14.0)
Installing boost-for-react-native (1.63.0)
Installing glog (0.3.5)
[!] /bin/bash -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... strip
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for arm-apple-darwin-gcc... /Library/Developer/CommandLineTools/usr/bin/cc -arch armv7 -isysroot 
checking whether the C compiler works... no
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: unable to lookup item 'Path' in SDK 'iphoneos'
/Users/tyler/Library/Caches/CocoaPods/Pods/External/glog/2263bd123499e5b93b5efe24871be317-1f3da/missing: Unknown `--is-lightweight' option
Try `/Users/tyler/Library/Caches/CocoaPods/Pods/External/glog/2263bd123499e5b93b5efe24871be317-1f3da/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
configure: error: in `/Users/tyler/Library/Caches/CocoaPods/Pods/External/glog/2263bd123499e5b93b5efe24871be317-1f3da':
configure: error: C compiler cannot create executables
See `config.log' for more details

I have tried googling this problem but have had no luck. Any help is greatly appreciated it!

On Application Resume From Background To Foreground, App Restarts From First Navigation Screen

$
0
0

I have following navigation stack

const AppNavigator = createStackNavigator({
    AppSplashScreen: AppSplashScreen,
    LanguageScreen: LanguageScreen,
    WalkthroughScreen: WalkthroughScreen,
    LoginScreen: LoginScreen,
    ForgotPasswordScreen: ForgotPasswordScreen,
    ResetPasswordScreen: ResetPasswordScreen,
    RegistrationTypeScreen: RegistrationTypeScreen,
    RegistrationFormScreen: RegistrationFormScreen,
    OTPConfirmationScreen: OTPConfirmationScreen,
    BottomTabNavigator: BottomTabNavigator
}, {
    headerMode: 'none',
    cardStyle: { backgroundColor: '#000000' },
});

const AppContainer = createAppContainer(AppNavigator);

export default App;

I am displaying splash screen video when the first app opens.

Here is what my AppSplashScreen looks like

import React, { Component } from 'react';
import { View } from 'react-native';
import SplashScreen from 'react-native-splash-screen';
import Video from 'react-native-video';
import { VIDEO_SPLASH_2 } from '../assets/videos/index';

export default class AppSplashScreen extends Component {

    state = {
        displayVideoPlayer: true,
        firstLaunch: false
    }

    componentDidMount() {
        SplashScreen.hide();
    }

    componentWillUnmount() {
        this.setState({
            displayVideoPlayer: false
        });
    }

    isFirstLaunch() {
        let firstLaunch = true;
        if (true === storage.get('APP_ALREADY_LAUNCHED')) {
            firstLaunch = false;
        } else {
            storage.set('APP_ALREADY_LAUNCHED', true);
            firstLaunch = true;
        }
        return firstLaunch;
    }

    didCompleteVideoPlayback() {
        if (true === this.state.displayVideoPlayer) {
            this.setState({
                displayVideoPlayer: false
            });
        }
        const currentRouteName = this.props.navigation.state.routeName;
        if ('AppSplashScreen' !== currentRouteName) {
            return false;
        }
        if (true === global.SKIP_SPLASH_SCREEN_REDIRECT) {
            return false;
        }
        if (this.isFirstLaunch()) {
            this.props.navigation.navigate('LanguageScreen');
            return false;
        }
        this.props.navigation.navigate('HomeScreen');
    }

    render() {
        return (
            <View style={{flex: 1, backgroundColor: '#000000', alignItems: 'center', justifyContent: 'center'}}>
                {true === this.state.displayVideoPlayer &&
                    <Video
                        source={VIDEO_SPLASH_2}
                        muted={true}
                        repeat={false}
                        playInBackground={false}
                        resizeMode="contain"
                        onEnd={() => this.didCompleteVideoPlayback()}
                        style={{height: '100%', width: '100%', backgroundColor: '#000000'}}
                    />
                }
            </View>
        );
    }
}

My issue is, whenever I put the application in Background, and resume after 30 seconds, it always starts with AppSplashScreen whereas I expect it to resume from the last screen. It works correctly if I open it before 30 seconds. I assume somewhere it is killing the memory and starting the app from start when I resume after 30 second.

What could be the issue here. Or is there another workaround to resume the app in the same screen where the user left off.

How to extend UIViewController for React Native iOS UI component?

$
0
0

I want to implement a custom UIViewController for my React Native "native iOS" UI component, as I need to override methods such as didReceiveMemoryWarning. How do I do this given the React Native docs make no mention of UIViewController?

Alert.alert not working in React native iOS, but perfectly fine in Android

$
0
0

Please check the code ,

import { 
  Alert,
} from 'react-native';

 checkForSendingOtp = () => {
    let hash = 'aBcDeGgd';
    Platform.OS === 'android'
     ? RNOtpVerify.getHash()
        .then(text => {
          hash = text + ''.replace('[', '');
          hash = hash + ''.replace(']', '');
        })
        .then(() => {
          this.sendDataForOtp(hash);
        })
        .catch(console.log)
    : this.sendDataForOtp(hash);
  };

sendDataForOtp(hash) {

axios.post(url,{hash:hash}).then(response=>{
  Alert.alert(
    'Login Failed',
    'Multiple Logins Are Found. \n Logout From All Other Devices to Continue.',
    [
      {
        text: 'Proceed ?',
        onPress: () => {}                       
      },
      {
        text: 'No',
        onPress: () => {},
      },
    ],
    {cancelable: false},
   );
  });
}


render() {
   return (
    <Ripple
        style={{
           position: 'absolute',
           top: 0,
           bottom: 0,
           left: 0,
           right: 0,
              }}
        onPress={this.checkForSendingOtp}
    />
)}

This snippet will work fine in android but not showing in iOS. why ?

Nb :- this is the most of the code that I can share right now , Edited the code please check it now and let me know if you have any questions.

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

$
0
0

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

My Questions Are:

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

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

UPDATE:

Based on @Simon's answer, I have one more question:

3) What determines the default version that a given project has?

photo download in react native iOS is too slow

$
0
0

I need to download 1000s of photos in react native for offline use. I use RNFetchBlob for android and RNFS for iOS to download all photos.

for android

       RNFetchBlob.config({
            path: `${Path.path}${fileName}.${type}`,
            fileCache: true
        }).fetch('GET', result, {})
        .progress((received, total) => {

        }).then(async res => {
            deletePhoto(id)
            console.log('downloaded', res)
        }).catch((error) => {
            downloadFile(fileName, result, type, id)
            console.log('error in file download', id)
        })

for iOS

        RNFS.downloadFile({
            fromUrl: result,
            toFile:`${Path.path}${fileName}.${type}`,
            background: true,
            connectionTimeout: 1000 * 10,
            readTimeout: 1000 * 10,
            discretionary: true,
            progressDivider: 1,
            progress: (res) => {
            // do progress
            }
        }).promise.then((result) => {
            console.log('downloaded', result)
        })
        .catch(error => {
            console.log('error in file download', error)
        })

Problem

Time taken for downloading 800 files is for android - 2-3 minute depends on network-bandwidth and for iOS 20 minutes I don't know what i am doing wrong.

Any help will be useful to me thanks in advance

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

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

/node_modules/react-native/scripts/react-native-xcode.sh:

# Enables iOS devices to get the IP address of the machine running Metro Bundler
if [[ "$CONFIGURATION" = *Debug* && ! "$PLATFORM_NAME" == *simulator ]]; then
  IP=$(ipconfig getifaddr en0)
  if [ -z "$IP" ]; then
    IP=$(ifconfig | grep 'inet ' | grep -v ' 127.' | cut -d\   -f2  | awk 'NR==1{print $1}')
  fi

  echo "$IP"> "$DEST/ip.txt"
fi

Network interfaces:

$ ifconfig | grep 'inet '
inet 127.0.0.1 netmask 0xff000000 <- Localhost
inet xxx.xxx.xxx.xxx netmask 0xfffff800 broadcast 10.10.7.255 <- Cable (en0)
inet yyy.yyy.yyy.yyy netmask 0xfffff800 broadcast 10.10.55.255 <- Wireless (en1)
inet 169.254.174.6 netmask 0xffff0000 broadcast 169.254.255.255 <- RN Packager

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]

How to reduce the size of my react native app? It's over 1Gb

$
0
0

I have developed my app on react native, and i dont want people on the iOS app market downloading an app thats over 1Gb in size. Mine is currently 1.3Gb!

Some of the biggest culprits:

  • Node Module folder (600 Mb). How do i know which modules are DEFINITELY not needed (I wouldn't want to break anything in the app).

  • ios/build/projectname/Build/Products/Debug-iphonesimulator (145 Mb) folder

  • ios/build/projectname/ModuleCache.noindex (86 Mb)folder

  • ios/build/projectname/Build/Intermediates.noindex (86 Mb) folder

Can i delete some of these?

Thanks

React Native Build Error After Updating to Recommended Settings

$
0
0

I have created a new React Native project. When I build it in Xcode I get 180+ warnings but it builds just fine. Most of the warnings are Update to recommended settings. I have gone through and updated them as another question on here suggested. However, when I update to the recommended settings on the RCTText library I now get a build error. Updating did not result in any code changes so I cannot revert. The error says the following:

RCTText
Semantic Issue
Implementing unavailable method
RCTUITextView.m
Method 'setText:' declared here

This is the line of text it doesn't like.

- (void)setText:(NSString *)text

Since this is code in a library, I'm not sure how to handle it and I can't find any information on how to revert changes that were made during an "update to recommended settings."

Here are the versions I am running.

react-native: 0.56.0
xcode: 9.4.1

Play Dash or .mpd videos react-native(IOS)

$
0
0

I am working on an app which have a media server and this media server provide me the URL's of different video files and these videos are in dash format or .mpd format. I go through react-native-video and it have exo-player on android which already have a support of dash, I have tested exo-player on andriod and it works but on the other hand it uses AVPlayer for IOS which don't have any support of dash. I spent some time to find some solution on IOS side which could also support React-Native android and IOS but didn't find a proper way, Found two solutions but not works for both.

dash.js - https://github.com/Dash-Industry-Forum/dash.js/wiki

Google Shaka Player - https://github.com/google/shaka-playerdash.js have only support for web and shaka-player have some embeded solution available on IOS and which i have bridge and then i can use.

I am looking for some quick work around on react-native, Is there any player available which can play dash on both platforms or any other work around that can work for me.

react-native-google-places-autocomplete not working on React native 0.61

$
0
0

I have added react-native-google-places-autocomplete with yarn in my react-native cli project but it is not working. Here are the issues I am facing at the moment.

  1. the places drop down is not showing up on IOS, however the input text field allows me to enter a place name but the predictions list does not appear

  2. onPress handler is not triggered at all on both IOS and android

  3. The Text Input coming from react-native-google-places-autocomplete does not allow me to enter anything on ANDROID. It is like disabled all the time ( although the focus is set to true)

Note: all google location apis are enabled , google maps api, places api and geocode api are enabled and a valid api key is given.

I tried all possible solutions available including the following:

  1. setting zIndex: 1000 a high value to avoid it being hidden behind some other view

  2. Tried creating new RN App and added only this component to keep the project clean

  3. Regenerating the API and even using another api which works with previous versions of REACT NATIVE.

The logs don't show anything on both Xcode and Android Studio. Here is the code snippet:

<View style = {[{zIndex: 2, backgroundColor: 'white'}]}>
                <GooglePlacesAutocomplete
                    ref = {ref => setSearchTextRef(ref)}
                    placeholder='Search for gym'
                    styles={{
                        container: {backgroundColor: 'transparent'},
                        textInputContainer: styles.viewStyle,
                        textInput: styles.textInputStyle,
                    }}
                    keyboardShouldPersistTaps = {'handled'}
                    listUnderlayColor = {'transparent'}
                    textInputProps = {{
                        onFocus: () => focusInput(),
                        onBlur: () => blurInput(),
                        onChangeText: (text) => onChange(text)
                    }}
                    minLength={1} // minimum length of text to search
                    returnKeyType={'search'}
                    listViewDisplayed={'auto'}   // true/false/undefined
                    fetchDetails={true}
                    renderDescription={row => row.description} // custom description render
                    onPress={(data, details = null) => {
                        let coordinates = details.geometry.location;
                        sendCoordinates(coordinates, {data, details});
                    }}
                    getDefaultValue={() => ''}
                    query={{
                        key: googleAPIKey,
                        language: 'en', // language of the results
                        // types: '(cities)' // default: 'geocode'
                    }}
                    nearbyPlacesAPI='GooglePlacesSearch' // Which API to use: GoogleReverseGeocoding or GooglePlacesSearch
                    GooglePlacesSearchQuery={{
                        rankby: 'distance',
                        types: 'gym'
                    }}
                    filterReverseGeocodingByTypes={['locality', 'administrative_area_level_3']} 
                    debounce={200}
                />
            </View>

Thank you in advance

RNCamera - onFaceDetectionError not working in both Android and iOS

$
0
0

I am not able to find not detecting the face scenario using RNCamera.

dependencies: "react-native": "0.61.5", "react-native-camera": "git+https://git@github.com/react-native-community/react-native-camera.git",

this is how I am using the RNCamera, ....

<RNCamera 
      ref={ref => {this.camera = ref}}
      type={RNCamera.Constants.Type.front}
      onFacesDetected={this.handleFaceDetected}
      onFaceDetectionError = {this.faceDetectionError}
    </RNCamera>
    ...
    handleFaceDetected = (faces) => {
            console.log('face detected!')
        }

    faceDetectionError = (error) => {
            console.log('face Not detected!')
        }

I also faced that even though the camera is not in front of any faces, in some of the android devices it is triggering the onFacesDetected method.

Any help in this is much thankful. Thanks in advance.

TypeError: undefined is not an object (evaluating '_rxjs.queueScheduler.constructor')

$
0
0

We have developed a react-native application using react-redux in ubuntu. We are trying to build an IPA from a mac system using the same code.but we are unable to run the application and getting an error in the simulator

enter image description here

How to fix"AIRMap" was not found in the UIManager error in react native?

$
0
0

Unhandled JS Exception: Invariant Violation: requireNativeComponent: "AIRMap" was not found in the UIManager.

This error is located at: in AIRMap (at MapView.js:760) in MapView (at App.js:25) in RCTView (at View.js:43) in App (at renderApplication.js:32) in RCTView (at View.js:43) in RCTView (at View.js:43) in AppContainer (at renderApplication.js:31)

how to fix this error in react native ios ?


how to change the textCoor of ID.AM1,ID.AM2 etc in react native chart wrapper?

$
0
0

Below is my code , i am using react native chart wrapper i want to change the color of valueFormatter "ID.AM-1","ID.AM-2","ID.AM-3","ID.AM-4","ID.AM-5"& "ID.AM-6" at corner of spider chart How may i achieve this ? this is radar chart of attached code in react native chart wrapper below is the spider chart of react native chart wrapper in ios

constructor() {
    super();
    this.state = {
        data: {},
        legend: {
            enabled: false,
            textSize: 30,
            form: 'CIRCLE',
            wordWrapEnabled: true
        }
    };
}

componentDidMount() {
    this.setState(
        update(this.state, {
            data: {
                $set: {
                    dataSets: [{
                        values: [4.00,4.00,4.00,4.00,4.00,4.00],
                        label: 'Identify',
                        config: {
                            drawFilled: true,
                            fillColor: processColor('#146294'),
                            fillAlpha: 200,
                            lineWidth: 1,
                            drawValues:false,
                            valueTextColor:processColor('white')
                        }
                    }, ],
                }
            },
            xAxis: {
                $set: {
                    valueFormatter: ["ID.AM-1","ID.AM-2","ID.AM-3","ID.AM-4","ID.AM-5","ID.AM-6"]
                }
            }
        })
    );
}



render() {
    return (
        <View style={{ flex: 1, backgroundColor:'gray', borderColor: '#43464B', borderWidth: Dimension(6), borderRadius: Dimension(10), marginLeft: Dimension(50), marginRight: Dimension(50), marginTop: Dimension(30) }}>
            <View style={{ backgroundColor: '#1E2026', borderColor: '#43464B', borderBottomWidth: Dimension(6), height: Dimension(100), justifyContent: 'center', alignItems: 'center' }}>
                <Text style={{ fontSize: (18), color: 'white', alignSelf: 'flex-start', marginLeft: Dimension(24) }}>{this.props.title}</Text>
            </View>
            <RadarChart
                style={styles.chart}
                data={this.state.data}
                xAxis={this.state.xAxis}
                yAxis={{ drawLabels: true }}
                legend={this.state.legend}
                drawWeb={true}
                webLineWidth={1}
                webLineWidthInner={1}
                webAlpha={255}
                webColor={processColor("white")}
                webColorInner={processColor("white")}
                skipWebLineCount={1}
            />
        </View>

    );
}

iOS build fails on installing react-native-siri-shortcut

$
0
0

As soon as I install react-native-siri-shortcut library and podfile, and run for ios, the terminal gives tons of errors.

I deleted node_modules multiple times, reset the metro bundler cache a number of times, deleted watchman a couple of times, but no luck.

Below is the error I am receiving. The following build commands failed: Ld build/<project_name>/Build/Products/Debug-iphonesimulator/<project>.app/<project> normal x86_64

Build Environment

"react": "16.8.6",

"react-native": "0.60.0", (Project boilerplate version)

Any help will be appreciated.

Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65

$
0
0

ERROR => Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening fastly.xcworkspace.*

I've ask for this here: https://github.com/oblador/react-native-vector-icons/issues/1144 but I haven't any answers.

I got this error when I run react-native run-ios:

IMAGE =>https://i.imgur.com/OORjgTe.png

My podfile

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

target 'fastly' do
  # Pods for fastly
  pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
  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 'fastlyTests' do
    inherit! :search_paths
    # Pods for testing
  end

  use_native_modules!
end

target 'fastly-tvOS' do
  # Pods for fastly-tvOS

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

end

Things I've do

  • npm i react-native-vector-icons —s
  • I've open the project with Xcode, then I created a new Group into the project name folder, it called Fonts, then I drag all fonts I'll use for the project, Finally I goes to info.plist file and create a new key Fonts provided by application, then created items with respective fonts names.
  • Run Shift + Command + K to clean last build <= That into Xcode.
  • I follow all the steps is at Readme.md and I can't fix it, help pls.

XD

Also I've clean cache, run pod install, pod update, and can't get it works. I paste this pod 'RNVectorIcons', :path =>'../node_modules/react-native-vector-icons' into Podfile, but I think it's doesn't needed because I am using RN > 0.60. Help me please, I don't know what to do lol.

How can I regenerate ios folder in React Native project?

$
0
0

So a while ago I deleted the /ios directory in my react native app (let's call it X). I've been developing and testing using the android emulator but now I'd like to make sure it works on ios with xcode simulator etc.

So my current idea is to create a new react native bare project (let's call it Y) with ios folder, then follow these steps to rename Y so that it has the name of X and then moving the /ios directory from Y into X and trying to run-ios.

I'll update here how that goes, but I wondered if there is a better way and has nobody been in this situation before?

I've googled lots of things 'regenerate ios folder''deleted ios folder''add ios folder to existing..' and nothing helpful. Maybe my googlefu isn't good enough but if anyone has any suggestions, much appreciated.

Step 2 will be making sure it compiles because of dependencies and stuff but for now my goal is to just get the /ios folder back in the project and for React Native to be aware of it's existence (it has all the necessary config).

Thanks

React native Firebase iOS Production not working by sending noti to FCM single device

$
0
0

I'm doing a React native project with notification, using APNs Authentication Key . It works perfectly fine on android and iOS dev.

But when I export ipa as adHoc run on device, the app stop receiving notification when I send noti to a single device using FCM. It only works if I send to all iOS devices.

Viewing all 16571 articles
Browse latest View live


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