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

How to make some part of text clickable and some part having different text color in react-native

$
0
0

I am trying to make some portion of text of different color and clickable

Here is my code:

<Text style = {styles.term_service}>By signing up, you agree to Terms of Service and Privacy Policy.</Text>

I want to make Terms of Service and Privacy Policy clickable and have different color.


Getting library not found for ld-classic while running react native cli project on ios

$
0
0

I am trying to run a react native cli project but getting this error on Xcode `

"library not found for ld-classic"

`The android part is working fine, I tried by clearing build and xcodebuild but still facing the issue.

Reverse search showed that ld-classic is only mentioned in project.pbxproj file like this

LIBRARY_SEARCH_PATHS = ("\"$(SDKROOT)/usr/lib/swift\"","\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"","\"$(inherited)\"",            );            MTL_ENABLE_DEBUG_INFO = YES;            ONLY_ACTIVE_ARCH = YES;            OTHER_CFLAGS = "$(inherited)";            OTHER_CPLUSPLUSFLAGS = ("$(OTHER_CFLAGS)","-DFOLLY_NO_CONFIG","-DFOLLY_MOBILE=1","-DFOLLY_USE_LIBCPP=1",            );            OTHER_LDFLAGS = ("$(inherited)","-Wl","-ld_classic","-Wl","-ld_classic","-Wl","-ld_classic","-Wl","-ld_classic","-Wl","-ld_classic","-Wl","-ld_classic","-Wl","-ld_classic","-Wl","-ld_classic","-Wl","-ld_classic","-Wl","-ld_classic","-Wl","-ld_classic","-Wl","-ld_classic",            );            REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";            SDKROOT = iphoneos;        };        name = Debug;    };

Unable to resolve module @babel/runtime/helpers/interopRequireDefault

$
0
0

Unable to resolve module @babel/runtime/helpers/interopRequireDefaultI am new to react native, I have a monorepo project using Yarn and lerna which I am trying to build for iOS but I am getting error Unable to resolve module @babel/runtime/helpers/interopRequireDefault. I have checked the Project structure runtime folder is not present in babel folder of node modules.

I have tried many solutions available on internet likeadding the babel and do Yarn install,delete node modules and Yarn install,verified babel.config.js file

React Native New Architecture and release 0.74.1

$
0
0

Will React Native's new architecture release keep it as the best option for cross-platform mobile app development in the future?

Flutter aims to provide better performance than React Native, but with React Native's new architecture using JSI (JavaScript Interface) in C++ to replace the old bridge architecture, which relied on serialization and deserialization processes, there is surely a massive performance improvement.

Additionally, in the latest React Native version 0.74.1, the batch rendering process on onLayout updates is also contributing to performance improvements. The Bridgeless is now enabled by default in 0.74.1 version and you do't need to enable it manually if you use new architecture in project.

React-native iOS not showing images (pods issue)

$
0
0

I was installing a package in my react-native application (to be specific it was createMaterialTopTabNavigator from react-navigation) but after the installation succeed, something crash (error: @react-navigation/material-top-tabs/src/index.tsx: unexpected token (16:12)) and I was trying to fix it, so I fixed it but then the images on iOS stoped working.

Before the installation of that package, my Image component was working perfectly in both platforms (iOS and Android).

I guess is something related with the packages/pods that take care of images in XCode, but I have tried some stuff but didn't work (I'm not an expert in XCode).

On Android they are working fine.

What I have done to solve the problem but didn't work:

-Upgrade my react-native version from "0.61.5" to "0.62"

-Deleted pods, clean the project and reinstall pods with "pod install"

-Tried this answer but I guess that is not exactly my issue.

Do you know what else can I do? I'm running out of ideas and I do not find too much about this topic on the internet.

Thanks!

UpdateThe Image component make its animation as if the image is loaded, it just does not display it. So I'm sure that is something related with the iOS project, and also because in android is working fine.

