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

React Native 0.63.2 iOS Build Error with `ld: library not found for -lAppAuth`

$
0
0

I was trying to build my RN project for iOS and having an error

ld: library not found for -lAppAuthclang: error: linker command failed with exit code 1 (use -v to see invocation)

Do you have any ideas on how to solve this? I also tried to open .xcworkspace file but I am not sure if my xcode is opening the correct file. How do you tell if the xcode is opening xcworkspace or xcodeproj file?

I am on Mac Catalina with XCode 11.4.1. RN 0.63.2.

-- Updated --

I found out that there is an extra -L in front of -L....AppAuth as following. Is this bug related to this?

- L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-5.0/iphonesimulator -L -L/Users/aungmt/Library/Developer/Xcode/DerivedData/myanlearn_for_students-asipdyxbdtsgxofrgmvaagrgceyh/Build/Products/Debug-iphonesimulator/AppAuth

Context Menu RTL issue

$
0
0

How do I change the direction of a context menu to RTL?

I'm using this libraryhere

init(bridge: RCTBridge) {  super.init(frame: CGRect());  self.bridge = bridge;  self.contextMenuInteraction = {    let interaction = UIContextMenuInteraction(delegate: self);    self.addInteraction(interaction);    return interaction;  }();  /// init shared `RCTImageLoader` instance if nil  if RCTMenuIcon.ImageLoader.sharedInstance == nil,     let module      = bridge.module(for: RCTImageLoader.self),     let imageLoader = module as? RCTImageLoader {    RCTMenuIcon.ImageLoader.sharedInstance = imageLoader;  };};

React Native: Android not setting width and height correct []

$
0
0

A very simple View:

import React from "react";import { View } from "react-native";export default function App() {  return (<View      onLayout={(layout) => {        console.log(layout.nativeEvent);      }}      style={{        width: 371,        height: 477,      }}></View>  );}

So I'm just making a view with width=371 and height=477 and then log its layout. When I run this with expo on my actual iPhone 5s device I get the following output:

{"layout": Object {"height": 477,"width": 371,"x": 0,"y": 0,  },"target": 3,}

which is correct. But when i run it on an android pixel 2 emulator with screen size 1080x1920:420dpi (I don't have an actual android device) I get the following output:

Object {"layout": Object {"height": 476.952392578125,"width": 371.047607421875,"x": 0,"y": 0,  },"target": 3,}

So width and height are slightly of. Normally I would say this doesn't really matter this much because it is less then one pixel but the problem is that for my application this seems to lead to very ugly looking display errors, where some tiles that should fit seamlessly together having some very small margin:

enter image description here

Actually I'm not a hundred percent sure if this is the reason. However, it seems to me as a very suspicious candidate. Any idea how to fix this?

Edit:

Some more detail to reproduce the the pixel interpolation error in the image. As I said the promblem decribed in this post is what to me seems to be the reason for causing this but I'm not hundret percent sure. In all cases, however, the scenario described above is very strange.

So for the following code (a grid of 7x9 53pixel large views that should add seamlessly together):

import React from "react";import { View } from "react-native";export default function App() {  let cell_size = 53;  let width = 7;  let height = 9;  let rows = [];  for (let i = 0; i < height; i++) {    let row_elms = [];    for (let j = 0; j < width; j++) {      row_elms.push(<View          key={"key" + j +"_" + i}          style={{            width: cell_size,            height: cell_size,            backgroundColor: "white",          }}></View>      );    }    rows.push(<View        key={"row" + i}        style={{          width: cell_size * width,          height: cell_size,          flexDirection: "row",        }}>        {row_elms}</View>    );  }  return (<View      style={{        justifyContent: "center",        alignItems: "center",        height: "100%",        width: "100%",        backgroundColor: "black",      }}><View style={{ width: cell_size * width, height: cell_size * height }}>        {rows}</View></View>  );}

I get this outputs on android vs ios:

enter image description here

I can then for example verify that the problem occurs by using the expo build in element inspector (or alternatively with the logging method from above), that 1. the Container doesn't exactly have the correct size and also I noticed that some of the grid cells also don't have the correct size, as you can see in these to screenshots of me using the element inspector:enter image description here

React Native - What is and isn't possible with React Native?

$
0
0

I'm a web developer and have been playing around with React Native for a few days now and slowly getting the hang of how things work. I want to build a project but I don't even know if it's possible at this point? One side of my question pertains to the UI elements. I see a lot of native (Obj-C and Swift) apps doing this parallax hero space thing:

Example: https://github.com/Vinodh-G/ParallaxTableViewHeader

Is something like that possible in React Native? If so, how? From what I understand, doing something like this requires the UiTableView, which RN does not have.

Secondly, I want to use some native things like the Map View. I've seen the notes on using RCTBridgeModule, but since I have zero experience with Obj-C, I dont know what they mean when they say to place this obj-c code [here] and then place this js [here].

The examples FB has provided are great for learning how to display content from an api, but when it comes to integrating with obj-c, it becomes a little fuzzy due to the lack of obj-c experience and the file structure related to it.

Am I the only one experiencing this? This seems like a great framework and I am very excited to learn it, but there still seems to be a void for the obj-c noobs.

How can i send ph://... image file over to my api?

$
0
0

I am building a mobile app and want to be able to send images over to my API for processing.I am currently using CameraRoll for getting the images.

The problem is that the image URI is represented as PH://<some_id> and cannot be parsed into base64 format using React Native file system.I am currently developing for ios, as far as I know, this format(ph://) is replaced with - file:// in an android environment, which can be parsed.

So my question is how can parse the ph:// format? I'm open to any other solution as well.

In React native there is navigation delay when app comes foreground from background state (iOS)

$
0
0

Whenever app open in following case (For iOS)

  • Case 1: When app is open and i scroll down notification display of mobile for few seconds and back to app again
  • Case 2: When open map from app and back to app again

In above 2 cases on click on any button or tab there is seems delay in navigation for 3-5 seconds some times its more than 5 seconds.

How can i solve this?

Specifications:

"react-native": "0.63.4","@react-navigation/bottom-tabs": "^5.11.7","@react-navigation/material-top-tabs": "^5.3.15","@react-navigation/native": "^5.9.2","@react-navigation/stack": "^5.14.2",

Please help.

Console.error: no permission handler detected.(React Native)

$
0
0

I am coding a simple react native app and am getting a console error when I run the app. It says that there is no permission handler detected and tells me to go through some steps. But I do not know how to do these steps, and if they don't work, I don't know how to solve the problem.

Here is the error:

enter image description here

Here is the podfile:

platform :ios, '9.0'require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'def add_flipper_pods!(versions = {})  versions['Flipper'] ||= '~> 0.33.1'  versions['DoubleConversion'] ||= '1.1.7'  versions['Flipper-Folly'] ||= '~> 2.1'  versions['Flipper-Glog'] ||= '0.3.6'  versions['Flipper-PeerTalk'] ||= '~> 0.0.4'  versions['Flipper-RSocket'] ||= '~> 1.0'  pod 'FlipperKit', versions['Flipper'], :configuration => 'Debug'  pod 'FlipperKit/FlipperKitLayoutPlugin', versions['Flipper'], :configuration => 'Debug'  pod 'FlipperKit/SKIOSNetworkPlugin', versions['Flipper'], :configuration => 'Debug'  pod 'FlipperKit/FlipperKitUserDefaultsPlugin', versions['Flipper'], :configuration => 'Debug'  pod 'FlipperKit/FlipperKitReactPlugin', versions['Flipper'], :configuration => 'Debug'  # List all transitive dependencies for FlipperKit pods  # to avoid them being linked in Release builds  pod 'Flipper', versions['Flipper'], :configuration => 'Debug'  pod 'Flipper-DoubleConversion', versions['DoubleConversion'], :configuration => 'Debug'  pod 'Flipper-Folly', versions['Flipper-Folly'], :configuration => 'Debug'  pod 'Flipper-Glog', versions['Flipper-Glog'], :configuration => 'Debug'  pod 'Flipper-PeerTalk', versions['Flipper-PeerTalk'], :configuration => 'Debug'  pod 'Flipper-RSocket', versions['Flipper-RSocket'], :configuration => 'Debug'  pod 'FlipperKit/Core', versions['Flipper'], :configuration => 'Debug'  pod 'FlipperKit/CppBridge', versions['Flipper'], :configuration => 'Debug'  pod 'FlipperKit/FBCxxFollyDynamicConvert', versions['Flipper'], :configuration => 'Debug'  pod 'FlipperKit/FBDefines', versions['Flipper'], :configuration => 'Debug'  pod 'FlipperKit/FKPortForwarding', versions['Flipper'], :configuration => 'Debug'  pod 'FlipperKit/FlipperKitHighlightOverlay', versions['Flipper'], :configuration => 'Debug'  pod 'FlipperKit/FlipperKitLayoutTextSearchable', versions['Flipper'], :configuration => 'Debug'  pod 'FlipperKit/FlipperKitNetworkPlugin', versions['Flipper'], :configuration => 'Debug'end# Post Install processing for Flipperdef flipper_post_install(installer)  installer.pods_project.targets.each do |target|    if target.name == 'YogaKit'      target.build_configurations.each do |config|        config.build_settings['SWIFT_VERSION'] = '4.1'      end    end  endendtarget 'LocalMainStreet' do  # Pods for LocalMainStreet  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/callinvoker', :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', :modular_headers => true  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'  pod 'RNGestureHandler', :path => '../node_modules/react-native-gesture-handler'  target 'LocalMainStreetTests' do    inherit! :complete    # Pods for testing  end  use_native_modules!  # Enables Flipper.  #  # Note that if you have use_frameworks! enabled, Flipper will not work and  # you should disable these next few lines.  add_flipper_pods!  post_install do |installer|    flipper_post_install(installer)  endendtarget 'LocalMainStreet-tvOS' do  # Pods for LocalMainStreet-tvOS  target 'LocalMainStreet-tvOSTests' do    inherit! :search_paths    # Pods for testing  endend

Please help. Thanks.

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)

Implement pinch zoom using one touch react native

$
0
0

I want to achieve the pinch gesture (zoom) using single Touch of finger in the react native.![Having four arrow at side of the images. Need to implement the pinch zoom using single touch][1]

https://i.stack.imgur.com/ykqSb.png

React native custom map marker issue in iOS release config

$
0
0

I'm trying to get a react native app that's already working nicely on android to run on iOS. It uses react-native-maps to display a map view, and custom markers on it. When running the app in debug config, the markers look the way should, like below.

enter image description here

But when I run it in release config or send it to testflight, marker icons go haywire, and looks like this.

enter image description here

The implementation is as follows (trimmed the code down to essential parts so it may have missing variables etc...)

import MapView, { Marker } from 'react-native-maps';const marker = require('../assets/marker.png');const markerDark = require('../assets/marker-dark.png');const customMapStyle = require('../assets/customMapStyle.json');export default function DisplayMapView () => {  return (<MapView {...mapProperties} ref={mapRef} style={mapStyle} onPress={onMapPress}><For each="markerData" of={markerDatas || []}><Marker          showsTraffic={false}          showsCompass={false}          mapType={'terrain'}          {...markerData}><Text>            {markerData.label}</Text><Image            resizeMethod="resize"            resizeMode="center"            style={styles.marker}            source={shouldDarkMarker(markerData) ? markerDark : marker}          /></Marker></For></MapView>  );}

How can I get the custom markers working in release config?

error: the path does not point to a valid framework:

$
0
0

I made an App using React native which I want users to be able to integrate in their iOS Project as well.

I saw how to integrate React native into existing iOS app and I was able to do it (like I was able to render it).

Now, I wanted to create it as sdk/framework similar to what Jitsi Did: https://jitsi.github.io/handbook/docs/dev-guide/dev-guide-ios-sdk

I ran instructions they mentioned in their dev guide

mkdir -p ios/sdk/outxcodebuild clean \    -workspace ios/jitsi-meet.xcworkspace \    -scheme JitsiMeetSDKxcodebuild archive \    -workspace ios/jitsi-meet.xcworkspace \    -scheme JitsiMeetSDK  \    -configuration Release \    -sdk iphonesimulator \    -destination='generic/platform=iOS Simulator' \    -archivePath ios/sdk/out/ios-simulator \    VALID_ARCHS=x86_64 \    ENABLE_BITCODE=NO \    SKIP_INSTALL=NO \    BUILD_LIBRARY_FOR_DISTRIBUTION=YESxcodebuild archive \    -workspace ios/jitsi-meet.xcworkspace \    -scheme JitsiMeetSDK  \    -configuration Release \    -sdk iphoneos \    -destination='generic/platform=iOS' \    -archivePath ios/sdk/out/ios-device \    VALID_ARCHS=arm64 \    ENABLE_BITCODE=NO \    SKIP_INSTALL=NO \    BUILD_LIBRARY_FOR_DISTRIBUTION=YESxcodebuild -create-xcframework \    -framework ios/sdk/out/ios-device.xcarchive/Products/Library/Frameworks/JitsiMeetSDK.framework \    -framework ios/sdk/out/ios-simulator.xcarchive/Products/Library/Frameworks/JitsiMeetSDK.framework \    -output ios/sdk/out/JitsiMeetSDK.xcframeworkcp -a node_modules/react-native-webrtc/apple/WebRTC.xcframework ios/sdk/out

replacing JitsiMeetSDK with name of my project but

xcodebuild archive \

command, does not add Library/Frameworks/ and hence there is no Products/Library/Frameworks/xyz.framework \

so I get this error which makes sense

error: the path does not point to a valid framework: 

Question: What does Jitsi do in their react-native ios Sdk that they get Products/Library/Frameworks/?

Jitsi Repo link: https://github.com/jitsi/jitsi-meet

ERROR: I don't get a bell when there's a notification from firebase

$
0
0

im has create an application to control devices and receive thông báo từ firebase. a has a problem when receive notification on android and ios. when application is open i can received notification and notification has ring, but on android when app to stoped, i received notification but not have ring, when app run background i received notification and ring, on Ios when app run background and stoped, both have notification but not ring.enviroment:react: 16.8.6react-native: 0.60.5,react-native-firebase: 5.5.6Looking support to hearing from everyone. Thanks everyone!

CocoaPods could not find compatible versions for pod "Firebase/Everything"

$
0
0

I am getting this error when I am trying to run my React Native app in iOS:

[!] CocoaPods could not find compatible versions for pod "Firebase/Auth":  In Podfile:    Firebase/Auth    RNFBAuth (from `../node_modules/@react-native-firebase/auth`) was resolved to 10.5.1, which depends on      Firebase/Auth (~> 7.4.0)CocoaPods could not find compatible versions for pod "Firebase/CoreOnly":  In Podfile:    Firebase/Crash was resolved to 5.0.0, which depends on      Firebase/Core (= 5.0.0) was resolved to 5.0.0, which depends on        Firebase/CoreOnly (= 5.0.0)    RNFBApp (from `../node_modules/@react-native-firebase/app`) was resolved to 10.5.0, which depends on      Firebase/CoreOnly (~> 7.4.0)    RNFBDatabase (from `../node_modules/@react-native-firebase/database`) was resolved to 10.5.1, which depends on      Firebase/Database (~> 7.4.0) was resolved to 7.4.0, which depends on        Firebase/CoreOnly (= 7.4.0)CocoaPods could not find compatible versions for pod "Firebase/Database":  In Podfile:    Firebase/Database    RNFBDatabase (from `../node_modules/@react-native-firebase/database`) was resolved to 10.5.1, which depends on      Firebase/Database (~> 7.4.0)CocoaPods could not find compatible versions for pod "Firebase/Firestore":  In Podfile:    Firebase/Firestore    RNFBFirestore (from `../node_modules/@react-native-firebase/firestore`) was resolved to 10.5.1, which depends on      Firebase/Firestore (~> 7.4.0)CocoaPods could not find compatible versions for pod "Firebase/Messaging":  In Podfile:    Firebase/Messaging    RNFBMessaging (from `../node_modules/@react-native-firebase/messaging`) was resolved to 10.5.1, which depends on      Firebase/Messaging (~> 7.4.0)CocoaPods could not find compatible versions for pod "Firebase/Storage":  In Podfile:    Firebase/Storage    RNFBStorage (from `../node_modules/@react-native-firebase/storage`) was resolved to 10.5.1, which depends on      Firebase/Storage (~> 7.4.0)CocoaPods could not find compatible versions for pod "FirebaseCore":  In Podfile:    Firebase/Crash was resolved to 3.9.0, which depends on      Firebase/Core (= 3.9.0) was resolved to 3.9.0, which depends on        FirebaseCore (= 3.4.4)    RNFBDatabase (from `../node_modules/@react-native-firebase/database`) was resolved to 10.5.1, which depends on      Firebase/Database (~> 7.4.0) was resolved to 7.4.0, which depends on        Firebase/CoreOnly (= 7.4.0) was resolved to 7.4.0, which depends on          FirebaseCore (= 7.4.0)    RNFBDatabase (from `../node_modules/@react-native-firebase/database`) was resolved to 10.5.1, which depends on      Firebase/Database (~> 7.4.0) was resolved to 7.4.0, which depends on        FirebaseDatabase (~> 7.4.0) was resolved to 7.4.0, which depends on          FirebaseCore (~> 7.0)CocoaPods could not find compatible versions for pod "FirebaseInstanceID":  In Podfile:    Firebase/Crash was resolved to 3.2.0, which depends on      FirebaseCrash (= 1.0.4) was resolved to 1.0.4, which depends on        FirebaseInstanceID (~> 1.0)    RNFBMessaging (from `../node_modules/@react-native-firebase/messaging`) was resolved to 10.5.1, which depends on      Firebase/Messaging (~> 7.4.0) was resolved to 7.4.0, which depends on        FirebaseMessaging (~> 7.4.0) was resolved to 7.4.0, which depends on          FirebaseInstanceID (~> 7.0)

My package.json is:

{"name": "prueba3000","version": "1.1.0","private": true,"scripts": {"android": "react-native run-android","ios": "react-native run-ios","start": "react-native start","test": "jest","eslint": "eslint **/*.tsx **/*.ts","build-testing": "cd android && ./gradlew assembleRelease","build-android": "cd android && ./gradlew bundleRelease","clean": "cd android && ./gradlew clean","postinstall": "npx jetify"  },"dependencies": {"@fortawesome/fontawesome-svg-core": "^1.2.28","@fortawesome/free-solid-svg-icons": "^5.13.0","@fortawesome/react-native-fontawesome": "^0.2.3","@react-native-community/async-storage": "^1.9.0","@react-native-community/clipboard": "^1.5.1","@react-native-community/datetimepicker": "^3.0.8","@react-native-community/geolocation": "^2.0.2","@react-native-community/hooks": "^2.6.0","@react-native-community/image-editor": "^2.3.0","@react-native-community/masked-view": "^0.1.7","@react-native-community/slider": "^3.0.3","@react-native-firebase/app": "^10.5.0","@react-native-firebase/auth": "^10.5.1","@react-native-firebase/database": "^10.5.1","@react-native-firebase/firestore": "^10.5.1","@react-native-firebase/messaging": "^10.5.1","@react-native-firebase/storage": "^10.5.1","@react-navigation/native": "^5.1.3","@react-navigation/stack": "^5.2.6","@types/bcrypt": "^3.0.0","bcrypt": "^5.0.0","json2formdata": "^1.0.4","lottie-ios": "^3.1.3","lottie-react-native": "^3.3.2","moment": "^2.24.0","object-to-formdata": "^4.1.0","react": "17.0.1","react-native": "^0.63.4","react-native-camera": "^3.31.0","react-native-countdown-component": "^2.7.1","react-native-device-info": "^7.3.1","react-native-document-picker": "^4.1.0","react-native-fs": "^2.16.6","react-native-gesture-handler": "^1.9.0","react-native-gifted-chat": "^0.16.3","react-native-linear-gradient": "^2.5.6","react-native-modal-datetime-picker": "^9.1.0","react-native-progress": "^4.1.2","react-native-reanimated": "^2.0.0-alpha.9.2","react-native-safe-area-context": "^3.1.9","react-native-screens": "^2.4.0","react-native-splash-screen": "^3.2.0","react-native-svg": "^12.0.3","react-native-video": "^5.1.0-alpha8","react-native-video-controls": "^2.6.0","rn-fetch-blob": "^0.12.0","sprintf-js": "^1.1.2","tipsi-stripe": "^7.5.3"  },"devDependencies": {"@babel/core": "^7.12.9","@babel/plugin-proposal-optional-chaining": "^7.9.0","@babel/runtime": "^7.8.7","@react-native-community/eslint-config": "^2.0.0","@svgr/cli": "^5.2.0","@types/jest": "^26.0.16","@types/react": "^17.0.0","@types/react-native": "^0.63.37","@types/react-test-renderer": "^17.0.0","@typescript-eslint/eslint-plugin": "^4.9.0","@typescript-eslint/parser": "^4.9.0","babel-eslint": "^10.1.0","babel-jest": "^26.6.3","eslint": "^7.15.0","eslint-config-airbnb": "^18.1.0","eslint-plugin-import": "^2.20.1","eslint-plugin-jsx-a11y": "^6.2.3","eslint-plugin-react": "^7.19.0","faker": "^5.1.0","jest": "^26.6.3","jest-transform-stub": "^2.0.0","jetifier": "^1.6.6","metro-react-native-babel-preset": "^0.64.0","react-test-renderer": "17.0.1","typescript": "^4.1.2"  },"jest": {"preset": "react-native"  },"type": "module"}

In my Podfile, I have this: platform :ios, '10.1' And I have tried also with 10.0 and 9.0.

I have run:pod installnpx pod installpod install --repo-update and pod update Firebase/core.

When running pod update Firebase/core I got this error: [!] No `Podfile.lock' found in the project directory, run `pod install'.. But I can't do pod install.

If anyone could give a gint of how solve this, I would really appreciate that. Thanks!

required condition is false: IsFormatSampleRateAndChannelCountValid(format) got in react-native-community voice

$
0
0

2021-06-21 15:55:37.951823+0530 Provider[10264:187500] [javascript] Text To speech started2021-06-21 15:55:37.956761+0530 Provider[10264:203268] [avae] AVAEInternal.h:76 required condition is false: [AVAEGraphNode.mm:823:CreateRecordingTap: (IsFormatSampleRateAndChannelCountValid(format))]2021-06-21 15:55:37.958606+0530 Provider[10264:203268] [Error] - com.apple.coreaudio.avfaudio required condition is false: IsFormatSampleRateAndChannelCountValid(format)2021-06-21 15:55:37.978865+0530 Provider[10264:187500] [javascript] 'onSpeechStart: ', undefined2021-06-21 15:55:37.979514+0530 Provider[10264:187500] [javascript] 'onSpeechError: ', 'required condition is false: IsFormatSampleRateAndChannelCountValid(format)'

How to set zoom level in google map according to miles in react native?

$
0
0

I have react native application using react-native-maps,in which there is a feature to display near by users based on radius chosen by user that works fine using geocode. but I am facing problem to set zoom level of Map based on user radius? if user selects maximum meter of radius then map should display whole world? How can I achieve this? to set zoom level dynamically based on radius chosen by user?

to set radius used react-native-slider, How can set zoom level on slide of slider?


Error while running my existing react native project for iOS

$
0
0

I am working on an existing react native project which is working fine in Windows OS but when I'm going to run it in Mac OS for iOS part, it throws me some error also I don't know if we solve this error then how much next errors are waiting for me.

Cannot initialize parameter of type 'NSArray<id<RCTBridge... RCTCxxBridge.mm

Package.json file

"name": "SaveAMeal","version": "0.0.1","private": true,"scripts": {"start": "node node_modules/react-native/local-cli/cli.js start","test": "jest"  },"dependencies": {"@react-native-community/async-storage": "^1.2.2","@react-native-community/masked-view": "^0.1.10","@react-native-community/progress-bar-android": "^1.0.3","moment": "^2.24.0","native-base": "^2.12.1","react": "16.8.3","react-native": "0.59.8","react-native-check-box": "^2.1.7","react-native-device-info": "^5.5.3","react-native-fetch-blob": "^0.10.8","react-native-gesture-handler": "^1.10.3","react-native-iap": "^4.4.2","react-native-linear-gradient": "^2.5.6","react-native-masked-text": "^1.13.0","react-native-material-dropdown": "^0.11.1","react-native-modal-dropdown": "^0.7.0","react-native-orientation": "^3.1.3","react-native-popup-dialog": "^0.18.3","react-native-reanimated": "^1.13.2","react-native-responsive-fontsize": "^0.1.8","react-native-responsive-screen": "^1.2.2","react-native-router-flux": "^4.0.6","react-native-safe-area-context": "^3.2.0","react-native-screens": "^2.3.0","react-native-size-matters": "^0.2.1","react-native-star-rating": "^1.1.0","react-native-view-pdf": "^0.10.2","react-native-wheel-pick": "^1.0.9","react-navigation": "^4.0.10","react-number-format": "^4.4.1","react-phone-number-input": "^3.0.21","react-redux": "^7.0.3","redux": "^4.0.1","redux-persist": "^5.10.0","redux-thunk": "^2.3.0","rn-fetch-blob": "^0.12.0"  },"devDependencies": {"@babel/core": "^7.4.4","@babel/runtime": "^7.4.4","@types/react-phone-number-input": "^3.0.3","babel-jest": "^24.8.0","jest": "^24.8.0","jetifier": "^1.6.5","metro-react-native-babel-preset": "^0.54.0","react-test-renderer": "16.8.3"  },"jest": {"preset": "react-native"  },"rnpm": {"assets": ["./assets/fonts/"    ]  }

Why won't image stay the same size when i add Horizontal Scrollview?

$
0
0

I'm trying to make the pictures slide horizontally. I've added ScrollView horizontal around the post, which made it scroll horizontally but it shrank the image. How do I make it stay normal size? It stretched all the way across (with padding) before.

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.

Drop down values are overlapping in IOS - React Native, Expo

$
0
0

I am new to React Native,I am creating react native application using expo client.I have used Picker from @react-native-community/picker,In IOS platform the picker values are Overlapping (below image).

enter image description here

here my code:

import { Picker } from "@react-native-community/picker";export default function PropertyInfo() {  const [usaStates, setUsaStates] = useState(usStates);  return (<SafeAreaView style={styles.safeAreaContainer}><View style={styles.container}><View style={styles.picker}><Picker                    selectedValue={selectedState}                    onValueChange={(itemValue) => setSelectedState(itemValue)}                    mode="dropdown"                    style={styles.pickerItem}                    itemStyle={styles.pickerItem}>                    {usaStates.map((item) => {                      return (<Picker.Item                          style={styles.pickerItem}                          label={item.name}                          value={item.abbreviation}                          key={item.abbreviation}                        />                      );                    })}</Picker></View></View></SafeAreaView>}const styles = StyleSheet.create({ safeAreaContainer: {    flex: 1,    backgroundColor: "#FFF",    marginBottom: 8,  },container: {    flex: 1,    justifyContent: "center",    marginLeft: 20,    marginRight: 20,    marginTop: 20,  },picker: {    backgroundColor: "#FFF",    borderRadius: 2,    borderColor: "#DFE1E4",    borderStyle: "solid",    borderWidth: 1,    color: "#394049",    width: "100%",    height: 40,    marginTop: 12,    marginBottom: 16,    justifyContent: "center",  },pickerItem: {    color: "#394049",    letterSpacing: 0.001,    fontStyle: "normal",    fontFamily: "OpenSans_400",    fontSize: 14,  },})

my package.json:

@react-native-community/picker": "^1.8.1

But I need like this:enter image description here

Thanks in advance.

React Native 0.64.0 iOS Build Error `ld: library not found for -lAppAuth`

$
0
0

I've been stuck on this a few days now, trying to build my RN project for iOS and facing the error.

ld: library not found for -lAppAuthclang: error: linker command failed with exit code 1 (use -v to see invocation)

Here are the things I have tried so far, that have not worked:

  • Currently opening .xcworkspace file in XCode to run build from, not .xcodeproj

  • Build cleaned, with pod clean run as well as pod cache clear --all

  • Project Build Settings > Library Search Paths > currently contains:"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)""$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)""$(PROJECT_DIR)/Pods"

  • Modified Build Phases to include the libAppAuth.a library like thisimage here

  • Changed settings of Build Active Architecture to No in Build Settings

  • I've checked and the -L-L problem faced here does not occur. In fact,very little info is being specified on what the issue may be in the erroring, here

  • I have tried this on both the old and new build system

Will appreciate any help that can be given. Thanks. I'm stuck being unable to develop my iOS RN build at the moment. Both the XCode build and the React Native build are failing

"react-native run-ios" command line does not work

$
0
0

Description

First error:

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 awesome.xcworkspace.

couple of warnings:

warning: Mapping architecture arm64 to x86_64. Ensure that this target’s Architectures and Valid Architectures build settings are configured correctly for the iOS Simulator platform. (in target ‘React-jsiexecutor’ from project ‘Pods’)warning: None of the architectures in ARCHS (i386, x86_64) are valid. Consider setting ARCHS to $(ARCHS_STANDARD) or updating it to include at least one value from VALID_ARCHS (i386, x86_64) which is not in EXCLUDED_ARCHS (x86_64). (in target ‘React-jsiexecutor’ from project ‘Pods’)

last error:

The following build commands failed:PhaseScriptExecution [CP]\ Copy\ XCFrameworks /Users/sammie/Library/Developer/Xcode/DerivedData/awesome-fgqovmpltvmybwfboirbhkzybyqx/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/OpenSSL-Universal.build/Script-329FE3CB18B30DBF34BE47031BE8F397.sh(1 failure)

React Native version:

OS: macOS 10.15CPU: (6) x64 Intel(R) Core(TM) i5-9400F CPU @ 2.90GHzMemory: 321.19 MB / 16.00 GBShell: 5.7.1 - /bin/zshBinaries:Node: 14.17.0 - /usr/local/bin/nodeYarn: 1.22.10 - /usr/local/bin/yarnnpm: 6.14.13 - /usr/local/bin/npmWatchman: 4.9.0 - /usr/local/bin/watchmanManagers:CocoaPods: 1.10.1 - /usr/local/bin/podSDKs:iOS SDK:Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1Android SDK:API Levels: 30Build Tools: 30.0.3, 31.0.0System Images: android-29 | Android TV Intel x86 Atom, android-30 | Google APIs Intel x86 AtomAndroid NDK: Not FoundIDEs:Android Studio: 4.2 AI-202.7660.26.42.7351085Xcode: 11.2/11B52 - /usr/bin/xcodebuildLanguages:Java: 1.8.0_292 - /usr/bin/javacnpmPackages:@react-native-community/cli: Not Foundreact: 17.0.1 => 17.0.1react-native: 0.64.2 => 0.64.2react-native-macos: Not FoundnpmGlobalPackages:react-native: Not Found

Steps To Reproduce

What I did:

-remove react-native cli globally and reinstall it.

-delete pods and pod lock files and reinstall pods

-commented some lines in pod file

-deleted "build" directory

-...

Expected Results

react native run ios command line works properly.

Viewing all 17301 articles
Browse latest View live