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

Integrate react-native version 0.62.2 into existing IOs app error

$
0
0

Following react-native document to integrate react-native to existing IOs app. The structure of directory as document to integrate is

android/ios/   Podfile   #...other ios filenode_modules/  react-native  react  @react-native-community  package.json.... 

So that when run pod install from Podfile can call function use_native_modules

require_relative './libs/react-native-libs/node_modules/@react-native-community/cli-platform-ios/native_modules'...use_native_modules!

But I want to organize the project different due to not change my existing project structure,

so I add react-native-integrate module like as a part of my IOs project like this

my_ios_project  Podfile  libs/     ... other modules     react-native-integrate         node_modules             react-native             @react-native-community             react          package.json

And then I change the path of relative-module:

require_relative './libs/react-native-libs/node_modules/@react-native-community/cli-platform-ios/native_modules'...use_native_module!   

But the problem is in native_modules files and others libraries in node_modules use absolute require. For example in @react-community/cli-platform-ios/native_module.rb there is a line such as

cli_resolve_script = "try {console.log(require('@react-native-community/cli').bin);} catch (e) {console.log(require('@react-native/cli'))}"

that require absolute path '@react-native-community'. So that when I run Pod install my pod file from parent directory the node can not recognize my children module so that it cause error. enter image description here

As I know the node_module 'spaths list is basically a list of node_modules directories under every directory from the current directory to the root directory. And the current directory is that the directory of the Podfile that call require 'native_module.rb'Could you please give me a solution solve this problem like add node path from children directory or something else ? Thank you.


Encryption not working in iOS React Native

$
0
0

I'm trying to encrypt decrypt data in React Native. It works fine on Android but not on iOS. I've done import AesCrypto from 'react-native-aes-kit'. I've also tried to import {NativeModules} from 'react-native'const {AesCrypto}=NativeModules.

But nothing seems to be working on iOS.Done with pods installation and podspec files also saved under react-native-aes-kit. Thanks in advance.

React Native / Expo iOs - Network Request Failed with Fetch on my Api

$
0
0

Firstly : i went through many ( MANY ) post about this problem, tested them all, but it seems that i'm cursed, or something like that ?

I'm working on expo with the LAN method, on iOs.My back is on .Net Core 3.My iPhone is on the same Wifi than my computer.And my computer is running my .Net back server.

I found at that localhost cannot be handle by expo/react-native. So i tried the IP adresse method and change my back adress and the adress that my front was trying to fetch.Tried the infoPlist with expo. Tried some mysterious things that i don't fully understood with my .Net server. Also tried to turn off my firewall, it didn't change anything.Well, i'm not used to post because existing posts often answer my question.

Here is my code about my fetch method :

export async function callPlanning() {    try {        let response = await fetch("http://my.Ipv4.adress:myApiPort/myRoute",        );        let responseJson = await response.json();        return responseJson;      } catch (error) {        console.error(error);      }}

My Api is working well on Postman.And i can call the facebook test api with this function within my app.

Here is my app code where i'm calling this fetch function :

export default class BetaserieScreen extends Component {  constructor(props) {    super(props)    this.state={      response: null,    };    this.askPlanning = this.askPlanning.bind(this);  }  askPlanning = () => {    this.setState({      response: Back.callPlanning(),    })  }  render() {    return (<View style={styles.MainContainer}><Text> Beta Serie </Text><TouchableHighlight onPress={this.askPlanning}><Text>Planning</Text></TouchableHighlight></View>    );  }}

If you see anything that could andwer my question or about my code : i'll take it.I'm on it for 2 days, and i've to find a solution...If you need any other information about my system or file about my project, feel free to ask for it if you think you can help me with this problem.

I'll be glad.

SVG loading issue in react native WebView (iOS)

$
0
0

Tools used

D3 js: v4.11.0react-native: v0.60.3react-native-webview: v9.3.0

Previously I was using react-native 0.59.8 and I was using WebView from react-native, in this version WebView was working fine, SVG was also loading perfectly, but after upgrading react native to 0.60.3, I also have to take WebView from react-native-webview,

React Native WebView :-