Upgrading iOS Target Platform to meet minimal Pod version requirements

$
0
0

I have an iOS project that I am building in XCode/Cocoa Pods. When I run the pod install commands I get a lot of warnings for many (if not all) of my pods:

"[!] The platform of the target myapp (iOS 11.0) may not be compatible with <the-name-and-version-of-the-pod-here> which has a minimum requirement of iOS 12.4."

What setting in Xcode or my Podfile can I change to "upgrade" my "target platform" so that it meets the minimal version requirement of all these pods (which across the board are "12.4")?

How to different the two appState in react-native: app go to background, or app ask permission

$
0
0

I am developing a bank react-native app, try to implement a feature that every time the app goes from background/inactive to active status, users need to verify TOUCHID.

What I did is to check the AppState:

    if (OldappState.match(/inactive|background/) &&      nextAppState === 'active'    ) {      checkLocalAuth()    }

It works fine, but I find a funny problem: when app ask permission, the AppState will become inactive, when user granted the permission the AppState becomes active, that is exactly the same with the behavior of the action described above.

But I don't want to ask for TOUCHID when asking permission, so how to differ the two situations?

React Native Expo Managed App doesn't launch/start on iOS simulator

$
0
0

I've been having hard times with my old Windows laptop while developing React Native apps so I moved to MacOS laptop. I installed Android Studio and Xcode (including Xcode command line tools). Then I initialized a blank expo managed project. I started both on Android Emulator and iOS simulator. Android one worked out with an ádb´ error (or maybe warning). But on the other hand, iOS simulator did nothing. There's no Expo Go app installed on iOS device, so it can not launch my app using it. I don't get any error or warning related to this problem, so I can't trace the problem.

  • I have tried deleting global expo folder located at ´~/.expo/´, I also tried to give 777 (all permissions) on that folder to my current user.
  • I tried uninstalling and reinstalling expo package globally.
  • I made sure I have selected Xcode command line tools on ´Xcode -> Preferences -> Locations -> Xcode 13.2.1 (13C100)´
  • I tried to launch different iOS devices like (iPhone 6, 8, 13, iPod etc.)
  • I tried clearing cache and starting expo with ´sudo npm start --clear-cache´

I have been trying to solve this for at least 2 hours tried everything possibly related to my problem but none of them did work. There's one thing I don't understand though. Even though I used different iOS device simulators the Expo Metro Bundler showed this ´› Opening exp://10.42.33.15:19000 on iPhone 8´ output. I have tried iPhone 13, iPhone 6, iPod etc. but this was the same output for different devices. Here's some screenshot related to probem:

Screenshot


How to disable verbose logging in React Native Expo?

$
0
0

React Native: 0.72.5

Expo: 49.0.10

Using the iOS Simulator

I'm seeing hundreds of logs, without prompting, and for every little UI button I press, or scroll a listview. Its highly annoying because the logs I want to see are impossible to find.

For example, there are tons like this

[MediaToolbox] <<<< FigFilePlayer >>>> itemfig_setCurrentTimeWithRangeAndIDGuts: [0x162ef3e00] I/YGB.02 called, time = 0.000, flags =[MediaToolbox] <<<< Boss >>>> FigPlaybackBossSetTimeWithRange: (0x165c7c980) playState set to Paused

How do I disable this?

Downloading and Opening PDF file in React Native

$
0
0

I'm trying to download a PDF file from my app when a button is clicked and open it immediately after the download completes. I'm using expo-file-system to save the downloaded file and I'm using expo-linking to trigger the opening of the file after it's downloaded for iOS device. I'm also using the expo-intent-launcher to trigger the opening of the file on an android device. This works perfectly for android but this doesn't work on iOS and I've been on this for hours. I'm unsure what I'm not doing right. My code snippets is shown below:

