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

When should I use React Native CLI instead of Expo for my project?

$
0
0

I'm starting a new project with React Native and I'm trying to decide between using React Native CLI and Expo. I understand that both have their own advantages and use cases, but I'm not entirely sure which one would be best for my situation. Here are a few details about my project:

Scale: The project will start small but is expected to scale significantly over time.

Complexity: I anticipate needing to integrate a variety of custom native modules and possibly write some native code myself.

Timeline: I need to get a working prototype up and running quickly, but long-term maintainability and performance are crucial.

Team: My team has some experience with JavaScript and React, but limited experience with native development.

Platform: We are targeting both iOS and Android from the start.

i tried expo environment and it's very cool i guess i can't see big differences i just wanted to know what's the scale that i should go for when i need to use CLI instead of expo


"message": "There was an unexpected error -- try again in a few seconds" how to solve this error in stripe payment gateway

$
0
0

Hy am getting this error from last 3 days in this code I think may be all the things are working fine but after payment done when "confirm_payment()" function called I get this error continue in stripe payment gateway using React Native here is my code can anyone help me to get rid out of this error -

when "confirm_payment()" function is called i get this response in my terminal i tried all the things but nothing is working for me.

error : -       {"code": "Failed", "declineCode": null, "localizedMessage": "There was an        unexpected error -- try again in a few seconds", "message": "There was an        unexpected error -- try again in a few seconds", "stripeErrorCode": null, "type": null} const { initPaymentSheet, presentPaymentSheet, confirmPaymentSheetPayment } = useStripe();useEffect(() => {    initStripe({ publishableKey: "pk_test_51JUm2TSHumMvEDNY3mFcrddvlTqUIzxoHqyIuCT2x8ExzZcbcTLB9kAZWY1eT9ZJnIeBSHtxtkNCq5QjcDf2e2ge00knO9Qx1R" })}, [])async function booknow(item) {    if (item.sm_booking_type == 1) {        navigation.navigate('DriverServicesScreen', { user_data: user_data_1, item: item })    } else {        const additional_data = await AsyncStorage.getItem( 'additional_data');        var num = JSON.parse(additional_data);        var dataOk = new FormData();        dataOk.append('amount', item.sm_price * 100);        await axios(API_URL, {            method: 'POST',            headers: { Accept: 'application/x-www-form-urlencoded', 'Content-type': 'multipart/form-data', timeout: 180000 },            data: dataOk,        }).then((result) => {            if (result['data'].code == 200) {                paymentInitializeFunction(result['data'].client_secret, result['data'].ephemeralKey, result['data'].customer)                console.log("🚀 ~ file: Api.js ~ line 16 ~ API ~ result", JSON.stringify(result['data']))            } else {                console.log("🚀 ~ file: ServicesScreen.js:167 ~ booknow ~ result:", result)            }        }).catch((err) => {            console.log("🚀 ~ file: Api.js ~ line 24 ~ API ~ err", err)        })    }}const paymentInitializeFunction = async (client_secret, ephemeralKey, customer) => {    await initPaymentSheet({        merchantDisplayName: "Example, Inc.",        customerId: customer,        customerEphemeralKeySecret: ephemeralKey,        paymentIntentClientSecret: client_secret,        customFlow: true,        style: 'automatic',        // allowsDelayedPaymentMethods: true,        defaultBillingDetails: {            name: 'Jane Doe',            email: 'foo@bar.com',            phone: '555-555-555',        }    }).then((res) => {        console.log("🚀 ~ file: ServicesScreen.js:195 ~ paymentInitializeFunction ~ error1:", res)    }).catch((res) => {        console.log("🚀 ~ file: ServicesScreen.js:197 ~ paymentInitializeFunction ~ res:", res)    })    await presentPaymentSheet({        paymentIntentClientSecret: client_secret,        clientSecret: client_secret,        customerId: customer,        customerEphemeralKeySecret: ephemeralKey,        customFlow: true,        style: 'automatic',        // allowsDelayedPaymentMethods: true,        defaultBillingDetails: {            name: 'Jane Doe',            email: 'foo@bar.com',            phone: '555-555-555',        }    }).then((res) => {        console.log("🚀 ~ file: ServicesScreen.js:144 ~ paymentInitializeFunction ~ res:", res)        if (res.hasOwnProperty('error')) {            Error_Alert('The payment has been cancelled.');        }        else {            confirm_payment()        }    }).catch((err) => {        console.log("🚀 ~ file: ServicesScreen.js:268 ~ paymentInitializeFunction ~ err:", err)        Error_Alert('Something went wrong, Please try again later.');    })}async function confirm_payment() {    const { error } = await confirmPaymentSheetPayment();    console.log("🚀 ~ file: ServicesScreen.js:231 ~ confirm_payment ~ error:", error)    if (error) {        Alert.alert(`Error code: ${error.code}`, error.message);    } else {        Alert.alert('Success', 'The payment was confirmed successfully!');    }}

React Native App Expo on iOS stops working as soon as it is opened

$
0
0

My application is being developed in react native using expo version 6.3.10 and SDK 51.0.7. Within the application I use the libraries below. The problem is that after building for development profile on IOS, it opens and then closes immediately. Without any logs in my console. Has anyone gone through something similar and managed to fix?

"dependencies": {"@miblanchard/react-native-slider": "^2.6.0","@react-native-async-storage/async-storage": "^1.23.1","@react-native-masked-view/masked-view": "^0.3.1","@react-navigation/bottom-tabs": "^6.5.20","@react-navigation/material-bottom-tabs": "^6.2.28","@react-navigation/material-top-tabs": "^6.6.13","@react-navigation/native": "^6.1.17","@react-navigation/native-stack": "^6.9.26","axios": "^1.6.8","burgos-array": "^1.0.2","burgos-documents": "^1.0.2","burgos-estadosbrasil": "^1.0.1","expo": "~51.0.7","expo-av": "~14.0.5","expo-constants": "~16.0.1","expo-dev-client": "~4.0.14","expo-device": "~6.0.2","expo-file-system": "~17.0.1","expo-font": "~12.0.5","expo-image": "~1.12.9","expo-image-picker": "~15.0.5","expo-keep-awake": "~13.0.2","expo-linear-gradient": "^13.0.2","expo-notifications": "~0.28.2","expo-screen-orientation": "^7.0.4","expo-splash-screen": "~0.27.4","expo-status-bar": "~1.12.1","expo-video-thumbnails": "~8.0.0","formik": "^2.4.5","lodash": "^4.17.21","moment": "^2.30.1","moment-duration-format": "^2.3.2","numeral": "^2.0.6","react": "18.2.0","react-native": "0.74.1","react-native-controlled-mentions": "^2.2.5","react-native-date-picker": "^5.0.1","react-native-element-dropdown": "^2.10.4","react-native-gesture-handler": "~2.16.1","react-native-image-viewing": "^0.2.2","react-native-keyboard-aware-scrollview": "^2.1.0","react-native-linear-gradient": "^2.8.3","react-native-mask-text": "^0.14.2","react-native-pager-view": "^6.3.0","react-native-paper": "^5.12.3","react-native-reanimated": "~3.10.1","react-native-safe-area-context": "4.10.1","react-native-screens": "3.31.1","react-native-skeleton-placeholder": "^5.2.4","react-native-svg": "15.2.0","react-native-tab-view": "^3.5.2","react-native-vector-icons": "^10.0.3","react-number-format": "^5.3.4","socket.io-client": "^4.7.5","uid": "^2.0.2","yup": "^1.4.0"}

I couldn't find the real problem so I don't know where to start

RNDateTimePicker is not working in Android

$
0
0

I'm trying to add DateTimePicker module in Android, but its not working, it's throwing the error

RNDateTimePicker is not found in UIManager

It is working in iOS, but not in android, tried many things to solve this error but couldn't do it.

Is there any other library for DateTimePicker?

Error building an react-native-project in iOS in Xcode

$
0
0

/Users/saan/Library/Developer/Xcode/DerivedData/OneLove-cskgyiozdcaltgbjjotkgypwdqsp/Build/Intermediates.noindex/OneLove.build/Debug-iphonesimulator/OneLove.build/DerivedSources/OneLove_vers.c module map file '/Users/saan/Library/Developer/Xcode/DerivedData/OneLove-cskgyiozdcaltgbjjotkgypwdqsp/Build/Products/Debug-iphonesimulator/react-native-geolocation-service/react_native_geolocation_service.modulemap' not found

This is the error I am facing while trying to build the project in Xcode, I tried many ways to resolve this, but the issue still persists.Not so sure what's the issue with this "react-native-geolocaiton-service". Will be happy if anyone helps me out.

justify text in react native, but last line be rtl

$
0
0

I've some Arabic text in react native, and I want to make it justify (fill the width from both sides), but the last line be right aligned.
When I set textAlign: "justify" style for <Text>, the text is justified properly, except last line. Last line will be in left of the row.
I also tried to use textAlignLast: "right", but it doesn't work in react native.

Any solution?

How to listen App launch and close in React Native?

$
0
0

I need to track some logs event(only once) when App launch and close.

First I do this in Home screen componentDiMount(), but it will be instantiated several times in some case, causing repetitive launch event log.

=============== Edit =================

AppState can only listen background and active event.

When closing app on Android (press back key or close in recents app menu), it actually back to background. It takes the app back to active from background when reopen the app. Which is the same as toggle app between background and active(not close)

So I can't determine whether it is first launch or toggling app status using AppState

Build Error on Xcode 15.3: "Called object type 'facebook::flipper::SocketCertificateProvider' is not a function or function pointer"

$
0
0

I recently updated my Xcode to version 15.3 and encountered an issue while trying to build my React Native app on the simulator. The error message I'm receiving is:

"Called object type 'facebook::flipper::SocketCertificateProvider' is not a function or function pointer."

My react-native version is 0.71.8

Could someone please advise on how to resolve this error and successfully build my React Native app on Xcode 15.3?Any insights or suggestions would be greatly appreciated.

enter image description here


Undefined Symbols in xcode 15

$
0
0

I am building react native app and getting this error in xcode

Undefined symbols for architecture x86_64:"_GULLogBasic", referenced from:_MLKLog in MLKitCommon[x86_64]7"OBJC_CLASS$_AppCenterReactNative", referenced from:in AppDelegate.o"OBJC_CLASS$_AppCenterReactNativeAnalytics", referenced from:in AppDelegate.o"OBJC_CLASS$_AppCenterReactNativeCrashes", referenced from:in AppDelegate.o"OBJC_CLASS$_FKUserDefaultsPlugin", referenced from:in AppDelegate.o"OBJC_CLASS$_FlipperClient", referenced from:in AppDelegate.o"OBJC_CLASS$_FlipperKitLayoutPlugin", referenced from:in AppDelegate.o"OBJC_CLASS$_FlipperKitNetworkPlugin", referenced from:in AppDelegate.o"OBJC_CLASS$_FlipperKitReactPlugin", referenced from:in AppDelegate.o"OBJC_CLASS$_GDTCORTransport", referenced from:in MLKitCommon[x86_64]6"OBJC_CLASS$_GTMLogMininumLevelFilter", referenced from:in MLKitCommon[x86_64]200"OBJC_CLASS$_GTMLogger", referenced from:in MLKitCommon[x86_64]26OBJC_CLASS$_MLKITx_GIPLoggingReroutingGTMLogger in MLKitCommon[x86_64]200"OBJC_CLASS$_GTMSessionCookieStorage", referenced from:in MLKitCommon[x86_64]26"OBJC_CLASS$_GTMSessionFetcher", referenced from:in MLKitCommon[x86_64]26"OBJC_CLASS$_GTMSessionFetcherService", referenced from:in MLKitCommon[x86_64]18"OBJC_CLASS$_GULCCComponent", referenced from:in MLKitCommon[x86_64]11"OBJC_CLASS$_GULCCComponentContainer", referenced from:in MLKitCommon[x86_64]3"OBJC_CLASS$_GULCCComponentType", referenced from:in MLKitCommon[x86_64]3"OBJC_CLASS$_GULUserDefaults", referenced from:in MLKitCommon[x86_64]2"OBJC_CLASS$_RCTBundleURLProvider", referenced from:in AppDelegate.o"OBJC_CLASS$_RCTLinkingManager", referenced from:in AppDelegate.o"OBJC_CLASS$_ReactNativeNavigation", referenced from:in AppDelegate.o"OBJC_CLASS$_SKDescriptorMapper", referenced from:in AppDelegate.o"OBJC_CLASS$_SKIOSNetworkAdapter", referenced from:in AppDelegate.o"OBJC_METACLASS$_GTMLogger", referenced from:OBJC_METACLASS$_MLKITx_GIPLoggingReroutingGTMLogger in MLKitCommon[x86_64]200"_kGTMSessionFetcherStatusDomain", referenced from:___69-[MLKModelDownloader beginModelDownloadWithURL:modelInfo:conditions:]_block_invoke.285 in MLKitCommon[x86_64]18___150-[MLKITx_PHTHeterodyneSyncer batchSyncWithAccounts:syncedScopes:fetchReason:throttlingCache:heterodyneSyncInfo:accountToAuthToken:lastError:callback:]_block_invoke in MLKitCommon[x86_64]48___91-[MLKITx_PHTInternalHeterodyneSyncer syncHoldingLockWithSyncedScopes:fetchReason:callback:]_block_invoke in MLKitCommon[x86_64]51___63-[MLKITx_GMVCloudVisionClient initWithCloudUri:apiKey:options:]_block_invoke in MLKitVision[x86_64]7ld: symbol(s) not found for architecture x86_64clang: error: linker command failed with exit code 1 (use -v to see invocation)

Undefined symbol: _GULLogBasic

Undefined symbol: OBJC_CLASS$_AppCenterReactNative

Undefined symbol: OBJC_CLASS$_AppCenterReactNativeAnalytics

Undefined symbol: OBJC_CLASS$_AppCenterReactNativeCrashes

Undefined symbol: OBJC_CLASS$_FKUserDefaultsPlugin

Undefined symbol: OBJC_CLASS$_FlipperClient

Undefined symbol: OBJC_CLASS$_FlipperKitLayoutPlugin

Undefined symbol: OBJC_CLASS$_FlipperKitNetworkPlugin

Undefined symbol: OBJC_CLASS$_FlipperKitReactPlugin

Undefined symbol: OBJC_CLASS$_GDTCORTransport

Undefined symbol: OBJC_CLASS$_GTMLogMininumLevelFilter

Undefined symbol: OBJC_CLASS$_GTMLogger

Undefined symbol: OBJC_CLASS$_GTMSessionCookieStorage

Undefined symbol: OBJC_CLASS$_GTMSessionFetcher

Undefined symbol: OBJC_CLASS$_GTMSessionFetcherService

Undefined symbol: OBJC_CLASS$_GULCCComponent

Undefined symbol: OBJC_CLASS$_GULCCComponentContainer

Undefined symbol: OBJC_CLASS$_GULCCComponentType

Undefined symbol: OBJC_CLASS$_GULUserDefaults

Undefined symbol: OBJC_CLASS$_RCTBundleURLProvider

Undefined symbol: OBJC_CLASS$_RCTLinkingManager

Undefined symbol: OBJC_CLASS$_ReactNativeNavigation

Undefined symbol: OBJC_CLASS$_SKDescriptorMapper

Undefined symbol: OBJC_CLASS$_SKIOSNetworkAdapter

Undefined symbol: OBJC_METACLASS$_GTMLogger

Undefined symbol: _kGTMSessionFetcherStatusDomain

Linker command failed with exit code 1 (use -v to see invocation)

enter image description here

This looks like Objective-C classes or symbols is not found during the linking or I am not sure... .I have tried everyy possible way , it just not going away. I am stuck one day already, really appreciate some guidance, I am using xcode 15

RN 0.73.2 Xcode 15 Build target hermes-engine: Command PhaseScriptExecution failed with a nonzero exit code

$
0
0

I am facing the following problem after running my project again, the pod installed successfully without any problem, but when running using yarn run ios command, the error as below occurs, has anyone encountered this? like me? please help me. Yesterday I ran React Native version 0.73.1 and it still worked fine. Today, when I upgraded to 0.73.2, the following problem occurred. I also downgraded back to 0.73.1 but still no luck.

enter image description here

Enviroments:

  • Java 18
  • React Native 0.73.2
  • Xcode 15
  • NodeJs 20

React-Native app size is too large in both ios and android (android bundleRelease size is 283.3MB)

$
0
0

I have a react-native app that I build a week ago, when I checked the app size in android it was initialiy 17MB, and that i supposed is okay, but now when i check my apk size its 638MB and the bundle size is 283.3MB. and the ios app size is 180MB

the asset size for the app is 3.6MB and overall src where the assets is also located size is 4.7MB which means my code size is 1.1MB

I haven't added any other libraries, all of the libraries are required for functionality.

my package.json file is here

  {"name": "salushealth","version": "1.0.2","private": true,"scripts": {"android": "react-native run-android","ios": "react-native run-ios","lint": "eslint .","start": "react-native start","test": "jest","pregit": "git status","git": "git add . && git commit -m","postgit": "git push","i-15": "react-native run-ios --simulator='iPhone 15 Pro Max'","iPad": "react-native run-ios --simulator='iPad Pro (12.9-inch) (6th generation)'","run-all": "yarn iPad && yarn i-15 && yarn android"  },"dependencies": {"@apollo/client": "^3.8.8","@preact/signals-react": "^2.0.0","@react-native-async-storage/async-storage": "^1.19.6","@react-native-community/netinfo": "^11.2.1","@react-native-community/slider": "^4.5.0","@react-native-masked-view/masked-view": "^0.3.0","@react-navigation/bottom-tabs": "^6.5.11","@react-navigation/native": "^6.1.9","@react-navigation/native-stack": "^6.9.17","@reduxjs/toolkit": "^2.0.1","@stripe/stripe-react-native": "0.19.0","add": "^2.0.6","axios": "^1.6.2","camelize": "^1.0.1","eslint-plugin-react-hooks": "^4.6.0","formik": "^2.4.5","graphql": "^16.8.1","jsrsasign": "^11.1.0","lottie-react-native": "^6.5.0","moment": "^2.29.4","prop-types": "^15.8.1","react": "18.2.0","react-native": "0.72.7","react-native-calendars": "^1.1303.0","react-native-circular-progress": "^1.3.9","react-native-device-info": "^10.11.0","react-native-dropdown-picker": "^5.4.6","react-native-gifted-charts": "^1.3.18","react-native-gifted-chat": "^2.4.0","react-native-image-crop-picker": "^0.40.2","react-native-linear-gradient": "^2.8.3","react-native-otp-entry": "^1.4.0","react-native-paper": "^5.11.1","react-native-pie-chart": "^3.0.1","react-native-pure-jwt": "^3.0.2","react-native-raw-bottom-sheet": "^2.2.0","react-native-responsive-fontsize": "^0.5.1","react-native-safe-area-context": "^4.7.4","react-native-screens": "^3.27.0","react-native-select-dropdown": "^3.4.0","react-native-skeleton-placeholder": "^5.2.4","react-native-splash-screen": "^3.3.0","react-native-storage": "^1.0.1","react-native-store-version": "^1.4.1","react-native-svg": "^14.1.0","react-native-toast-message": "^2.1.7","react-native-track-player": "^4.0.1","react-native-url-polyfill": "^2.0.0","react-native-vector-icons": "^10.0.2","react-native-zoom-us": "6.19.6","react-redux": "^9.0.4","redux-persist": "^6.0.0","styled-components": "^6.1.1","validator": "^13.11.0","yarn": "^1.22.21","yup": "^1.3.2","yup-password": "^0.2.2"  },"devDependencies": {"@babel/core": "^7.20.0","@babel/preset-env": "^7.20.0","@babel/runtime": "^7.20.0","@react-native/eslint-config": "^0.72.2","@react-native/metro-config": "^0.72.11","@tsconfig/react-native": "^3.0.0","@types/react": "^18.0.24","@types/react-test-renderer": "^18.0.0","babel-jest": "^29.2.1","babel-plugin-inline-import": "^3.0.0","eslint": "^8.19.0","jest": "^29.2.1","metro-react-native-babel-preset": "0.76.8","prettier": "^2.4.1","react-native-svg-transformer": "^1.3.0","react-test-renderer": "18.2.0","typescript": "4.8.4"  },"engines": {"node": ">=16"  }}

here is my app.build.gradle file

apply plugin: "com.android.application"apply plugin: "com.facebook.react"/** * This is the configuration block to customize your React Native Android app. * By default you don't need to apply any configuration, just uncomment the lines you need. */react {    /* Folders */    //   The root of your project, i.e. where "package.json" lives. Default is '..'    // root = file("../")    //   The folder where the react-native NPM package is. Default is ../node_modules/react-native    // reactNativeDir = file("../node_modules/react-native")    //   The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen    // codegenDir = file("../node_modules/@react-native/codegen")    //   The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js    // cliFile = file("../node_modules/react-native/cli.js")    /* Variants */    //   The list of variants to that are debuggable. For those we're going to    //   skip the bundling of the JS bundle and the assets. By default is just 'debug'.    //   If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.    // debuggableVariants = ["liteDebug", "prodDebug"]    /* Bundling */    //   A list containing the node command and its flags. Default is just 'node'.    // nodeExecutableAndArgs = ["node"]    //    //   The command to run when bundling. By default is 'bundle'    // bundleCommand = "ram-bundle"    //    //   The path to the CLI configuration file. Default is empty.    // bundleConfig = file(../rn-cli.config.js)    //    //   The name of the generated asset file containing your JS bundle    // bundleAssetName = "MyApplication.android.bundle"    //    //   The entry file for bundle generation. Default is 'index.android.js' or 'SessionCard.js'    // entryFile = file("../js/MyApplication.android.js")    //    //   A list of extra flags to pass to the 'bundle' commands.    //   See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle    // extraPackagerArgs = []    /* Hermes Commands */    //   The hermes compiler command to run. By default it is 'hermesc'    // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"    //    //   The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"    // hermesFlags = ["-O", "-output-source-map"]}/** * Set this to true to Run Proguard on Release builds to minify the Java bytecode. */def enableProguardInReleaseBuilds = false/** * The preferred build flavor of JavaScriptCore (JSC) * * For example, to use the international variant, you can use: * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` * * The international variant includes ICU i18n library and necessary data * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that * give correct results when using with locales other than en-US. Note that * this variant is about 6MiB larger per architecture than default. */def jscFlavor = 'org.webkit:android-jsc:+'android {    ndkVersion rootProject.ext.ndkVersion    compileSdkVersion rootProject.ext.compileSdkVersion    namespace "com.salus.health"    defaultConfig {        applicationId "com.salus.health"        minSdkVersion rootProject.ext.minSdkVersion        targetSdkVersion rootProject.ext.targetSdkVersion        versionCode 4        versionName "1.0.2"    }    signingConfigs {        release {            if (project.hasProperty('MYAPP_UPLOAD_STORE_FILE')) {                storeFile file(MYAPP_UPLOAD_STORE_FILE)                storePassword MYAPP_UPLOAD_STORE_PASSWORD                keyAlias MYAPP_UPLOAD_KEY_ALIAS                keyPassword MYAPP_UPLOAD_KEY_PASSWORD            }        }        debug {            storeFile file('debug.keystore')            storePassword 'android'            keyAlias 'androiddebugkey'            keyPassword 'android'        }    }    buildTypes {        debug {            signingConfig signingConfigs.debug        }        release {            // Caution! In production, you need to generate your own keystore file.            // see https://reactnative.dev/docs/signed-apk-android.            signingConfig signingConfigs.release            minifyEnabled enableProguardInReleaseBuilds            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"        }    }}dependencies {    // The version of react-native is set by the React Native Gradle Plugin    implementation("com.facebook.react:react-android")    debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")    debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {        exclude group:'com.squareup.okhttp3', module:'okhttp'    }    debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")    if (hermesEnabled.toBoolean()) {        implementation("com.facebook.react:hermes-android")    } else {        implementation jscFlavor    }}apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)apply from: file("../../node_modules/react-native-vector-icons/fonts.gradle")

here is my Podfile

# Resolve react_native_pods.rb with node to allow for hoistingrequire Pod::Executable.execute_command('node', ['-p','require.resolve("react-native/scripts/react_native_pods.rb",    {paths: [process.argv[1]]},  )', __dir__]).stripplatform :ios, min_ios_version_supportedprepare_react_native_project!# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded## To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`# ```js# module.exports = {#   dependencies: {#     ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),# ```flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabledlinkage = ENV['USE_FRAMEWORKS']if linkage != nil  Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green  use_frameworks! :linkage => linkage.to_symendtarget 'SalusHealth' do  config = use_native_modules!  # Flags change depending on the env values.  flags = get_default_flags()  use_react_native!(    :path => config[:reactNativePath],    # Hermes is now enabled by default. Disable by setting this flag to false.    :hermes_enabled => flags[:hermes_enabled],    :fabric_enabled => flags[:fabric_enabled],    # Enables Flipper.    #    # Note that if you have use_frameworks! enabled, Flipper will not work and    # you should disable the next line.    :flipper_configuration => flipper_config,    # An absolute path to your application root.    :app_path => "#{Pod::Config.instance.installation_root}/.."  )  target 'SalusHealthTests' do    inherit! :complete    # Pods for testing  end  post_install do |installer|    # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202    react_native_post_install(      installer,      config[:reactNativePath],      :mac_catalyst_enabled => false    )    __apply_Xcode_12_5_M1_post_install_workaround(installer)  endend

Max font scaling multiplier for react native have no effect on native iOS elements like Alert and ActionSheet

$
0
0

I've implemented font scaling limitations in my React Native application to accommodate various device font sizes on iOS and Android. While this approach works well for most components, it doesn't affect the font scaling of native iOS Alert and Action components. I'm exploring ways to extend font scaling control to these native elements.

Would integrating a solution using UIFontMetrics and setting it up as a native module be a feasible approach? I'd appreciate any suggestions or insights from the community on how to achieve font scaling limitations for native iOS Alert and Action components.

const customMaxFontSizeMultiplier = 1.27;Text.defaultProps = Text.defaultProps || {};Text.defaultProps.maxFontSizeMultiplier = customMaxFontSizeMultiplier;TextInput.defaultProps = TextInput.defaultProps || {};TextInput.defaultProps.maxFontSizeMultiplier = customMaxFontSizeMultiplier;

React native 0.73.6 push notification on iOS not working

$
0
0

I have a problem in configuration for push notification on iOS, I had added the service list to the project in Xcode, and added the Firebase SDK to the project, and configured the APNS from the developer website.

the project build successfully on Xcode but the app doesn't start on the simulater from the Xcode or from vs code terminal.

when I try to run (npx react-native run-ios) I got the following error

error Failed to build iOS project. "xcodebuild" exited with error code '65'. To debug build logs further, consider building your app with Xcode.app, by opening 'mag11.xcworkspace'.Command line invocation:/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace mag.xcworkspace -configuration Debug -scheme mag -destination id=92D5357D-9552-4709-9C26-AB2372F45C7D

/FirebaseCoreInternal/FirebaseCoreInternal.modulemap' not found1 error generated.

I have added the dependency

"@react-native-community/push-notification-ios": "^1.11.0","@react-native-firebase/app": "^20.0.0","@react-native-firebase/messaging": "^20.0.0",

**here is my AppDelegate.m**

#import "AppDelegate.h"#import <Firebase.h>#import <React/RCTBridge.h>#import <React/RCTBundleURLProvider.h>#import <React/RCTRootView.h>#import <UserNotifications/UserNotifications.h>#import <RNCPushNotificationIOS.h>@implementation AppDelegate- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{  if ([FIRApp defaultApp] == nil) {    [FIRApp configure];  }  RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];  RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge                                                   moduleName:@"mag"                                            initialProperties:nil];  rootView.backgroundColor = [UIColor whiteColor];  self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];  UIViewController *rootViewController = [UIViewController new];  rootViewController.view = rootView;  self.window.rootViewController = rootViewController;  [self.window makeKeyAndVisible];  return YES;}@end

**here is my podFile**

# Resolve react_native_pods.rb with node to allow for hoistingrequire Pod::Executable.execute_command('node', ['-p','require.resolve("react-native/scripts/react_native_pods.rb",    {paths: [process.argv[1]]},  )', __dir__]).stripplatform :ios, min_ios_version_supportedprepare_react_native_project!linkage = ENV['USE_FRAMEWORKS']if linkage != nil  Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green  use_frameworks! :linkage => :static  $RNFirebaseAsStaticFramework = trueendtarget 'mag' do  config = use_native_modules!  # Flags change depending on the env values.  flags = get_default_flags()  # use_frameworks! :linkage => :static  pod 'FirebaseMessaging'  pod 'FirebaseCore', :modular_headers => true  pod 'FirebaseCoreInternal', :modular_headers => true  pod 'GoogleUtilities', :modular_headers => true  use_react_native!(    :path => config[:reactNativePath],    # An absolute path to your application root.    :app_path => "#{Pod::Config.instance.installation_root}/.."  )  target 'magTests' do    inherit! :complete    # Pods for testing  end  post_install do |installer|    # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202    react_native_post_install(      installer,      config[:reactNativePath],      :mac_catalyst_enabled => false,      # :ccache_enabled => true    )  endend

I had build and recreate the pod multiple time with no luck.

I had added the service list to the project in Xcode, and added the Firebase SDK to the project, and configured the APNS from the developer website.

I added the push notification, backend mode to the cabapilities

I have added the dependency

"@react-native-community/push-notification-ios": "^1.11.0","@react-native-firebase/app": "^20.0.0","@react-native-firebase/messaging": "^20.0.0",

I had build and recreate the pod multiple time with no luck.

Receiving Only One IP Address from React-Native-Zeroconf

$
0
0

I am using the react-native-zeroconf package on iOS and Android to find a device with multiple valid IP addresses on my network.

But when searching for devices on the local network, I only get one IP address in the .addresses array of the search result, although I see 4 addresses in Wireshark.

I could not find any meaningful documentation around this issue.

What can I do to get all IP addresses of the host system?Is there a known Android or iOS limitation in place?

How to detect if any part of a phone has been replaced in React Native [closed]

$
0
0

I am seeking a method to detect if any hardware component of a mobile phone has been replaced, using either React Native or native code for both Android and iOS platforms.Despite extensive research, I have not yet found a solution to achieve this functionality.


How Can I add new capabilities for my react native IOS app whitout XCode?

$
0
0

I'm building an App for Android and IOS with React Native CLI, but I don't have a Mac at the moment and I need to deliver new functionality to my client. I implemented push notification, but to work on iOS, I have to add Capabilities in the IOS project configuration, with a Mac I would just open xCode and click on the project folder to see the settings. I want to know if it is possible to add these features to Windows in some configuration file?

EXJavaScriptRuntime class overriding

$
0
0
``error: exception specification of overriding function is more lax than base version`// Copyright 2018-present 650 Industries. All rights reserved.`#import <jsi/jsi.h>#if __has_include(<reacthermes/HermesExecutorFactory.h>)#import <reacthermes/HermesExecutorFactory.h>#elif __has_include(<React-jsc/JSCRuntime.h>)// react-native@>=0.71 has a specific React-jsc pod#import <React-jsc/JSCRuntime.h>// use_frameworks! transforms the dash to underscore#elif __has_include(<React_jsc/JSCRuntime.h>)#import <React_jsc/JSCRuntime.h>#else#import <jsi/JSCRuntime.h>#endif#import <ExpoModulesCore/EXJavaScriptRuntime.h>#import <ExpoModulesCore/ExpoModulesHostObject.h>#import <ExpoModulesCore/EXJSIUtils.h>#import <ExpoModulesCore/EXJSIConversions.h>#import <ExpoModulesCore/Swift.h>namespace {/** * Dummy CallInvoker that invokes everything immediately. * Used in the test environment to check the async flow. */class SyncCallInvoker : public react::CallInvoker {public:void invokeAsync(std::function<void()> &&func) noexcept override {  void invokeSync(std::function<void()> &&func) override {    func();  }  ~SyncCallInvoker() override = default;};} // namespace@implementation EXJavaScriptRuntime {  std::shared_ptr<jsi::Runtime> _runtime;  std::shared_ptr<react::CallInvoker> _jsCallInvoker;}/** Initializes a runtime that is independent from React Native and its runtime initialization. This flow is mostly intended for tests. */- (nonnull instancetype)init{  if (self = [super init]) {#if __has_include(<reacthermes/HermesExecutorFactory.h>)    _runtime = facebook::hermes::makeHermesRuntime();    // This version of the Hermes uses a Promise implementation that is provided by the RN.    // The `setImmediate` function isn't defined, but is required by the Promise implementation.    // That's why we inject it here.    auto setImmediatePropName = jsi::PropNameID::forUtf8(*_runtime, "setImmediate");    _runtime->global().setProperty(      *_runtime, setImmediatePropName, jsi::Function::createFromHostFunction(*_runtime, setImmediatePropName, 1,        [](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) {          args[0].asObject(rt).asFunction(rt).call(rt);          return jsi::Value::undefined();        })    );#else    _runtime = jsc::makeJSCRuntime();#endif    _jsCallInvoker = std::make_shared<SyncCallInvoker>();  }  return self;}- (nonnull instancetype)initWithRuntime:(nonnull jsi::Runtime *)runtime                            callInvoker:(std::shared_ptr<react::CallInvoker>)callInvoker{  if (self = [super init]) {    // Creating a shared pointer that points to the runtime but doesn't own it, thus doesn't release it.    // In this code flow, the runtime should be owned by something else like the RCTBridge.    // See explanation for constructor (8): https://en.cppreference.com/w/cpp/memory/shared_ptr/shared_ptr    _runtime = std::shared_ptr<jsi::Runtime>(std::shared_ptr<jsi::Runtime>(), runtime);    _jsCallInvoker = callInvoker;  }  return self;}- (nonnull jsi::Runtime *)get{  return _runtime.get();}- (std::shared_ptr<react::CallInvoker>)callInvoker{  return _jsCallInvoker;}- (nonnull EXJavaScriptObject *)createObject{  auto jsObjectPtr = std::make_shared<jsi::Object>(*_runtime);  return [[EXJavaScriptObject alloc] initWith:jsObjectPtr runtime:self];}- (nonnull EXJavaScriptObject *)createHostObject:(std::shared_ptr<jsi::HostObject>)jsiHostObjectPtr{  auto jsObjectPtr = std::make_shared<jsi::Object>(jsi::Object::createFromHostObject(*_runtime, jsiHostObjectPtr));  return [[EXJavaScriptObject alloc] initWith:jsObjectPtr runtime:self];}- (nonnull EXJavaScriptObject *)global{  auto jsGlobalPtr = std::make_shared<jsi::Object>(_runtime->global());  return [[EXJavaScriptObject alloc] initWith:jsGlobalPtr runtime:self];}- (nonnull EXJavaScriptObject *)createSyncFunction:(nonnull NSString *)name                                         argsCount:(NSInteger)argsCount                                             block:(nonnull JSSyncFunctionBlock)block{  JSHostFunctionBlock hostFunctionBlock = ^jsi::Value(    jsi::Runtime &runtime,    std::shared_ptr<react::CallInvoker> callInvoker,    EXJavaScriptValue * _Nonnull thisValue,    NSArray<EXJavaScriptValue *> * _Nonnull arguments) {      NSError *error;      id result = block(thisValue, arguments, &error);      if (error == nil) {        return expo::convertObjCObjectToJSIValue(runtime, result);      } else {        throw jsi::JSError(runtime, [error.userInfo[@"message"] UTF8String]);      }    };  return [self createHostFunction:name argsCount:argsCount block:hostFunctionBlock];}- (nonnull EXJavaScriptObject *)createAsyncFunction:(nonnull NSString *)name                                          argsCount:(NSInteger)argsCount                                              block:(nonnull JSAsyncFunctionBlock)block{  JSHostFunctionBlock hostFunctionBlock = ^jsi::Value(    jsi::Runtime &runtime,    std::shared_ptr<react::CallInvoker> callInvoker,    EXJavaScriptValue * _Nonnull thisValue,    NSArray<EXJavaScriptValue *> * _Nonnull arguments) {      if (!callInvoker) {        // In mocked environment the call invoker may be null so it's not supported to call async functions.        // Testing async functions is a bit more complicated anyway. See `init` description for more.        throw jsi::JSError(runtime, "Calling async functions is not supported when the call invoker is unavailable");      }      // The function that is invoked as a setup of the EXJavaScript `Promise`.      auto promiseSetup = [callInvoker, block, thisValue, arguments](jsi::Runtime &runtime, std::shared_ptr<Promise> promise) {        expo::callPromiseSetupWithBlock(runtime, callInvoker, promise, ^(RCTPromiseResolveBlock resolver, RCTPromiseRejectBlock rejecter) {          block(thisValue, arguments, resolver, rejecter);        });      };      return createPromiseAsJSIValue(runtime, promiseSetup);    };  return [self createHostFunction:name argsCount:argsCount block:hostFunctionBlock];}#pragma mark - Classes- (nonnull EXJavaScriptObject *)createClass:(nonnull NSString *)name                                constructor:(nonnull ClassConstructorBlock)constructor{  expo::ClassConstructor jsConstructor = [self, constructor](jsi::Runtime &runtime, const jsi::Value &thisValue, const jsi::Value *args, size_t count) {    std::shared_ptr<jsi::Object> thisPtr = std::make_shared<jsi::Object>(thisValue.asObject(runtime));    EXJavaScriptObject *caller = [[EXJavaScriptObject alloc] initWith:thisPtr runtime:self];    NSArray<EXJavaScriptValue *> *arguments = expo::convertJSIValuesToNSArray(self, args, count);    constructor(caller, arguments);  };  std::shared_ptr<jsi::Function> klass = expo::createClass(*_runtime, [name UTF8String], jsConstructor);  return [[EXJavaScriptObject alloc] initWith:klass runtime:self];}- (nullable EXJavaScriptObject *)createObjectWithPrototype:(nonnull EXJavaScriptObject *)prototype{  std::shared_ptr<jsi::Object> object = expo::createObjectWithPrototype(*_runtime, [prototype getShared]);  return object ? [[EXJavaScriptObject alloc] initWith:object runtime:self] : nil;}#pragma mark - Script evaluation- (nonnull EXJavaScriptValue *)evaluateScript:(nonnull NSString *)scriptSource{  std::shared_ptr<jsi::StringBuffer> scriptBuffer = std::make_shared<jsi::StringBuffer>([scriptSource UTF8String]);  std::shared_ptr<jsi::Value> result;  try {    result = std::make_shared<jsi::Value>(_runtime->evaluateJavaScript(scriptBuffer, "<<evaluated>>"));  } catch (jsi::JSError &error) {    NSString *reason = [NSString stringWithUTF8String:error.getMessage().c_str()];    NSString *stack = [NSString stringWithUTF8String:error.getStack().c_str()];    @throw [NSException exceptionWithName:@"ScriptEvaluationException" reason:reason userInfo:@{      @"message": reason,      @"stack": stack,    }];  } catch (jsi::JSIException &error) {    NSString *reason = [NSString stringWithUTF8String:error.what()];    @throw [NSException exceptionWithName:@"ScriptEvaluationException" reason:reason userInfo:@{      @"message": reason    }];  }  return [[EXJavaScriptValue alloc] initWithRuntime:self value:result];}#pragma mark - Private- (nonnull EXJavaScriptObject *)createHostFunction:(nonnull NSString *)name                                         argsCount:(NSInteger)argsCount                                             block:(nonnull JSHostFunctionBlock)block{  jsi::PropNameID propNameId = jsi::PropNameID::forAscii(*_runtime, [name UTF8String], [name length]);  std::weak_ptr<react::CallInvoker> weakCallInvoker = _jsCallInvoker;  jsi::HostFunctionType function = [weakCallInvoker, block, self](jsi::Runtime &runtime, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {    // Theoretically should check here whether the call invoker isn't null, but in mocked environment    // there is no need to care about that for synchronous calls, so it's ensured in `createAsyncFunction` instead.    auto callInvoker = weakCallInvoker.lock();    NSArray<EXJavaScriptValue *> *arguments = expo::convertJSIValuesToNSArray(self, args, count);    std::shared_ptr<jsi::Value> thisValPtr = std::make_shared<jsi::Value>(runtime, std::move(thisVal));    EXJavaScriptValue *thisValue = [[EXJavaScriptValue alloc] initWithRuntime:self value:thisValPtr];    return block(runtime, callInvoker, thisValue, arguments);  };  std::shared_ptr<jsi::Object> fnPtr = std::make_shared<jsi::Object>(jsi::Function::createFromHostFunction(*_runtime, propNameId, (unsigned int)argsCount, function));  return [[EXJavaScriptObject alloc] initWith:fnPtr runtime:self];}@end`

ive added

void invokeAsync(std::function<void()> &&func) noexcept override {

it doesn't work not sure what else I need to change but im trying to make a expo app build a an iOS app ive installed everything I need not sure what else im missing I can provide any code needed if askedit will not run in Xcode either not sure if there is a way to fix it I don't want to rebuild this and it took over 3 months to make this app I can't afford to rebuild this and I have all my apple id credentials

Error while adding native base to existing react native 0.74.1 project

$
0
0

I have just created the new react native project with version 0.74.1 and project is running fine but there is some react version error when I try to add native-base into my project by using the below command as written on official native-base docs

npm install native-base react-native-svg@12.1.1 react-native-safe-area-context@3.3.2

react version in my project.json is "18.2.0",

Error:

npm ERR! code ERESOLVEnpm ERR! ERESOLVE unable to resolve dependency treenpm ERR! npm ERR! While resolving: RnUrqlClient@0.0.1npm ERR! Found: react@18.2.0npm ERR! node_modules/reactnpm ERR!   react@"18.2.0" from the root projectnpm ERR!   peer react@"*" from native-base@3.4.28npm ERR!   node_modules/native-basenpm ERR!     native-base@"*" from the root projectnpm ERR! npm ERR! Could not resolve dependency:npm ERR! peer react@"^18.3.1" from react-dom@18.3.1npm ERR! node_modules/react-domnpm ERR!   peer react-dom@"*" from native-base@3.4.28npm ERR!   node_modules/native-basenpm ERR!     native-base@"*" from the root projectnpm ERR! npm ERR! Fix the upstream dependency conflict, or retrynpm ERR! this command with --force or --legacy-peer-depsnpm ERR! to accept an incorrect (and potentially broken) dependency resolution.npm ERR! npm ERR! npm ERR! For a full report see:npm ERR! /Users/muhammadhassaan/.npm/_logs/2024-05-23T22_19_47_018Z-eresolve-report.txtnpm ERR! A complete log of this run can be found in: /Users/muhammadhassaan/.npm/_logs/2024-05-23T22_19_47_018Z-debug-0.log

React Native on iOS: redefinition of module 'Firebase'

$
0
0

When I added firebase to my project then I got this error

/Users/mac/Projects/mobile/texknoter/ios/Pods/Firebase/CoreOnly/Sources/module.modulemap:1:8: error: redefinition of module 'Firebase'

module Firebase {^/Users/mac/Library/Developer/Xcode/DerivedData/Texknoter-gpxrhbzgwlqljfgxhvvsyxmpufnv/SourcePackages/checkouts/firebase-ios-sdk/CoreOnly/Sources/module.modulemap:1:8: note: previously defined here

module Firebase {^/Users/mac/Library/Developer/Xcode/DerivedData/Texknoter-gpxrhbzgwlqljfgxhvvsyxmpufnv/Build/Intermediates.noindex/Texknoter.build/Debug-iphonesimulator/Texknoter.build/Objects-normal/x86_64/AppDelegate.dia:1:1: warning: Could not read serialized diagnostics file: error("Failed to open diagnostics file") (in target 'Texknoter' from project 'Texknoter')

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

$
0
0

I'm having issues building an ios app with expo & react native. After running the command npx expo run:ios, the error I get, which I believe is fairly generic, is:

CommandError: Failed to build iOS project. "xcodebuild" exited with error code 65.

The last message in the terminal before it threw an error is:Compiling react-native Pods/FlipperKit » FLEXNetworkTransaction.m

Things I've tried so far include:

  • Deleting Xcode caches.
  • Deleting Derived data using the command rm -rf ~/Library/Developer/Xcode/DerivedData
  • Followed the instructions for the top answer on a similar stackoverflow question here

My setup:

  • Chip: Apple M1 Pro Chip.
  • macOS: Sonoma 14.3.1
  • node version: 14.19.2
  • react-native version: 0.70.8
  • Xcode version: 15.3
  • Cocoapods version: 1.12.1

Not sure if it's needed but the flipper versions I have are:

  • react-native-flipper: 0.177.0
  • expo-community-flipper: 47.0.2

Any help would be appreciated, thanks

Edit: Below is the error logs I'm getting in the terminal

 Compiling react-native Pods/FlipperKit » FlipperPlatformWebSocket.mm❌(/Users/....filePathHere.../ios/Pods/FlipperKit/ios/Pods/Headers/Private/Flipper/FlipperTransportTypes.h:24:14)  22 |  Possible events are but not limited to: open, close, error.  23 |  */> 24 | typedef std::function<void(SocketEvent)> SocketEventHandler;     |              ^ no template named 'function' in namespace 'std'  25 |   26 | /**  27 |  Defines a socket message received handler.❌(/Users/....filePathHere.../ios/Pods/FlipperKit/ios/Pods/Headers/Private/Flipper/FlipperTransportTypes.h:29:14)  27 |  Defines a socket message received handler.  28 |  */> 29 | typedef std::function<void(const std::string& message)> SocketMessageHandler;     |              ^ no template named 'function' in namespace 'std'  30 |   31 | /**  32 |  Defines a socket certificate provider. The provider is responsible of returning❌(/Users/....filePathHere.../ios/Pods/FlipperKit/ios/Pods/Headers/Private/Flipper/FlipperTransportTypes.h:38:14)  36 |  @param length Length of the password buffer.  37 |  */> 38 | typedef std::function<std::string(char* password, size_t length)>     |              ^ no template named 'function' in namespace 'std'  39 |     SocketCertificateProvider;  40 |   41 | /**❌(/Users/....filePathHere.../ios/Pods/FlipperKit/ios/Pods/Headers/Private/Flipper/FlipperTransportTypes.h:45:14)  43 |  that data has been sent to the receiving end.  44 |  */> 45 | typedef std::function<void()> SocketSendHandler;     |              ^ no template named 'function' in namespace 'std'  46 |   47 | /**  48 |  Defines a socket send completion handler for the cases where a response is❌(/Users/....filePathHere.../ios/Pods/FlipperKit/ios/Pods/Headers/Private/Flipper/FlipperTransportTypes.h:54:14)  52 |  response will contain text describing the error.  53 |  */> 54 | typedef std::function<void(std::string response, bool isError)>     |              ^ no template named 'function' in namespace 'std'  55 |     SocketSendExpectResponseHandler;  56 |   57 | /**❌(/Users/....filePathHere.../ios/Pods/FlipperKit/ios/Pods/FlipperKit/iOS/FlipperKit/FlipperPlatformWebSocket.mm:57:46)  55 |   56 |   char PASSWORD[512] = {};> 57 |   auto certificatePath = _certificateProvider(&PASSWORD[0], 512);     |                                              ^ called object type 'facebook::flipper::SocketCertificateProvider' is not a function or function pointer  58 |   59 |   NSString* certificatePathObjC =  60 |       [NSString stringWithUTF8String:certificatePath.c_str()];❌(/Users/....filePathHere.../ios/Pods/FlipperKit/ios/Pods/FlipperKit/iOS/FlipperKit/FlipperPlatformWebSocket.mm:158:18)  156 |     // not notify the delegate. SocketRocket only triggers the close event  157 |     // when the connection is closed from the server.> 158 |     _eventHandler(facebook::flipper::SocketEvent::CLOSE);      |                  ^ called object type 'facebook::flipper::SocketEventHandler' is not a function or function pointer  159 |     // Clear the socket delegate before close. Ensures that we won't get  160 |     // any messages after the disconnect takes place.  161 |     _socket.delegate = nil;❌(/Users/....filePathHere.../ios/Pods/FlipperKit/ios/Pods/FlipperKit/iOS/FlipperKit/FlipperPlatformWebSocket.mm:185:16)  183 |   184 | - (void)webSocketDidOpen:(SRWebSocket*)webSocket {> 185 |   _eventHandler(facebook::flipper::SocketEvent::OPEN);      |                ^ called object type 'facebook::flipper::SocketEventHandler' is not a function or function pointer  186 |   187 |   if (!_keepAlive) {  188 |     __weak auto weakSocket = _socket;❌(/Users/....filePathHere.../ios/Pods/FlipperKit/ios/Pods/FlipperKit/iOS/FlipperKit/FlipperPlatformWebSocket.mm:206:18)  204 |    */  205 |   if ([[error domain] isEqual:NSOSStatusErrorDomain] && [error code] == -9806) {> 206 |     _eventHandler(facebook::flipper::SocketEvent::SSL_ERROR);      |                  ^ called object type 'facebook::flipper::SocketEventHandler' is not a function or function pointer  207 |   } else {  208 |     _eventHandler(facebook::flipper::SocketEvent::ERROR);  209 |   }❌(//Users/....filePathHere.../ios/Pods/FlipperKit/ios/Pods/FlipperKit/iOS/FlipperKit/FlipperPlatformWebSocket.mm:208:18)  206 |     _eventHandler(facebook::flipper::SocketEvent::SSL_ERROR);  207 |   } else {> 208 |     _eventHandler(facebook::flipper::SocketEvent::ERROR);      |                  ^ called object type 'facebook::flipper::SocketEventHandler' is not a function or function pointer  209 |   }  210 |   _socket = nil;  211 | }❌(/Users/....filePathHere.../ios/Pods/FlipperKit/iOS/FlipperKit/FlipperPlatformWebSocket.mm:217:16)  215 |               reason:(NSString*)reason  216 |             wasClean:(BOOL)wasClean {> 217 |   _eventHandler(facebook::flipper::SocketEvent::CLOSE);      |                ^ called object type 'facebook::flipper::SocketEventHandler' is not a function or function pointer  218 |   _socket = nil;  219 | }  220 | ❌(/Users/....filePathHere.../ios/Pods/FlipperKit/iOS/FlipperKit/FlipperPlatformWebSocket.mm:224:20)  222 |   if (message && _messageHandler) {  223 |     NSString* response = message;> 224 |     _messageHandler([response UTF8String]);      |                    ^ called object type 'facebook::flipper::SocketMessageHandler' is not a function or function pointer  225 |   }  226 | }  227 | › Compiling react-native Pods/FlipperKit » FlipperKitNetworkPlugin.mm› Compiling react-native Pods/FlipperKit » FlipperKitLayoutPlugin.mm› Compiling react-native Pods/FlipperKit » FlipperKit-dummy.m› Compiling react-native Pods/FlipperKit » FlipperCppBridgingResponder.mm› Compiling react-native Pods/FlipperKit » FlipperCppBridgingConnection.mm› Compiling react-native Pods/FlipperKit » FlipperClient.mm› Compiling react-native Pods/FlipperKit » FLEXNetworkTransaction.m› Compiling react-native Pods/FlipperKit » FLEXNetworkRecorder.mm› Compiling react-native Pods/FlipperKit » FLEXNetworkObserver.mm    Run script build phase 'Bundle React Native code and images' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'ViewTrail' from project 'ViewTrail')    Run script build phase 'Start Packager' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'ViewTrail' from project 'ViewTrail')    Run script build phase '[CP-User] Generate app.config for prebuilt Constants.manifest' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'EXConstants' from project 'Pods')› 12 error(s), and 3 warning(s)CommandError: Failed to build iOS project. "xcodebuild" exited with error code 65.
Viewing all 17136 articles
Browse latest View live


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