<WebViewscrollEnabled = {true}originWhitelist={["*"]}javaScriptEnabled={true}source={{ uri: isAndroid ? "file:///android_asset/widget/index.html" : "./widget/index.html" }}// useWebKit={false}allowUniversalAccessFromFileURLs={true}allowFileAccess={true}scalesPageToFit={true}onMessage={this.getSelectedSeat}ref={component => (this.webview = component)}style={{ width: deviceWidth, height: deviceHeight }}/>

Calling:

this.webview.postMessage("data");

Capturing in HTML:

this.window.addEventListener("message", data => {}

Loading SVG in HTML :-

function loadSVG(svgURL) {      d3.xml(        svgURL,        function (xml) {          if (xml != null) {            var importedFile = document.importNode(xml.documentElement, true);            d3.select("#layout")              .node()              .append(importedFile);          }        },        err => {          alert('error')        }      );    }

In android same code is working fine, but not in iOS, every time xml is null, but it was fine in the older version of WebView where I was taking WebView from react-native, I don't know what I'm missing, may be some property. Please Help.

contents of Info.plist is a property list, but is not dictionary error in Xcode

$
0
0

I'm trying to run and build a react-native application in Xcode, The build is failing and I do not understand the error:Info.plist Utility Error:

contents of '/Users/edmund/projects/clients/betprotect/ios/betprotect/Info.plist' is a property list, but is not dictionary (is __nsarraym)

Here's the content of the Info.plist file:

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN""http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"><array><dict><key>CFBundleDevelopmentRegion</key><string>en</string><key>CFBundleDisplayName</key><string>$(PRODUCT_NAME)</string><key>CFBundleExecutable</key><string>$(EXECUTABLE_NAME)</string><key>CFBundleIdentifier</key><string>$(PRODUCT_BUNDLE_IDENTIFIER)</string><key>CFBundleInfoDictionaryVersion</key><string>6.0</string><key>CFBundleName</key><string>$(PRODUCT_NAME)</string><key>CFBundlePackageType</key><string>APPL</string><key>CFBundleShortVersionString</key><string>1.0</string><key>CFBundleSignature</key><string>????</string><key>CFBundleVersion</key><string>1</string><key>LSRequiresIPhoneOS</key><true/><key>NSAppTransportSecurity</key><dict><key>NSAllowsArbitraryLoads</key><true/><key>NSExceptionDomains</key><dict><key>localhost</key><dict><key>NSExceptionAllowsInsecureHTTPLoads</key><true/></dict></dict></dict><key>NSLocationWhenInUseUsageDescription</key><string></string><key>NSMicrophoneUsageDescription</key><string>Betprotect needs acess to your device's speech recognitions ervice in order to work properly</string><key>NSSpeechRecognitionUsageDescription</key><string>Betprotect needs acess to your device's speech recognitions ervice in order to work properly</string><key>UIAppFonts</key><array><string>Poppins-Medium.ttf</string><string>AntDesign.ttf</string><string>Entypo.ttf</string><string>EvilIcons.ttf</string><string>Feather.ttf</string><string>FontAwesome.ttf</string><string>FontAwesome5_Brands.ttf</string><string>FontAwesome5_Regular.ttf</string><string>FontAwesome5_Solid.ttf</string><string>Fontisto.ttf</string><string>Foundation.ttf</string><string>Ionicons.ttf</string><string>MaterialCommunityIcons.ttf</string><string>MaterialIcons.ttf</string><string>Octicons.ttf</string><string>SimpleLineIcons.ttf</string><string>Zocial.ttf</string><string>Heebo-Regular.ttf</string><string>abeatbyKaiRegular.otf</string><string>Poppins-SemiBold.ttf</string><string>Heebo-Medium.ttf</string><string>Heebo-Light.ttf</string><string>Poppins-Light.ttf</string></array><key>UILaunchStoryboardName</key><string>LaunchScreen</string><key>UIRequiredDeviceCapabilities</key><array><string>armv7</string></array><key>UISupportedInterfaceOrientations</key><array><string>UIInterfaceOrientationPortrait</string><string>UIInterfaceOrientationLandscapeLeft</string><string>UIInterfaceOrientationLandscapeRight</string></array><key>UIViewControllerBasedStatusBarAppearance</key><false/></dict><string>NSAppTransportSecurity</string><dict><key>NSExceptionDomains</key><dict><key>yourserver.com</key><dict><key>NSIncludesSubdomains</key><true/><key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key><true/><key>NSTemporaryExceptionMinimumTLSVersion</key><string>TLSv1.1</string></dict></dict></dict></array></plist>

My Xcode version is 11.4 and my OS is macOS 10.15.

After selecting my target, under the General > Identity tab, I get this error:

"Xcode failed to parse contents of Info.plist"

How to handle multiple API calls in single component in React Native?

$
0
0

I have react native parent component which contain 4 child components. Each child component need the web service data from different API's. If I call the web service, the parent component render 4 times. How to handle this situation and render the particular child component when the API get the responses ?

Expo Bare Workflow App works in debug mode, hangs on loading screen release build IOS

$
0
0

Good day,I am having trouble with a bare workflow expo app I am trying to get to test flight. The application builds perfectly using react-native run-iosHowever if I use the --configuration=release flag, the app hangs.

It is the same if I build it in xcode with the Scheme set to debug and then release.

If anyone has any insight it would be great, even if its a way to potentially debug release builds.

package.json

"main": "index.js","scripts": {"android": "react-native run-android","ios": "react-native run-ios","web": "expo start --web","start": "react-native start","test": "jest","build:ios": "react-native bundle --entry-file index.js --platform ios --dev false --bundle-output ios/main.jsbundle --assets-dest ios/assets","postinstall": "cp node_modules/@expo/vector-icons/FontAwesome.js node_modules/@expo/vector-icons/Fontisto.js"  },"dependencies": {"@react-native-community/art": "^1.2.0","@react-native-community/masked-view": "^0.1.9","@react-navigation/bottom-tabs": "^5.2.5","@react-navigation/native": "^5.0.9","@react-navigation/stack": "^5.1.1","@sentry/react-native": "^1.3.7","axios": "^0.19.2","expo": "~37.0.3","expo-av": "^8.1.0","expo-in-app-purchases": "^8.1.0","expo-updates": "~0.1.0","expo-web-browser": "^8.1.0","husky": "^4.2.3","lodash": "^4.17.15","native-base": "^2.13.8","prop-types": "^15.7.2","react": "~16.9.0","react-devtools": "^4.6.0","react-dom": "~16.9.0","react-native": "^0.62.2","react-native-chart-kit": "^5.4.0","react-native-circular-progress": "^1.3.6","react-native-fusioncharts": "^4.1.2","react-native-gesture-handler": "~1.6.0","react-native-modal": "^11.5.6","react-native-popover-view": "^2.0.7","react-native-popup-menu": "^0.15.7","react-native-progress": "^4.1.2","react-native-progress-circle": "^2.1.0","react-native-reanimated": "~1.7.0","react-native-render-html": "^4.2.0","react-native-safe-area-context": "^0.7.3","react-native-screens": "~2.2.0","react-native-svg": "^12.1.0","react-native-unimodules": "~0.9.0","react-native-web": "~0.11.7","react-native-webview": "^9.2.0","react-navigation-stack": "^2.3.11","react-redux": "^7.2.0","redux": "^4.0.5","redux-thunk": "^2.3.0","styled-components": "^5.0.1"  },"devDependencies": {"@babel/core": "~7.9.0","@babel/runtime": "^7.9.6","@types/react": "~16.9.23","@types/react-native": "~0.61.23","babel-preset-expo": "~8.1.0","dotenv": "^8.2.0","jest-expo": "~37.0.0","prettier": "^1.19.1","typescript": "~3.8.3"  },"jest": {"preset": "react-native"  },"private": true,"husky": {"hooks": {"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"    }  }} 