import * as FileSystem from "expo-file-system";import * as Linking from "expo-linking";import * as IntentLauncher from "expo-intent-launcher";import { Button } from "react-native"export default function PdfDocumentsScreen() {   const { isAndroid } = useDevicePlatform();   const downloadPDF = async () => {    try {      const uri ="https://${name}.s3.amazonaws.com/${bucket_name}/Certificate1.pdf";      const fileUri = FileSystem.documentDirectory +"Certificate.pdf";      const downloadObject = FileSystem.createDownloadResumable(uri, fileUri);      const response = await downloadObject.downloadAsync();      console.log(response);      if (response?.status === 200) {        openPDF(fileUri);      } else {        console.error("Failed to download the PDF");      }    } catch (error) {      console.error("Error downloading the PDF: ", error);    }  }; const openPDF = async (fileUri: string) => {    try {      const contentUri = await FileSystem.getContentUriAsync(fileUri);      console.log("Content URI: ", contentUri);      if (!isAndroid) {        if (await Linking.canOpenURL(contentUri)) {          Linking.openURL(contentUri);        }      } else {        IntentLauncher.startActivityAsync("android.intent.action.VIEW", {          data: contentUri,          flags: 1,        });      }    } catch (error) {      console.error("Error opening the PDF: ", error);    }  };  return (<Button title="Download PDF" onPress={downloadPDF} />  )}

How to support old architecture in react-native package build on new architecture with NativeModules

$
0
0

I have created a react-native package with version 0.72 which has the NativeModules to fulfill the requirements. It's working fine with the apps which are on new architecture. But when it comes to old architecture or react-native e.g 0.68.x, the iOS dependency is not being installed when we run pod install and when i'm trying to link manually, using npx react-native link <package-id> it only links Android but not iOS.

PS: It's working fine on Android. Only iOS is causing issue.

Configuring Sign in with Apple for both a web app and a mobile app with a shared backend

$
0
0

Summary:Need help with Certificates, Identifiers and Profiles settings to allow two apps to use Sign in with Apple.

Background:We have a web application (React, static JavaScript) that allows users to sign in with Apple, Google or Microsoft via OAuth/OIDC.

We are developing a mobile application using React Native and Expo.

Both the web application and the mobile application use the same backend (Django).

For the mobile application, we added Google and Microsoft sign in via the same web-based OAuth/OIDC flow. For Sign in with Apple, we are using the expo-apple-authentication package to get the required native sign in experience.

We have two active app identifiers:

  1. org.terraso.terraso; web app; primary App ID
  2. org.terraso.test.Terraso-LandPKS; mobile apple; Group with an existing primary App ID (selected (1), the web app)

We have one services identifier:

  1. org.terraso.app; primary ID is web app (app identifier 1) above; URLs have been configured

We have one app group:

  1. group.org.terraso (seems unused)

On our backend app, we have code:https://github.com/techmatters/terraso-backend/blob/abc655e83eaca849e2bc24389946cc4f0bcd9d48/terraso_backend/apps/auth/providers.py#L84

