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

How to install expo CLI on macbook pro big sur?

$
0
0

I an having issue regarding the installation of expo on the new mac.When I run this command:

npm install --global expo-cli

I have the error:

npm ERR! code EACCESnpm ERR! syscall accessnpm ERR! path /usr/local/lib/node_modulesnpm ERR! errno -13npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'npm ERR!  [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] {npm ERR!   errno: -13,npm ERR!   code: 'EACCES',npm ERR!   syscall: 'access',npm ERR!   path: '/usr/local/lib/node_modules'npm ERR! }npm ERR! npm ERR! The operation was rejected by your operating system.npm ERR! It is likely you do not have the permissions to access this file as the current usernpm ERR! npm ERR! If you believe this might be a permissions issue, please double-check thenpm ERR! permissions of the file and its containing directories, or try runningnpm ERR! the command again as root/Administrator.npm ERR! A complete log of this run can be found in:npm ERR!     /Users/theowatine/.npm/_logs/2020-11-21T09_26_14_033Z-debug.log

Does anyone know what could be the solution? Thank you for your help!


How can I run background tasks in React Native?

$
0
0

I've built a little iOS app in React Native that does location tracking, sending the lat/lng regularly to a server of the user's choosing. However this only works when the app is in the foreground. How can I run this task in the background when the user is in other apps?

React Native IOS Ajax takes much longer than Android

$
0
0

React Native version 0.63

upload of ~2mb image takes 10s in android and more than minute in IOSI am using axios

Unable to fix network request error for accessing local js bundle in react native IOS FAILS 100%

$
0
0

I am trying to get my app working on iOS. I have a working app in android in react-native, however when I try to run the same in react-native I get the following 100% of the time it tries to make a fetch call (endpoint is https)

[Fri Jun 25 2021 10:04:42.266] WARN Possible Unhandled Promise Rejection (id: 3):TypeError: Network request failedhttp://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:31691:33_callTimer@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:32528:17callTimers@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:32734:19__callFunction@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:2719:49http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:2441:31__guard@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:2673:15callFunctionReturnFlushedQueue@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:2440:21callFunctionReturnFlushedQueue@[native code]

I have tried adding the following to my plist file but still it does not help. If anyone has any insight that would be amazing

<key>NSAppTransportSecurity</key><dict><key>NSExceptionDomains</key><dict><key>localhost</key></dict><key>NSAllowsLocalNetworking</key><true/><key>NSAllowsArbitraryLoadsForMedia</key><true/><key>NSAllowsArbitraryLoadsInWebContent</key><true/><key>NSAllowsArbitraryLoads</key><true/></dict>

Is it possible to open Date & Time settings from iOS app in React Native

$
0
0

I have a React Native app built with Expo. The app requires that user should have Date & Time set as Set Automatically.

  1. Is there a way to fetch/check the current settings. Based on this, I want to show user a modal and ask them to change the settings.

  2. On the modal, I want to have a button, and onPress of that button, I want to open the Date & Time settings for the user. Is there a built in way with React Native or some plugin that allows me to do this?

Currently the app is only on iOS, so I am not concerned about android implementations.

can i code an Android App then build an IOS app with react-native

$
0
0

I'm start learning react-native and i'm having some trouble setting-up the environment, and i have some questions regarding that:

First when i write:

npx react-native init new_app

I get an error, that error says try:

cd ./new_app/ios && pod install

Then I get the following error:

checking for a BSD-compatible install... /usr/bin/install -cchecking whether build environment is sane... yeschecking for arm-apple-darwin-strip... nochecking for strip... stripchecking for a thread-safe mkdir -p... ./install-sh -c -dchecking for gawk... nochecking for mawk... nochecking for nawk... nochecking for awk... awkchecking whether make sets $(MAKE)... yeschecking whether make supports nested variables... yeschecking for arm-apple-darwin-gcc... /Library/Developer/CommandLineTools/usr/bin/cc -arch armv7 -isysrootchecking whether the C compiler works... noxcrun: error: SDK "iphoneos" cannot be locatedxcrun: error: SDK "iphoneos" cannot be locatedxcrun: error: SDK "iphoneos" cannot be locatedxcrun: error: unable to lookup item 'Path' in SDK 'iphoneos'/Users/macbookpro/Library/Caches/CocoaPods/Pods/Release/Flipper-Glog/0.3.6-1dfd6/missing: Unknown `--is-lightweight' optionTry `/Users/macbookpro/Library/Caches/CocoaPods/Pods/Release/Flipper-Glog/0.3.6-1dfd6/missing --help' for more informationconfigure: WARNING: 'missing' script is too old or missingconfigure: error: in `/Users/macbookpro/Library/Caches/CocoaPods/Pods/Release/Flipper-Glog/0.3.6-1dfd6':configure: error: C compiler cannot create executablesSee `config.log' for more details

I know I need to install Xcode, but I don't want to now for some reasons,so is there anything i can do to make it work without Xcode installed ?

Second Question, How can I initialize a react-native app just for Android first ? and if there's a way for that, when i want to build the IOS app, Will i get some troubles or just i need Xcode then build the same android code for IOS ? or should the environment be ready for IOS and Android then start working on your App ?

ld: library not found for -lAmplitude when lib exists at .../BuildProductsPath/Debug-iphoneos/Amplitude

$
0
0

I keep getting this error when building my app using xcodebuild from the command line.

xcodebuild -workspace ios/APP_NAME.xcworkspace -scheme APP_NAME clean archive -sdk iphoneos -configuration Debug -UseModernBuildSystem=NO -archivePath $PWD/APP_NAME CODE_SIGNING_ALLOWED=NO;

The app builds fine via Xcode UI. This is a react native app, and I tried a bunch of things that didn't work.

  • Setting same deployment target for Pods and App projects
  • Deleting libAmplitude.a from app project's Frameworks folder
  • Setting Build Active Architecture Only to NO
  • Embedding libAmplitude.a along with libPods-APP_NAME.a

Strangely the file it can't find actually exists in the directory. I see two failures of this type (arm64, armv7).

ld: warning: directory not found for option '-L-L/Users/Parth/Library/Developer/Xcode/DerivedData/APP_NAME-atzumsqdaojeyaaukpzreucvvlja/Build/Intermediates.noindex/ArchiveIntermediates/APP_NAME/BuildProductsPath/Debug-iphoneos/Amplitude'ld: library not found for -lAmplitudeclang: error: linker command failed with exit code 1 (use -v to see invocation)

Final build failure:

The following build commands failed:        Ld /Users/Parth/Library/Developer/Xcode/DerivedData/APP_NAME-atzumsqdaojeyaaukpzreucvvlja/Build/Intermediates.noindex/ArchiveIntermediates/APP_NAME/IntermediateBuildFilesPath/APP_NAME.build/Debug-iphoneos/APP_NAME.build/Objects-normal/arm64/APP_NAME normal arm64        Ld /Users/Parth/Library/Developer/Xcode/DerivedData/APP_NAME-atzumsqdaojeyaaukpzreucvvlja/Build/Intermediates.noindex/ArchiveIntermediates/APP_NAME/IntermediateBuildFilesPath/APP_NAME.build/Debug-iphoneos/APP_NAME.build/Objects-normal/armv7/APP_NAME normal armv7(2 failures)

Issue filed with amplitude - https://github.com/amplitude/Amplitude-ReactNative/issues/87

React Native app built on android studios needing to have on xcode also

$
0
0

I need a little help with this one. I built a react native app through android studios and it's working fine. When I go to pull it up through Xcode it won't let me. I have my simulator up and ready. But when I run react-native run-ios through my terminal I keep getting "error iOS project folder not found". I have cleared out my disk (I'm using a mac). I looked in my project file and I have an iOS folder in there. But it is still giving me the same error. I thought that once you build it on android studios and it has the ios folder in there. You can pull it up in xcode and keep working. Has anyone else ran into the problem?


On iOS missing `session cookies` used React Native WebView

$
0
0

Bug description:My WebView should display a web page that has a cookie authentication. The page expects a session-id cookie acquired on login. To authenticate I send the login request to the website using fetch().

When the login is successful I can see that proper cookies are received. On success, I'm starting the WebView.

It works perfectly on Android but not on iOS.

I tested it on iOS 9 and iOS 11 simulators, and on an iOS 11 device.

To sum up the question: Why cookies I've got with fetch aren't passed to WebView on iOS only.

<WebView     source = {{        uri: url,    }}    onLoadEnd={() => {        CookieManager.getAll().then((cookies) => {            console.log('CookieManager.getAll =>', cookies);        });    }}/>

enter image description here

Environment:

  • OS: IOS
  • OS version: 14.4.2
  • react-native version: 0.64
  • react-native-webview version: ^11.4.3

Metro bundler not working after react-native upgrade

$
0
0

I have upgraded the react-native from 0.62.2 to 0.64.1 and also react to 17.0.1, but I am facing some build issue for both android and ios, the build is successfully and is getting installed on both the simulators but it's not opening and also the metro bundler fails with the below issue

error Cannot read property 'dependencyExtractor' of undefined.TypeError: Cannot read property 'dependencyExtractor' of undefinedat /Users/ss/rn/ui/node_modules/metro-config/src/loadConfig.js:269:42at Array.reduce ()at mergeConfig (/Users/ss/rn/ui/node_modules/metro-config/src/loadConfig.js:246:18)at Object. (/Users/ss/rn/ui/metro.config.js:54:18)at Module._compile (internal/modules/cjs/loader.js:1256:30)at Object.Module._extensions..js (internal/modules/cjs/loader.js:1277:10)at Module.load (internal/modules/cjs/loader.js:1105:32)at Function.Module._load (internal/modules/cjs/loader.js:967:14)at Module.require (internal/modules/cjs/loader.js:1145:19)at require (internal/modules/cjs/helpers.js:75:18)info Run CLI with --verbose flag for more details.Process terminated. Press to close the window

React Native on Apple Silicon M1 - The linked library 'libPods-ProjectName.a' is missing one or more architectures required by this target: x86_64

$
0
0

I'm trying to build a React Native project on a MacBook Pro with a M1 architecture, for iOS simulator.

The project built nicely on Intel architecture.

It also build on device and archive well on M1. But not on simulator.

I had this classical error when switching to the M1 chipset.

in /project-folder/ios/Pods/OpenSSL-Universal/ios/lib/libcrypto.a(cryptlib.o), building for iOS Simulator, but linking in object file built for iOS, file '/project-folder/ios/Pods/OpenSSL-Universal/ios/lib/libcrypto.a' for architecture arm64

I added arm64 to excluded architectures.

I also added the following snippet but it also react the same way without it.

post_install do |installer|  installer.pods_project.build_configurations.each do |config|    config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"  endend

Now I have:

/project-folder/ios/ProjectName.xcodeproj The linked library 'libPods-ProjectName.a' is missing one or more architectures required by this target: x86_64.

I tried to add x86_64 on the list of architectures of the project, with no results.

I'm building from Xcode IDE. This error message appears for all iPhones I tried: 8, 11, 12 and all targets I tried: iOS 9, 10 and 13.

Assign variable in ref.current.measure callback

$
0
0

I have a problem with measuring value of my views.I have to get pageX and pageY value.

One component looks like:

  useEffect(() => {    setTimeout(() => {      updateElementPositions(index)    })  }, [])....<StyledElement ref={elementRef[index]} style={style} index={index} type={type}> .....

Update element position is a function declared in the context

 const updateElementPositions = (index: string) => {    elementRef[index].current.measure((x: number, y: number, height: number, width: number, pageX: number, pageY: number) => {      // HERE IS A PROBLEM    })  }

in this function I would like to assign pageY and pageX value to variable. The problem is that I have a lot of components like that ( about 300 ) and I need to get a dimensions of each element. Hence I can't use setState or methods which causing re-render.I was trying to use ref.

 elementRef[index].current.measure((x: number, y: number, height: number, width: number, pageX: number, pageY: number) => {      element.current[index] = {pageX, pageY}    })

But I've encountered this error which is very odd to me

Error

Assign to "normal" variable also causes an error TypeError: Attempted to assign to readonly property.

I'm running out of ideas how can I do it.

I will be grateful if someone will be able to help me :) .

Regards

How to extend image across width of screen?

$
0
0

I am attempting to make the images scroll horizontally. I downloaded some UI, and added ScrollView horizontal. But instead of it looking the same just with the ability to scroll horizontally, it shrank the image (and also gave it the ability to scroll horizontally). What should I change to make it stretch all the way across (still with the padding)?

enter image description here

Posts.js

import React from "react";import {  View,  Text,  Image,  ImagBackground,  ImageBackground,} from "react-native";import Icon from "@expo/vector-icons/Entypo";import { ScrollView, TouchableOpacity } from "react-native-gesture-handler";export default class Posts extends React.Component {  state = {    liked: false,  };  onLike = () => {    this.setState({ liked: !this.state.liked });  };  render() {    const { name, profile, photo, onPress } = this.props;    return (<View><View          style={{            flexDirection: "row",            paddingTop: 25,            alignItems: "center",          }}><View style={{ width: "20%" }}><Image              source={profile}              style={{                width: 45,                height: 45,                borderRadius: 13,              }}            /></View><View            style={{              width: "60%",            }}><Text              style={{                fontFamily: "Bold",                fontSize: 14,                color: "#044244",              }}>              {name}</Text><Text              style={{                fontFamily: "Medium",                fontSize: 12,                color: "#9ca1a2",              }}>              2 mins ago</Text></View><View            style={{              width: "20%",              alignItems: "flex-end",            }}><Icon name="sound-mix" color="#044244" size={20} /></View></View><View          style={{            flexDirection: "row",            width: "100%",            paddingTop: 20,          }}><ScrollView horizontal><ImageBackground              source={photo}              style={{                width: "100%",                height: 220,              }}              imageStyle={{                borderRadius: 30,              }}><View                style={{                  height: "100%",                  flexDirection: "row",                  alignItems: "flex-end",                  justifyContent: "flex-end",                }}><TouchableOpacity                  onPress={onPress}                  style={{                    marginBottom: 20,                    borderRadius: 5,                    padding: 5,                    backgroundColor: "#e8e8e8",                  }}><Icon name="forward" color="#044244" size={20} /></TouchableOpacity><TouchableOpacity                  onPress={this.onLike}                  style={{                    marginBottom: 20,                    borderRadius: 5,                    padding: 5,                    backgroundColor: "#e8e8e8",                    marginLeft: 10,                    marginRight: 20,                  }}><Icon                    name={                      this.state.liked === true ? "heart" : "heart-outlined"                    }                    color={this.state.liked === true ? "red" : "#044244"}                    size={20}                  /></TouchableOpacity></View></ImageBackground></ScrollView></View></View>    );  }}

Here's me adding more words because the post doesn't have enough words on it's own. When will they finally remove this pointless feature? I feel as if I clearly expressed my question with the few words I used.

Cmd+r Recording the simulator instead of reloading the app in React Native

$
0
0

As you know new feature recording simulator has been around for 14.5 simulators, however the problem is that it's set to cmd+r, we can not reload the app using cmd+r anymore, can we fix it or can we disable recording video feature? thanks.

React Native App Crashing on iOS When Recording Audio

$
0
0

I am trying to record audio on iOS using a React Native app created with create-react-native-app. I am using the expo-av library to record. However, when I press "start recording", it immediately crashes. Through some console.log statements, I find that it happens after "Requesting Permissions" but before "Starting Recording". This works just fine on Android. Attached is my code. Why is this happening?

import React, {useEffect, useState, setState} from 'react';import {AsyncStorage, FlatList} from 'react-native';import { Button, Layout, Text, Card } from '@ui-kitten/components';import styles from './../../util/styles';import {Audio} from 'expo-av';import RNFS from 'react-native-fs';export default function Record({navigation}) {    const [recording, setRecording] = useState();    const REC_OPT = {        isMeteringEnabled: true,        android: {          extension: '.m4a',          outputFormat: Audio.RECORDING_OPTION_ANDROID_OUTPUT_FORMAT_MPEG_4,          audioEncoder: Audio.RECORDING_OPTION_ANDROID_AUDIO_ENCODER_AAC,          sampleRate: 16000,          numberOfChannels: 1,          bitRate: 128000,        },        ios: {          extension: '.wav',          audioQuality: Audio.RECORDING_OPTION_IOS_AUDIO_QUALITY_MAX,          sampleRate: 16000,          numberOfChannels: 1        },    };    async function startRecording() {        try {            console.log('Requesting permissions... ');            await Audio.requestPermissionsAsync();            await Audio.setAudioModeAsync({                allowsRecordingIOS: true,                playsInSilentModeIOS: true,            });             console.log('Starting recording..');            const recording = new Audio.Recording();            await recording.prepareToRecordAsync(REC_OPT);            await recording.startAsync();             setRecording(recording);            console.log('Recording started');        } catch (err) {            console.error('Failed to start recording', err);        }    }    async function stopRecording() {        console.log('Stopping recording..');        setRecording(undefined);        await recording.stopAndUnloadAsync();        const uri = recording.getURI();         console.log('Recording stopped and stored at', uri);        const fileArray = uri.split("/");        const filename = fileArray[fileArray.length - 1];        const newFilepath = RNFS.DocumentDirectoryPath +"/" + filename;        console.log("old filepath: ", uri, " new filepath: ", filename, " document directory ", RNFS.DocumentDirectoryPath, " file array ", fileArray, " file array length ", fileArray.length, " fullFilepath ", newFilepath);        await RNFS.copyFile(uri, newFilepath);        try {            var value = await AsyncStorage.getItem('FILES');            if(value !== null){                console.log("existing data");            } else {                value = "{}";            }            var rString = randomString(32, '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ');            var json = JSON.parse(value);            json[rString] = {"file_path": newFilepath, "name": rString, "id": rString, "analyzed": false, "analysis": {}};            var jsonString = JSON.stringify(json);            // console.log("update file: FILES " + jsonString);            await AsyncStorage.setItem("FILES", jsonString);            navigation.navigate('Home', {refresh: true});        } catch (error) {        console.error("failed to start recording", error);        }    }    randomString = (length, chars) => {        var result = '';        for (var i = length; i > 0; --i) result += chars[Math.floor(Math.random() * chars.length)];        return result;    }    return (<Layout style={styles.container}><Button            onPress={recording ? stopRecording : startRecording}>                {recording ? 'Stop Recording' : 'Start Recording'}</Button></Layout>    );}

How to restrict acces on application store

$
0
0

My problems is that I develop an application for android and IOS, but i want it to only be accessible from people I choose.

For android, I can do it using the testing mode of application, but i want a solution more simple for users, which are not really comfortable with developing.

For IOS, the only solution i found is using TestFlight, but once again if I can avoid using third party application it'll be better for users.

Moreover I wish I could update the user list easily.

Thanks.

APNS device token not set before retrieving FCM Token for Sender ID - React Native Firebase

$
0
0

I have been following this tutorial to set-up Remote Push notifications on my react-native application using react-native-firebase Version 5.2.0. After I configured everything and ran the application I get an error as:

APNS device token not set before retrieving FCM Token for Sender ID ''. Notifications to this FCM Token will not be delievered over APNS. Be sure to re-retrieve the FCM token once the APNS token is set.

Been trying to figure out how to solve this issue but wasn't quite successful.Running on react-native : 0.61.2, react-native-firebase: 5.2.0

Following is my AppDelegate.m

#import "AppDelegate.h"#import <React/RCTBridge.h>#import <React/RCTBundleURLProvider.h>#import <React/RCTRootView.h>#import <RNCPushNotificationIOS.h>#import <UserNotifications/UserNotifications.h>#import <Firebase.h>@import Firebase;@implementation AppDelegate- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{  [FIRApp configure];  RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];  RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge                                                   moduleName:@"helloworld"                                            initialProperties:nil];  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];  // define UNUserNotificationCenter  UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];  center.delegate = self;  return YES;}- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge{#if DEBUG  return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];#else  return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];#endif}// Required to register for notifications- (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings{  [RNCPushNotificationIOS didRegisterUserNotificationSettings:notificationSettings];}// Required for the register event.- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken{  [RNCPushNotificationIOS didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];}// Required for the notification event. You must call the completion handler after handling the remote notification.- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfofetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler{  [RNCPushNotificationIOS didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];}// Required for the registrationError event.- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error{  [RNCPushNotificationIOS didFailToRegisterForRemoteNotificationsWithError:error];}// Required for the localNotification event.- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification{  [RNCPushNotificationIOS didReceiveLocalNotification:notification];}//Called when a notification is delivered to a foreground app.-(void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler{  NSLog(@"User Info : %@",notification.request.content.userInfo);  completionHandler(UNAuthorizationOptionSound | UNAuthorizationOptionAlert | UNAuthorizationOptionBadge);}@end

and token retrieval on my App.js:

const messaging = firebase.messaging();messaging.hasPermission()  .then((enabled) => {    if (enabled) {      messaging.getToken()        .then(token => { console.log("+++++ TOKEN ++++++"+ token) })        .catch(error => { console.log("+++++ ERROR GT +++++"+ error) })    } else {      messaging.requestPermission()        .then(() => { console.log("+++ PERMISSION REQUESTED +++++") })        .catch(error => { console.log("+++++ ERROR RP ++++"+ error) })    }  })  .catch(error => { console.log("+++++ ERROR +++++"+ error) });

Any help would be much appreciated! Thanks!

`YogaKit.modulemap not found` prevents iOS build

$
0
0

I had to upgrade React Native (RN), to allow builds using Xcode Version 12.5 (12E262). That upgrade left Android builds broken, until I upgraded again. Now Xcode will not build again. I'm here to upgrade React Native and fundamentally fix the build process for both OSs, and I'm all out of upgrade versions of React Native.

I'm aware of and have tried suggestions in another thread:

  1. Restarting didn't work nor did it change anything.
  2. The CocoaPods and Podfile both target version 10.0.
  3. There is no section, project, in the Podfile, but if I add the recommended line, the error remains.
  4. Attempting to open .xcworkspace in place of xcodeproj removes the option to build altogether.

I also tried the solution from this thread.

I have noticed something strange lately. A couple of weeks ago the app was building fine for Apple and the popup terminal was the same as always. Now the popup terminal looks like the new terminal message when running the app for a simulator. It's the new Metro simulator:

Welcome to Metro!

Oddly, reverting packages changes nothing. I rested the project by reverting package.json, and yarn.lock followed by removing node_modules, running yarn, then cd ios && pod update. The same Metro terminal message shows regardless of RN version in package.json.

Is there a hack to fix for iOS builds? Is there a version of RN that works well for Apple and iOS.

TypeError: null is not an object (evaluating 'children.push') SvgUri

$
0
0

The SvgUri module of the react-native-svg library, works fine as it renders the icons by uri, but after a few seconds uses it throws errors like:

"TypeError: null is not an object (evaluating 'children.push')"or also:"Cannot read property 'push' of null This error is located at: in SvgUri"

which is almost the same mistake.

What can be done to fix the error?

NOTE: SvgUri is being used in the items of a FlatList

React Native XCode: Should I have to create a new bundle identifier?

$
0
0

My collaborator chose the bundle identifier com.company.app, and when I forked the repo and tried to build the project in XCode, it said The app ID cannot be registered to your development team because it is not available. I found here that the only solution that worked for me was to manually change the name of the bundle identifier in XCode. This doesn't seem like it should be the right solution. Shouldn't my collaborator and I be able to use the same bundle identifier?

Viewing all 17265 articles
Browse latest View live


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