App.json

"name": "MyApp","displayName": "MyApp","expo": {"name": "myapp","slug": "my-app","privacy": "unlisted","version": "1.0.0","platforms": ["ios","android","web"    ],"icon": "./assets/images/Stress-code_logo-icon-01.png","assetBundlePatterns": ["**/*"    ],"ios": {"supportsTablet": false,"bundleIdentifier": "za.co.myapp.v2","buildNumber": "1"    }  }}

accessing built in notes app IOS and Android - React Native

$
0
0

is it possible to open Notes app on Ios and Android when the phone has built in Notes app ?

i cannot find any package or apps name (trying to deeplink) the Notes apps on both android and ios.

is every body ever work with this feature ?


Open contacts app from react-native app and get the selected contact info

$
0
0

I want to open contacts app in IOS from a react-native app that I am developing. Also, I want to get the list of contacts which the user selects. Is there any way to do it in react native?

I went through this stack overflow link: Opening the Settings app from another app and learnt that we could do it in IOS by using URL schemes. I searched google for URL scheme of Contacts app but couldn't find one. Even if I find one, how to get a callback ?

I have implemented react-native-contacts library to get list of contacts. But I would rather like my users to navigate to contacts app and select contacts. Can we do it in react-native ?

React native Background geolocation updates IOS