and APPLE_CLIENT_ID is set to org.terraso.app (which matches the services identifier above

In my local development environment, I have tried a few different combinations of IDs attempting to get this to work using the iOS simulator:

(i) backend client id: org.terraso.appmobile app bundle Id: org.terraso.test.Terraso-LandPKSresult: error: jwt.exceptions.InvalidAudienceError: Audience doesn't match

(ii) backend: org.terraso.appmobile app: org.terraso.appresult: clicking "Sign In" in Apple ID dialog is a no-op (no errors from client or server)

(iii) backend: org.terraso.test.Terraso-LandPKSmobile app: org.terraso.test.Terraso-LandPKSresult: works (but I can't use that in production, because the client ID is wrong)

How can I configure Sign in with Apple to allow both the web app, the mobile app (and possible additional mobile apps) to work with the same backend?

Do I need to us app groups? When do you use app groups vs "group with an existing primary apple id"?

Fatal error building iOS react-native app file not found 'react/renderer/graphics/Float.h'

$
0
0

I use XCode 13.4.1 and react-native 0.73.3. Building my react-native project from XCode, I get the next error in RNReanimated package:

Lexical or Preprocessor Issue:'react/renderer/graphics/Float.h' file not found.  Pods > Development Pods > React-Fabric > core > ComponentDescriptor.h  

If I comment out this line, I get error in other ".h" file not found. It seems like some paths are missing, but I don't know which ones.

This is my Podfile, where I had to add some changes:

    require_relative '../node_modules/react-native/scripts/react_native_pods'    require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'    # Resolve react_native_pods.rb with node to allow for hoisting    require Pod::Executable.execute_command('node', ['-p','require.resolve("react-native/scripts/react_native_pods.rb",        {paths: [process.argv[1]]},      )', __dir__]).strip    platform :ios, '13.4'    prepare_react_native_project!    install! 'cocoapods', :deterministic_uuids => false    linkage = ENV['USE_FRAMEWORKS']    if linkage != nil      Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green      use_frameworks! :linkage => linkage.to_sym    end    target 'MyApplication' 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.        # Upcoming versions of React Native may rely on get_default_flags(), but        # we make it explicit here to aid in the React Native upgrade process.        :hermes_enabled => true,        :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 => FlipperConfiguration.enabled,        # An absolute path to your application root.        :app_path =>"#{Pod::Config.instance.installation_root}/.."      )      pod 'RNFS', :path =>'../node_modules/react-native-fs'      pod 'RNVectorIcons', :path =>'../node_modules/react-native-vector-icons'      pod 'react-native-netinfo', :path =>'../node_modules/@react-native-community/netinfo'      pod 'Firebase', :modular_headers => true      pod 'FirebaseCoreInternal', :modular_headers => true      pod 'GoogleUtilities', :modular_headers => true      pod 'FirebaseCore', :modular_headers => true      target 'MyApplicationTests' 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        )      end    end

And this is my package.json file, from react-native project:

    {"name": "myapplication","version": "1.6.3","private": true,"scripts": {"android": "react-native run-android","ios": "react-native run-ios","start": "react-native start","test": "jest","lint": "eslint . --ext .js,.jsx,.ts,.tsx","postinstall": "patch-package"      },"dependencies": {"@react-native-community/cli": "^13.6.6","@react-native-community/datetimepicker": "^3.5.2","@react-native-community/masked-view": "^0.1.11","@react-native-community/netinfo": "^6.1.0","@react-native-community/progress-bar-android": "^1.0.4","@react-native-community/progress-view": "^1.3.1","@react-native-firebase/app": "^18.8.0","@react-native-firebase/messaging": "^18.8.0","@react-native-picker/picker": "^1.16.5","@react-native/metro-config": "^0.74.81","@react-navigation/bottom-tabs": "^6.0.1","@react-navigation/native": "^6.0.1","@react-navigation/stack": "^6.0.1","@types/react": "^17","axios": "^1.6.7","deprecated-react-native-prop-types": "^2.3.0","patch-package": "^6.4.7","postinstall-postinstall": "^2.1.0","react": "18.2.0","react-native": "0.73.3","react-native-autocomplete-dropdown": "1.1.6","react-native-barcode-mask": "^1.2.4","react-native-blob-util": "^0.16.2","react-native-bottomsheet": "^2.5.2","react-native-bouncy-checkbox": "^2.1.3","react-native-camera": "^4.2.1","react-native-eject": "^0.1.2","react-native-file-viewer": "^2.1.4","react-native-fs": "^2.18.0","react-native-gesture-handler": "^1.10.3","react-native-gradle-plugin": "^0.71.19","react-native-image-pan-zoom": "^2.1.12","react-native-mmkv": "^2.12.2","react-native-paper": "^4.9.2","react-native-pdf": "^6.6.0","react-native-picker-select": "^8.0.4","react-native-raw-bottom-sheet": "^2.2.0","react-native-reanimated": "^2.2.0","react-native-render-html": "^6.0.5","react-native-safe-area-context": "^3.3.0","react-native-screens": "^3.5.0","react-native-splash-screen": "^3.2.0","react-native-swipe-list-view": "^3.2.9","react-native-swiper": "^1.6.0","react-native-toast-message": "^1.4.9","react-native-vector-icons": "9.2.0","react-native-webview": "^11.6.6","react-native-zip-archive": "^6.0.3","rn-fetch-blob": "^0.12.0","yarn": "^1.22.19"      },"devDependencies": {"@babel/core": "^7.15.0","@babel/runtime": "^7.14.8","@react-native-community/eslint-config": "^3.0.0","@types/jest": "^26.0.24","@types/react-native": "^0.64.12","@types/react-native-vector-icons": "^6.4.8","@types/react-test-renderer": "^17.0.1","babel-jest": "^27.0.6","eslint": "^7.32.0","jest": "^27.0.6","metro-config": "^0.80.5","metro-react-native-babel-preset": "^0.72.1","react-test-renderer": "^18.2.0","typescript": "^4.3.5","yarn-upgrade-all": "^0.5.4"      },"resolutions": {"@types/react": "^17"      },"jest": {"preset": "react-native","moduleFileExtensions": ["ts","tsx","js","jsx","json","node"        ]      },"description": "My custom App","main": "index.js","repository": "","author": "author","license": "Private"    }

I have had to patch RNReanimated.podspec in order to set C++ compiler version:

s.pod_target_xcconfig = {"USE_HEADERMAP" => "YES","HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_TARGET_SRCROOT)\" \"$(PODS_ROOT)/#{folly_prefix}Folly\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/Headers/Private/React-Core\" ","FRAMEWORK_SEARCH_PATHS" => "\"${PODS_CONFIGURATION_BUILD_DIR}/React-hermes\"","CLANG_CXX_LANGUAGE_STANDARD" => "c++17", <--- I've added this line

}

If I should add any other file in order to solve this issue, please ask me.

Mapbox.xcframework-ios.signature couldn’t be copied to “Signatures” because an item with the same name already exists

$
0
0

I'm using MapLibre in React Native project, when i do bunx eas build --profile preview --local -p ios i start getting this error, but no issues when doing in simulator.

I did have MapBox in my other project and that is working fine. But unsure if this related. Or is there a signature being stored in system that i need to manually remove?

Cannot change default Permission String of Expo Plugins (Camera etc.)

$
0
0

Expo / IOS

I'm trying to push an app to the app store and got stuck at this phase: I can not change the default permission string for using camera, photos and location. As you may well know, Apple requires that there's a detailed explanation to the reason behind requesting permission.

In app.json, I have changed both the ios.infoPlist.NSCameraUsageDescription as well as the specific plugin permission text string at plugins.expo-camera.cameraPermission.

Neither of them works. The text is the old one.

How can I change this successfully?

app.json:

{"expo": {"ios": {"infoPlist": {"NSCameraUsageDescription": "This app uses the camera to take a photo of users         for their profiles, and optionally to take a photo of a book that users choose to         manually add to their virtual book shelves."      }    },"plugins": [      ["expo-camera",        {"cameraPermission": "This app uses the camera to take a photo of users           for their profiles, and optionally to take a photo of a book that users choose           to manually add to their virtual book shelves."        }      ]    ]  }}

Note: I've read and tried to fix through this: https://docs.expo.dev/guides/permissions/


i am getting erron on mac in npm run ios - Invariant viloation and app registery error

$
0
0

Error in terminalInvariant Violation: "jazzagain" has not been registered. This can happen if:

  • Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
  • A module failed to load due to an error and AppRegistry.registerComponent wasn't called., js engine: hermes

Invariant Violation: new NativeEventEmitter() requires a non-null argument., js engine: hermes

Unhandled JS Exception: Invariant Violation: new NativeEventEmitter() requires a non-null argument., js engine: hermes

i have tried podfile.lock delete and npm install again , pod install again but nothing works. i think my mismatch peer dependency is an issue. (i guess),because if i run npm install i am getting following error - npm ERR! code ERESOLVEnpm ERR! ERESOLVE could not resolvenpm ERR!npm ERR! While resolving: @react-native-firebase/messaging@18.9.0npm ERR! Found: @react-native-firebase/app@18.3.0npm ERR! node_modules/@react-native-firebase/appnpm ERR! @react-native-firebase/app@"^18.3.0" from the root projectnpm ERR! peer @react-native-firebase/app@"18.3.0" from @react-native-firebase/auth@18.3.0npm ERR! node_modules/@react-native-firebase/authnpm ERR! @react-native-firebase/auth@"^18.3.0" from the root projectnpm ERR!npm ERR! Could not resolve dependency:npm ERR! peer @react-native-firebase/app@"18.9.0" from @react-native-firebase/messaging@18.9.0npm ERR! node_modules/@react-native-firebase/messagingnpm ERR! @react-native-firebase/messaging@"^18.3.0" from the root projecti am updating 19.2.2 so that i can build but still pods have issue in its internal firebase packages , but if i ignore this error using flag npm install --legacy-peer-deps , then i am able to run project but getting error pasted above

Unexpected CFBundleExecutable Key - can't find the right CFBundleExecutable in plist.info to delete

$
0
0

Like many others, I'm experiencing a Unexpected CFBundleExecutable Key error when trying to upload my app to TestFlight via Xcode. Unfortunately, I've tried many of the things suggested so far, and haven't found a solution.

As is, I can build my project locally, but as soon as I Project --> Archive and build my app there, and I click Distribute, I get the following errors:

Unexpected CFBundleExecutable Key. The bundle at 'Payload/wanderly.app/Frameworks/Lottie.framework/LottiePrivacyInfo.bundle' does not contain a bundle executable. If this bundle intentionally does not contain an executable, consider removing the CFBundleExecutable key from its Info.plist and using a CFBundlePackageType of BNDL. If this bundle is part of a third-party framework, consider contacting the developer of the framework for an update to address this issue.

If I delete Lottie from my project, I still get a similar issue:

Unexpected CFBundleExecutable Key. The bundle at 'Payload/wanderly.app/Frameworks/React.framework/AccessibilityResources.bundle' does not contain a bundle executable. If this bundle intentionally does not contain an executable, consider removing the CFBundleExecutable key from its Info.plist and using a CFBundlePackageType of BNDL. If this bundle is part of a third-party framework, consider contacting the developer of the framework for an update to address this issue.

Which is weird, since many of the reports of this error are about libraries, but this is related to core React/ReactNative (this is a ReactNative app).

I've tried a variety of different things so far:

  1. Completely cleaning my project (delete pods, node_modules, etc) + Clean Build Folder, and no dice.

  2. As some solutions have mentioned, I've also looked at Copy Bundle Resources, and there's no erroneous files. I've also set ENABLE_BITCODE to NO.

No weird additions to Copy Bundle Resources

  1. As most solutions have mentioned, I've tried going to the info.plist for each package to try to remove the CFBundleExecutable key, but have been unable to find reference to the mentioned executable OR it doesn't seem to work if I remove it. This is perhaps the most ambiguous / challenging aspect, since there are many places where the .plist can be found, and other answers don't seem to connect the dots enough for me.

3a) If I do a Cmd + Shift + O for info.plist in Xcode, I get a list of files, but none of them exactly match the bundles listed in my errors.

if I search for info.plist in XCode

info.plist for one lottie entry

info.plist for the other one

You'll also notice that these all have the Bundle OS Type Code already set to BNDL, and there's not mention of the CFBundleExecutable key / Executable Name.

3b) I've also looked directly into the created "Archive", for an archive, I right click to "Show in Finder", and then right clicked on the .xcarchive to "Show Package Contents" --> dSYMs --> Lottie.framework.dSYM --> "Show Package Contents" --> Contents --> Info.plist, and that doesn't contain anything like what I'm looking for:

directly looking into the contents of a built archive

3c) I've also looked into Pods directly in XCode, and looked at related Targets. In the settings it'll show a "Info.plist File" location like /project_root/ios/Pods/Target Support Files/lottie-ios/ResourceBundle-LottiePrivacyInfo-lottie-ios-Info.plist. Openning that file doesn't show a CFBundleExecutable / Executable Name key:

looking for info.plist under Target Support Files

3d) I've also tried searching my project under Pods for mentions of CFBundleExecutable, and got the following output:

MacBook-Pro-2 ios % grep -r "CFBundleExecutable" Pods/**/*.plistPods/Target Support Files/Pods-wanderly-wanderlyTests/Pods-wanderly-wanderlyTests-Info.plist:  <key>CFBundleExecutable</key>Pods/Target Support Files/Pods-wanderly/Pods-wanderly-Info.plist:  <key>CFBundleExecutable</key>Pods/hermes-engine/destroot/Library/Frameworks/macosx/hermes.framework/Versions/0/Resources/Info.plist: <key>CFBundleExecutable</key>Pods/hermes-engine/destroot/Library/Frameworks/universal/hermes.xcframework/ios-arm64/hermes.framework/Info.plist:  <key>CFBundleExecutable</key>Pods/hermes-engine/destroot/Library/Frameworks/universal/hermes.xcframework/ios-arm64_x86_64-maccatalyst/hermes.framework/Versions/0/Resources/Info.plist:  <key>CFBundleExecutable</key>Pods/hermes-engine/destroot/Library/Frameworks/universal/hermes.xcframework/ios-arm64_x86_64-simulator/hermes.framework/Info.plist: <key>CFBundleExecutable</key>

