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

dyld: Library not loaded: @rpath/AgoraAIDenoiseExtension.framework/AgoraAIDenoiseExtension Referenced from

$
0
0

After upgrading Agora SDK for react-native the app is not opening and this is the error I get in my Xcode.

dyld: Library not loaded: @rpath/AgoraAIDenoiseExtension.framework/AgoraAIDenoiseExtension  Referenced from

Device: Mackbook Bro 16 inchMacOS 10.15.6

Node version: v15.14.0Npm version: 7.7.6react-native-cli: 2.0.1


backboardd using extreme CPU on iPhone 6s/iOS 12 simulator?

$
0
0

I have an app that works just fine on newer devices but I have to debug a specific issue for older devices, so I downloaded iOS 12 and iPhone 6s simulator.

After launching my app, I've started fans running extremely fast and my MacBook's battery draining super fast, so I've launched Activity Monitor and saw this:

enter image description here

backboardd is using extreme amount of CPU when my app is in foreground. If I kill or background my app, it goes back to normal. My app, which I've redacted it's name with the red highlight on the screenshot, consumes a normal amount of CPU.

This issue isn't present on any newer device nor simulator, but only happening on this old sim that I've downloaded. What's going on? (My app is a React Native app so checking Objective-C breakpoints/profiling wouldn't make a lot of sense)

Unable to resolve module ../../App from /Users/jordancuff/dev/app10-react-native/node_modules/expo/AppEntry.js:

$
0
0

I am a beginner programmer and everything was going great until I kept getting the following message.

Unable to resolve module ../../App from /Users/jordancuff/dev/app10-react-native/node_modules/expo/AppEntry.js:

  • App(.native|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json)
    • App/index(.native|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json)1 | import registerRootComponent from 'expo/build/launch/registerRootComponent';2 |

3 | import App from '../../App';| ^4 |5 | registerRootComponent(App);6 |

This is happening on every project I create now. Can anybody assist?

Runtime is not ready for debugging when running a React-Native

$
0
0

Why am i getting this error even though I cleaned the pod file in VS Code when running a React-Native project.

enter image description here

I used npx react-native run-ios to run the project. This is the first react native project I made and I can't get over this error.

React Native Axios.get returned results not fresh

$
0
0

I'm using axios to fetch data for my React Native app and I'm having an issue only for iOS. I am able to fetch data from my server perfectly fine, however if I change any data from my API, the changes doesn't reflect in iOS at all, only when I re-install the app then the changes will take place. I'm still not able to pinpoint what is causing the issue. This is only happening in iOS, Android works perfectly fine.

Fetch Data code:

axios.get('http://www.example.com/api').then((response) => {  // console.log(response);  this.setState({ data: response.data, loading: false });});

Please let me know if I miss out any information.

If this has already been asked, I would greatly appreciate if you are able to point me in the right direction.

Thank you so much!

React Native Vertical Delivery Progress Bar

$
0
0

How can I put a Vertical progress bar on React Native

I need to make a delivery bar progress

**Example: driver is at point A and needs to go to point B ...**

It is possible to have multiple apps with the same code base but different client names?

$
0
0

I'm working with react-native to develop an app, my question is if it is possible to take the same code and just change the client data (like app name, colors, icons, etc) or if there is a restriction from the google play store or the apple app store

Add custom font family in React Native iOS

$
0
0

I would like add custom font family on my React Native App on iOS. I've no problem with Android, but i've an error in iOS :

Unrecognized font family 'dinproRegular'

I've use this link for setup my font, but no result.

File name : dinproRegular.ttf

Call in react-native : fontFamily: "dinproRegular" // Test with "Dinpro Regular" too

No result :(

Anyone have idea ?


How to change App Display Name in Expo Managed app after publishing to App Store?

$
0
0

We have an Expo managed app. Initially we’ve set expo.name to Bridge - Debit Card in app.json file. We successfully released it into both stores - App Store and Google Play.

But later we noticed that app display name (the app name on device desktop right under the app icon) looks clumsy. It looks like BridgeDe... on iOS.

So, we changed expo.name to simply Bridge, rebuilt the standalone app, and posted new binaries into both app stores again.

Google Play just ate new binaries without any problems, the new short app name appeared on Android devices.

But we can’t pass Apple verification during uploading .ipa file. We use Transporter app on Mac. It shows an error:

ITMS-90129: The bundle uses a bundle name or display name that is already taken.

But we have no apps with such name in AppStore.

We tried to return expo.name to old value Bridge - Debit Card and add CFBundleDisplayName (and later CFBundleName) with Bridge value into expo.ios.infoPlist, but no luck: app released in AppStore just fine (verification passed with old expo.name), but has a long and truncated name under app icon. So, that option simply didn't do a trick, nothing changed.

This is an app.json example of our app:

{"expo": {"name": "Bridge - Debit Card","slug": "bridge-debit-card","owner": "bridge","ios": {"buildNumber": "1.0.4","icon": "./assets/images/icon.png","googleServicesFile": "./GoogleService-Info.plist","infoPlist": {"CFBundleDisplayName": "Bridge",      }   }}

Could someone suggest a solution how to achieve our goal: have shorter app name on device desktop and longer name in the App Store listings? Important note that our apps already published. I don't want to eject and change bundleIdentifier.

I will appreciate any help, any idea!

Getting no profile matching issue, profile created with Match as AdHoc but error as AppStore profile not found

$
0
0

I am running my fastlane on github actions, it works fine in my local machine, the profile which I have created ismatch AdHoc com.app.development but while running in github actions its throwing error as below, I want to simply build an IPA and post it on firebase app distribution which does work locally.

What am I missing here ? trying for last 48 hours but same result with multiple permutations of fastlane actions with parameters

 error: No profile for team 'HNXXXXXXXX' matching 'match AppStore com.app.development' found: Xcode couldn't find any provisioning profiles matching 'HNXXXXXXXX/match AppStore com.app.development'. Install the profile (by dragging and dropping it onto Xcode's dock item) or select a different one in the Signing & Capabilities tab of the target editor. (in target 'app2' from project 'app2')

enter image description here

Thanks for your time

How to change Google Mapview Polyline Stroke Style Dashed Style Line Using React Native?

$
0
0

In My Scenario, I have Implemented in my application Google MapView using "react-native-maps" npm package. In this package as per my requirement I have to draw a dashed circle polyline, like below mentioned image Green line should be dashed stroke style. How to change it like dashed or dotted stroke style line.

enter image description here

<Polyline            coordinates={[              { latitude: 37.88045, longitude: -122.4324 },              { latitude: 37.78825, longitude: -122.3903 },            ]}            strokeWidth={3}            lineDashPattern={[170, 170]}          /> 

How to pass NSData from javascript to swift 5?

$
0
0

I am trying to call the write method of CoreBluetooth from react-native. I have created a mediator class and created a write method on it.Here it is:

  @objc func write(_ serviceUUID: String, _ charecteristicsUUID: String, _ data: NSData){  }

I'm creating a native module that uses the CoreBluetooth.framework. I'm trying to implement an RCT_EXPORT_METHOD that will call this Bluetooth write method. I am trying to call it from javascript but I don't have any idea how to pass NSData from the javascript to swift native module.

I have already seen this. This is not working as expected.

Any lead would be appreciated.

Is it possible to redirect to native settings pages for subscription management from React Native?

$
0
0

I am trying to redirect to the subscription pages on React Native.

The code I've found online for how to do that is this:

Linking.openURL("https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/manageSubscriptions");

For iOS

And this:

    Linking.openURL("https://play.google.com/store/account/subscriptions?package=YOUR_PACKAGE_NAME&sku=YOUR_PRODUCT_ID"    );

For Android.

I can't test the Android link yet, as I do not have the relevant package name or product ID created yet, but I have tried the iOS link, and it does not redirect to the settings/subscription management page.

All I get is this error message with the iOS link (on a physical device - as well as in the simulator) - even though I am absolutely signed into my Apple accounts on the physical device:

pings metrics dialogIdMZFinance.ManageSubscriptionsLoginRequired messageSign in to manage subscri messageCode5074 options Manage Subscriptions CancelactionUrlbuy.itunes.apple.com/WebObjects/MZFinance.woa/wa/manageSubscriptionseventTypedialog failureType5074 customerMessageSign in to manage subscriptions. m-allowed dialog kindauthorization m-allowed messageSign in to manage subscriptions.explanationEnter your Apple ID and password and click Manage Subscriptions.defaultButtonok okButtonStringManage Subscriptions okButtonActionkindGotourlhttps://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/com.apple.jingle.app.finance.DirectAction/manageSubscriptionscancelButtonStringCancel initialCheckboxValue cancel-purchase-batch

I want users to be able to click a button and be sent to that page (in case they want to cancel a subscription).

Is there a way to do this?

How to fix yarn ios build error in React Native?

$
0
0

When I run:

yarn ios

it throws this error:

The following build commands failed:        PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/applemacbook/Library/Developer/Xcode/DerivedData/AwesomeProject-dqnlgtsougxpuwdghrmclyntrevj/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-1FA6E1255725D37983E4E9DE0E0B6F29.sh(1 failure)info Run CLI with --verbose flag for more details.error Command failed with exit code 1.info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Error Image

error Couldn't find "PLATFORM_NAME" variable in xcodebuild output

$
0
0

I'm trying to run my application on an iPhone simulator. from the console, I can see the build was successful. but on the next line, I get this.

error Couldn't find "PLATFORM_NAME" variable in xcodebuild output. Please report this issue and run your project with Xcode instead. react-native.


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

$
0
0

Please check the code ,

import {   Alert,} from 'react-native'; checkForSendingOtp = () => {    let hash = 'aBcDeGgd';    Platform.OS === 'android'     ? RNOtpVerify.getHash()        .then(text => {          hash = text +''.replace('[', '');          hash = hash +''.replace(']', '');        })        .then(() => {          this.sendDataForOtp(hash);        })        .catch(console.log)    : this.sendDataForOtp(hash);  };sendDataForOtp(hash) {axios.post(url,{hash:hash}).then(response=>{  Alert.alert('Login Failed','Multiple Logins Are Found. \n Logout From All Other Devices to Continue.',    [      {        text: 'Proceed ?',        onPress: () => {}                             },      {        text: 'No',        onPress: () => {},      },    ],    {cancelable: false},   );  });}render() {   return (<Ripple        style={{           position: 'absolute',           top: 0,           bottom: 0,           left: 0,           right: 0,              }}        onPress={this.checkForSendingOtp}    />)}

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

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

Linking.openURL sample code doesn't work on certain Android phones

$
0
0

While I am trying to use the following sample code from react native document for implementing opening browser function on Android, I found it won't work on some model such as Pixel 4, Pixel 5 and Samsung S20 etc.

// https://reactnative.dev/docs/linkingconst supported = await Linking.canOpenURL(url);if (supported) {  // Opening the link with some app, if the URL scheme is "http" the web link should be opened  // by some browser in the mobile  await Linking.openURL(url);} else {  Alert.alert(`Don't know how to open this URL: ${url}`);}

But it works when I make a modify:

Linking.openURL(url).catch(() => console.error(`Don't know how to open this URL: ${url}`));

Although it works but I am not sure why the supported is always false in the first case. Thank you so much.

How to set Grid View in React Native using FlatList

$
0
0

I am facing an issue on setting Grid View using FlatList component of react-native. I have set numColumns to 2 but still my list coming vertically rendering single item.

Please view attached images

  1. Grid view design I am trying to do.[1]: https://i.stack.imgur.com/5BPbZ.png

  2. Single Item design I am getting[2]: https://i.stack.imgur.com/tE6hx.png

  3. FlatList properties.

     const CategoriesScreen = props => { const renderGridItem = (itemData) => {     return(<CategoryGridTitle             catTitle={itemData.item.title}             catColor={itemData.item.color}             onSelect={() => {                 props.navigation.navigate({                     routeName:'CategoryMeals',                     params: {                         categoryId:itemData.item.id,                         categoryTitle:itemData.item.title                     }                 });             }}></CategoryGridTitle>     ); } return(<View style={styles.mainContainer}><FlatList             horizontal={false}             data = {CATEGORIES}             renderItem={renderGridItem}             numCloumns={2}/></View>       );

    }

    const styles = StyleSheet.create({mainContainer:{

             } });
  4. FlatList item design

     const CategoryGridTitle = (props) => { let OnTouchable = TouchableOpacity; if(Platform.OS === 'android'&& Platform.Version >= 21){     OnTouchable = TouchableNativeFeedback; } return(<OnTouchable onPress={props.onSelect}>         {/* merging styles below using ... */}<View style={{...styles.conatiner,...{backgroundColor:props.catColor}}}> <Text style={styles.titleStyle}>{props.catTitle}</Text></View></OnTouchable> );

    }

const styles = StyleSheet.create({conatiner:{padding:10,margin:10,borderRadius:5,elevation:3,shadowColor:'black',shadowOpacity:0.22,shadowRadius:5,shadowOffset:{width:0,height:1}},titleStyle:{color:'white',fontSize:22},});

Please help me on this.

React-native contents of KeyboardAvoidingView in parent Dialog

$
0
0

I have <Dialog> with a child <KeyboardAvoidingView> that prompts input fields for users. when field is focused and keyboard is prompted; <KeyboardAvoidingView> contents gets shifted above keyboard properly but the <Dialog> view stays put, which makes the contents of <KeyboardAvoidingView> shift outside view and becomes unreadable.

Snippet:

<Dialog         keyboardShouldPersistTaps={"always"}         visible={true}         animationType="fade"         dialogStyle={[           this.state.orientation === "portrait"             ? { width: "85%" }             : { width: "75%" },           { minHeight: hp("30%"), borderRadius: 15 },         ]}         overlayStyle={{ alignItems: "center" }}         onTouchOutside={() => {}}><KeyboardAvoidingView             keyboardShouldPersistTaps={"always"}             behavior="position"             keyboardVerticalOffset={350}></KeyboardAvoidingView></Dialog>

How can I improve the launch time react native app?

$
0
0

I've already published an app for IOS and Android.

But the app makes launch time around 5 seconds.

I detect it to make around 5 seconds to load the first screen in Routes

The app.tsx code below:

import React, {useEffect} from 'react';import configureStore from './Store';import {SafeAreaProvider} from 'react-native-safe-area-context';import {Provider} from 'react-redux';import {PersistGate} from 'redux-persist/es/integration/react';import {NavigationContainer} from '@react-navigation/native';import Routes from './configs/Routes';import {navigationRef} from './services/NavigationService';import {LocalizationProvider} from './locales/Translation';import ModalContainer from './modules/ModalGlobal/containers/ModalContainer';import NetInfoContainer from './containers/NetInfoContainer';import {  listenNotificationForeground,  requestUserPermission,} from './services/NotificationService';import axios from 'axios';import {removeCurrentSession} from './modules/Setting/service/SettingService';import {UNAUTHORIZED} from './configs/Constants';axios.interceptors.response.use(  response => response,  error => {    const {status} = error.response;    if (status === UNAUTHORIZED) {      removeCurrentSession();    }    return Promise.reject(error);  },); // User for HTTP code difirrent 200 from axiosconst App = () => {  useEffect(() => {    let listenBackground: any;    async function _notificationHandle() {      await requestUserPermission();      listenBackground = listenNotificationForeground();    }    _notificationHandle();    return listenBackground;  }, []);  return (<Provider store={configureStore().store}><PersistGate loading={null} persistor={configureStore().persistor}><SafeAreaProvider><LocalizationProvider>     // Locale language<NetInfoContainer />     // Use to show lost connection<NavigationContainer ref={navigationRef}><Routes /></NavigationContainer><ModalContainer />      // Define global modal to use many routes</LocalizationProvider></SafeAreaProvider></PersistGate></Provider>  );};export default App;

Could I improve anything in this code? Or any way to improve launch time?

Thank you very much!

Viewing all 16907 articles
Browse latest View live


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