$
0
0

This package

I need solution for i want to update location every 30 seconds.

I'm using this package for background geolocation updates when its working fine, but when i move my phone (iphone6) it send my location to firebase. I'm using location changes of this package because postTemplate is not working on IOS device and stoOnStillActivity:true for if activity is still it wont send location.

 BackgroundGeolocation.configure({        locationProvider: BackgroundGeolocation.ACTIVITY_PROVIDER,        desiredAccuracy: BackgroundGeolocation.MEDIUM_ACCURACY,        stationaryRadius: 10,        distanceFilter: 10,        debug: true,        interval: 30000,        stopOnStillActivity: true,  })

This one sending location to firebase

 BackgroundGeolocation.on('location', (location) => {        BackgroundGeolocation.startTask(taskKey => {            firestore()                .collection('testlocation')                .add({                    name: 'DEVICE',                    lat: location.latitude,                    lon: location.longitude,                    dat: new Date,                })                .then(() => {                    console.log('Location added BITCH!')                }).catch(e => console.log(e))            console.log("Stark task started successfully", new Date, location.latitude, location.longitude)            BackgroundGeolocation.endTask(taskKey)        })    })

How do I get a React Native TextInput by its testID in an ios UITest

$
0
0

I'm trying to edit the text of a TextInput React Native component in an ios UITest. I've added the testID prop to the component.

Two questions:

  1. Where does the testID prop appear in the native ios code?
  2. How can I select the TextInput by this testID and add text to it?

App.js

import React from "react";import { StyleSheet, TextInput, View } from "react-native";export default function App() {  return (<View><TextInput testID="username" placeholder="Enter your username" /></View>  );}

TestappUITests.swift