which doesn't mention any of the named bundles mentioned in the error.

3e) I've also looked up wanderly.app in Finder. If I right click and got to "Show Package Contents", I get to a directory where I actually see the packages in the error. If I open the info.plist for each, I actually see the keys and the issue where it includes CFBundleExecutable key and the CFBundlePackageType, and I can delete / edit these files (delete CFBundleExectable and adding BNDL). But when I change them, nothing changes... I think because this directory is related to my locally running build, not the archive that I'm trying to upload.

the info.plists in wanderly.app Show Package Contents

the right keys to be deleting

I'm the most optimistic about this last strategy, but I'm missing the link to how to get these changes to be part of what build I'm trying to upload to TestFlight.

Can anyone help me connect the dots here? I'd really appreciate it.

Invalid `Podfile` file: uninitialized constant Pod::Podfile::FlipperConfiguration

$
0
0

I have implemented a iOS where need to unlinked react-native-linear-gradient and then install the react-native-video and added all of the information but there is an issues when I install PodFile using pod install.

Below the required version which I have used,

Node Version: v16.16.0 ;npm Version: 8.11.0 ;React-Native Version: 0.69.0 ;Pod Version: 1.11.3

Here is the code sample of PodFile,

require_relative '../node_modules/react-native/scripts/react_native_pods'require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'platform :ios, '12.4'use_frameworks! :linkage => :staticinstall! 'cocoapods', :deterministic_uuids => falseproduction = ENV["PRODUCTION"] == "1"target 'iosUserApp_HelloSuperStars' do  config = use_native_modules!  # Flags change depending on the env values.  flags = get_default_flags()  use_react_native!(    :path => config[:reactNativePath],    # to enable hermes on iOS, change `false` to `true` and then install pods    :production => production,    :hermes_enabled => flags[:hermes_enabled],    :fabric_enabled => flags[:fabric_enabled],    :flipper_configuration => FlipperConfiguration.enabled,    #I have faced error here    # An absolute path to your application root.    :app_path => "#{Pod::Config.instance.installation_root}/.."  )  target 'iosUserApp_HelloSuperStarsTests' do    inherit! :complete    # Pods for testing    pod ‘react-native-webrtc’, :path => ‘../node_modules/@videosdk.live/react-native-webrtc’  end  use_flipper!()  post_install do |installer|    react_native_post_install(installer)    __apply_Xcode_12_5_M1_post_install_workaround(installer)  endend