import XCTestclass TestappUITests: XCTestCase {    ...    func testExample() {        // UI tests must launch the application that they test.        let app = XCUIApplication()        app.launch()        // Write test code here    }}

ReactNative JS text not Updating

$
0
0

After Successfully setup the React Native Environment,after running i got an screen by default text

"Welcome to React Native,To get started ,edit App.js,Double Tap R on your keyboard to reload,shake or press menu button for dev menu"

But my problem is that after changing the file in Text App.js ,i can not able to see the change in my app,alwys showing the by default text.....

and also after shaking the app when i click the Reload button give an error Could not connect to development server..

can you suggest me how to resolve the above issue,,,,,Thanks in advance.

React-Native array of refs

$
0
0

I create my components in a loop, and I need a way to retrieve data from them, but all my refs are undefinded.

<Tile                    id={i} key={i}                    isActive={this.state.isActive}                    num={numbers[i]}                    getNext={() => { return this.state.tilesTapped + 1 }}                    addToList={(id) => this.addToList(id)}                    ref={(input) => { this.tiles[i] = input }}                />

And this is how I call them:

for (var i = 0; i < this.state.maxTiles; i++) {        if (!this.tiles[i].check()) {            res = false;        }    }

Is the syntax incorrect, or the problem is somewhere else?

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

$
0
0

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

$ react-native run-ioserror Could not find "Podfile.lock" at /Users/mine/Documents/code/js/emps_fe6/ios/Podfile.lock. Did you run "pod install" in iOS directory?error Could not find the following native modules: RNCAsyncStorage, RNDeviceInfo, RNGestureHandler, RNKeychain, BVLinearGradient, RNLocalize, RNReanimated, RNVectorIcons, react-native-video. Did you forget to run "pod install" ?info Found Xcode project "emps_fe6.xcodeproj"xcrun: error: unable to find utility "simctl", not a developer tool or in PATHerror Could not parse the simulator list output. Run CLI with --verbose flag for more details.Error: Command failed: xcrun simctl list --json devicesxcrun: error: unable to find utility "simctl", not a developer tool or in PATH    at checkExecSyncError (child_process.js:629:11)    at Object.execFileSync (child_process.js:647:13)    at runOnSimulator (/Usersamine/Documents/code/js/emps_fe6/node_modules/@react-native-community/cli-platform-ios/build/commands/runIOS/index.js:130:54)    at Object.runIOS [as func] (/Users/mine/Documents/code/js/emps_fe6/node_modules/@react-native-community/cli-platform-ios/build/commands/runIOS/index.js:100:12)    at Command.handleAction (/Users/mine/Documents/code/js/emps_fe6/node_modules/@react-native-community/cli/build/index.js:164:23)    at Command.listener (/Users/mine/Documents/code/js/emps_fe6/node_modules/commander/index.js:315:8)    at Command.emit (events.js:198:13)    at Command.parseArgs (/Users/amine/Documents/code/js/emps_fe6/node_modules/commander/index.js:651:12)    at Command.parse (/Users/mine/Documents/code/js/emps_fe6/node_modules/commander/index.js:474:21)    at setupAndRun (/Users/mine/Documents/code/js/emps_fe6/node_modules/@react-native-community/cli/build/index.js:237:24)

Here is the output of react native info:

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

Here is the package.json:

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

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

UPDATE:

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

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

Best library for horizontal bar charts in react native?


Fastlane lane uploading application to testflight

$
0
0

I am trying to build an ios application and upload it to f=testflight using fastlane but am getting these error. appName is the name of my application.

[04:32:03]: $ set -o pipefail && xcodebuild -workspace ./appName.xcworkspace -scheme appName -destination 'generic/platform=iOS' -archivePath /Users/distiller/Library/Developer/Xcode/Archives/2020-05-01/appName\ 2020-05-01\ 04.32.03.xcarchive archive | tee /Users/distiller/Library/Logs/gym/appName-appName.log | xcpretty

[04:32:05]: ▸❌ error: /Users/distiller/demo-react-native/ios/Pods/Target Support Files/Pods-appName/Pods-appName.release.xcconfig: unable to open file (in target "appName" in project "appName") (in target 'appName')

[04:32:05]: ▸❌ error: /Users/distiller/demo-react-native/ios/Pods/Target Support Files/Pods-appName/Pods-appName.release.xcconfig: unable to open file (in target "appName" in project "appName") (in target 'appName')

[04:32:05]: ▸❌ error: /Users/distiller/demo-react-native/ios/Pods/Target Support Files/Pods-appName/Pods-appName.release.xcconfig: unable to open file (in target "appName" in project "appName") (in target 'appName')

[04:32:05]: ▸❌ error: Failed to parse IPHONEOS_DEPLOYMENT_TARGET: Could not parse version component from: '3 ' (in target 'appName')

[04:32:05]: ▸ ** ARCHIVE FAILED **

❌ error: /Users/distiller/demo-react-native/ios/Pods/Target Support Files/Pods-appName/Pods-appName.release.xcconfig: unable to open file (in target "appName" in project "appName") (in target 'appName')

❌ error: /Users/distiller/demo-react-native/ios/Pods/Target Support Files/Pods-appName/Pods-appName.release.xcconfig: unable to open file (in target "appName" in project "appName") (in target 'appName')

❌ error: /Users/distiller/demo-react-native/ios/Pods/Target Support Files/Pods-appName/Pods-appName.release.xcconfig: unable to open file (in target "appName" in project "appName") (in target 'appName')

❌ error: Failed to parse IPHONEOS_DEPLOYMENT_TARGET: Could not parse version component from: '3 ' (in target 'appName')

** ARCHIVE FAILED **

[04:32:05]: Exit status: 65

[04:32:05]:

[04:32:05]: Maybe the error shown is caused by using the wrong version of Xcode

[04:32:05]: Found multiple versions of Xcode in '/Applications/'

[04:32:05]: Make sure you selected the right version for your project

[04:32:05]: This build process was executed using '/Applications/Xcode-10.1.app'

[04:32:05]: If you want to update your Xcode path, either

[04:32:05]:

[04:32:05]: - Specify the Xcode version in your Fastfile

[04:32:05]: ▸ xcversion(version: "8.1") # Selects Xcode 8.1.0

[04:32:05]:

[04:32:05]: - Specify an absolute path to your Xcode installation in your Fastfile

[04:32:05]: ▸ xcode_select "/Applications/Xcode8.app"

[04:32:05]:

[04:32:05]: - Manually update the path using

[04:32:05]: ▸ sudo xcode-select -s /Applications/Xcode.app

[04:32:05]:

+---------------+------------------------------+

| Build environment |

+---------------+------------------------------+

| xcode_path | /Applications/Xcode-10.1.app |

| gym_version | 2.146.1 |

| export_method | app-store |

| sdk | iPhoneOS12.1.sdk |

+---------------+------------------------------+

[04:32:05]: ▸ Build system information

[04:32:05]: ▸ error: /Users/distiller/demo-react-native/ios/Pods/Target Support Files/Pods-appName/Pods-appName.release.xcconfig: unable to open file (in target "appName" in project "appName") (in target 'appName')

[04:32:05]: ▸ Build system information

[04:32:05]: ▸ error: Failed to parse IPHONEOS_DEPLOYMENT_TARGET: Could not parse version component from: '3 ' (in target 'appName')

[04:32:05]:

[04:32:05]: ⬆️ Check out the few lines of raw xcodebuild output above for potential hints on how to solve this error

[04:32:05]: 📋 For the complete and more detailed error log, check the full log at:

[04:32:05]: 📋 /Users/distiller/Library/Logs/gym/appName-appName.log

[04:32:05]:

[04:32:05]: Looks like fastlane ran into a build/archive error with your project

[04:32:05]: It's hard to tell what's causing the error, so we wrote some guides on how

[04:32:05]: to troubleshoot build and signing issues: https://docs.fastlane.tools/codesigning/getting-started/

[04:32:05]: Before submitting an issue on GitHub, please follow the guide above and make

[04:32:05]: sure your project is set up correctly.

[04:32:05]: fastlane uses xcodebuild commands to generate your binary, you can see the

[04:32:05]: the full commands printed out in yellow in the above log.

[04:32:05]: Make sure to inspect the output above, as usually you'll find more error information there

[04:32:05]:

Expo Permissions askAsync method does not return

$
0
0

I am using Expo Permissions API to request permissions for my iOS app. The following method does not return after showing the permissions dialog.

  async initializePushNotificationsIos(cb) {    const permission = await Permissions.askAsync(Permissions.NOTIFICATIONS)    Analytics.track({      event: 'notification_permissions',      status: permission.status === 'granted' ? 'granted' : 'denied',    })    cb()    Notifications.registerRemoteNotifications()    await this.updateUserDeviceToken()  }

The code does not come back to the next step - Analytics.track call.

I am using Expo SDK 36 and corresponding React native version. Any reason why this is happening? This code was working at some point of time before and now does not work!

JSON value '' of type NSNull cannot be converted to NSString

$
0
0

I am getting the following error screen sometimes when I reload my React Native app in iOS Simulator.

enter image description here

Sometimes it doesn't happen at all but sometimes a few times during the day.

I am using SignalR client in my app as well as Firebase Messaging.

I have tried to put a try catch blocks to all of my app including where I use AsyncStorage but this is still happening.

Very frustrating.

How to get current country of Device in React Native (iOS and Android)?

$
0
0

I am trying to get current country of device in but didn't find anything. Is there something to do so in React Native?I tried using react-native-device-info but it is also not supporting but in previous version it can be get by getDeviceCountry(). Now for the latest version it is showing error:

TypeError: _reactNativeDeviceInfo.default.getDeviceCountry is not a function. (In '_reactNativeDeviceInfo.default.getDeviceCountry()','_reactNativeDeviceInfo.default.getDeviceCountry' is undefined)

Turn off autoCapitalize on ALL React Native Inputs (iOS)

$
0
0

Most of my Inputs are being auto-Capitalized on iOS only. I know there's the autoCapitalize property that I could set to false on every input to turn it off but I'm wondering if there's a global config I can apply project-wide.

Viewing all 16554 articles
Browse latest View live


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