please concern on the attached file to check error,FlipperConfiguration Error

How to place an Image on top of other Image in React Native?

$
0
0

I placed an Image as a root node in order to make it a background for my View. But it appears that all others image become invisible...Is it any way to place an image on top of the background using built-in components, without any plugins?
In the following code sample landing-background is used as a background, my logo image is visible, but only if background is removed.
Text is showing on top of the background without any concerns...

<View style={styles.container}><Image source = {require('./img/landing-background.jpg')}              resizeMode = 'cover' style = {styles.backdrop}><View style = {styles.overlay}><Text style = {styles.headline}>It should appear in front of the Background Image</Text><Image style = {styles.logo} source = {require('./img/logo.png')} /></View></Image></View>var styles = StyleSheet.create({      container: {        flex: 1,        alignItems: 'center',      },      overlay: {        opacity: 0.5,        backgroundColor: '#000000'      },      logo: {        backgroundColor: 'rgba(0,0,0,0)',        width: 160,        height: 52      },      backdrop: {        flex:1,        flexDirection: 'column'      },      headline: {        fontSize: 18,        textAlign: 'center',        backgroundColor: 'rgba(0,0,0,0)',        color: 'white'      }    });

Expo linking returns false for file path

$
0
0

I'm working an expo project and I'm using expo-linking library to trigger an opening of a PDF file when the download is completed. I just discovered that the expo linking canOpenURL method returns a false value for the "file" path on an iOS device.

const openDocument = () => {   const contentUri = await FileSystem.getContentUriAsync(fileUri);   console.log("Content URI: ", contentUri);   /* Content URI:  file:///var/mobile/Containers/Data/Application/9BE65D63-4F83-4C78-    A9B7-E268DC3073EA/Documents/Certificate.pdf */   if (await Linking.canOpenURL(contentUri)) {        Linking.openURL(contentUri);   }}

I went through the expo-linking docs to understand why this is happening and I found this:

On iOS, Linking.canOpenURL requires additional configuration to query other apps' linking schemes. You can use the expo.ios.infoPlist key in your app config (app.json, app.config.js) to specify a list of schemes your app needs to query.

If you don't specify this list, Linking.canOpenURL may return false regardless of whether the device has the app installed. Note that this configuration can only be tested in development builds because it requires native changes that will not be applied when testing in Expo Go.

So I updated my app.json file with the following:

{"expo": {"name": "app-name","slug": "app-name","version": "1.0.0","orientation": "portrait","icon": "./assets/icon.png","ios": {"supportsTablet": true,"infoPlist": {"LSApplicationQueriesSchemes": ["mailto","message","readdle-spark","airmail","ms-outlook","googlegmail","inbox-gmail","ymail","superhuman","yandexmail","fastmail","protonmail","file"        ],      },    },"android": {"adaptiveIcon": {"foregroundImage": "./assets/adaptive-icon.png","backgroundColor": "#ffffff"      },"permissions": ["android.permission.CAMERA","android.permission.RECORD_AUDIO"      ],    },"plugins": ["react-native-email-link",      ["react-native-vision-camera",        {"cameraPermissionText": "We need access to your camera to scan products' barcodes.","enableCodeScanner": true        }      ],"expo-secure-store",  }}

I added the file to the list in the infoPlist as recommended in the docs and built my app using development build. After build completion, the Linking.canOpenURL(contentUri) still returns false. I have spent hours trying to debug what could be happening and I'm still unable to find a headway. Any good pointer to why this is happening would be greatly appreciated. Thank you.

Viewing all 17139 articles
Browse latest View live


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