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.
This is quite bizarre, but after getting this error I opened up the workspace in Xcode and ran it from there. Afterwards this error went away when running react-native run-ios
I suspect this might have something to do with the way Xcode 12 optimizes builds and that re-building it from Xcode somehow fixed it. I would like to know why, but I cbf'ed figuring it out myself.
This happened to me because I clean up some image, and removed some native dependancies. All I did was cd ios && pod install then yarn ios to build again.
Tried cleaning build folder and ran, it worked.
Xcode toolbar -> Product -> Clean build folder
Step - 1: Clean the build folder from Xcode.
Xcode toolbar -> Product -> Clean build folder
Step - 2: Delete the App installed in the device/simulator
Step - 3: Go to VSCode and move to ios directory using command line and just to be on the safer side, run the following command (just to remove build folder via VSCode as well)
rm -rf build
Step - 4: Run
pod install
Step - 5: Go back to the project folder and build the app again:
npx react-native run-ios
Context: react-native upgrade fails and cleaning the build folder doesn't work.
What works:
Trash out the node_modules folder.
Make yarn install to re-create dependencies.
It doesn't have any impact on "Podfile", but if you (future users) did, remove Podfile.lock, go to the ios folder and run pod install again. It must solve.
This is obviously overkill, but a reboot fixed this problem for me. I turned off my computer and turned it on again, and it's now working well.
When I log in to "Podfile" I will not be able to say why it does not work, but if you (future users) do it, remove Podfile.lock, go to the ios folder and run it again pod install. It must be resolved
Related
I'm currently trying to work with xcode to test my flutter application with xcode. The big issue is that all of my imports (such as app_settings, cloud_firestore, etc...) give an error for "Module ___ not found". When I try to run my dart code I get the error in the terminal:
[Proj Root]/ios/Runner/GeneratedPluginRegistrant.m:10:9: fatal error: module 'app_settings' not found
#import app_settings;
~~~~~~~~^~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
I tried running flutter create for ios, (this might've made things worse?) Flutter clean and reinstalling pods doesn't seem to work either. I'm wondering if there's something simple that I missed with importing modules. I created the application on android using modules that should work with Android & iOS. After getting the android version working I pulled my project on my mac through github and finally reached this issue. Any pointers would be appreciated because I'm totally stuck on this.
My project has 3 build flavor. Development, Staging & Production.
In Xcode It was selected default Runner One. (On Top of the middle)
though i follow the process like
delete pod , Podfile.lock and .symlinks from Android Studio / (From Project)
flutter pub get
cd ios > pod install
Then In XCode > clean build
Select Right Build Flavor (Production For Me)
Then Archive (Done)
NB: I tested in M1 machine.
Hmm Not sure what happened but it seems to be good now. I think pod init was initializing minimal data for the podfile. Instead, I deleted the Pods file and did flutter run and it built the podfile correctly with flutter pub get.
Had the same problem, we solved it by setting the iOS Deployment target in XCode to the same value as set in the Podfile, which was 12.0. Then ran flutter clean and flutter build ios worked like a charm 🎉
I had this same problem. What I did was
Delete the Podfile and Podfile.lock
flutter clean
flutter build ios
Opened the Runner.xcworkspace
Build on Xcode
This worked for me 🎉
Delete pod directory and podfile.lock
flutter clean
flutter pub get
cd ios
pod install --repo-update
run the application in Xcode
I tried everything above, but for me the solution was quite different.
I am using flavors (schemes), and I accidentally created the scheme with upper case in the first character, while everywhere else (build config etc.) I used lower cases only. After deleting the scheme and recreating with lower case characters, it worked.
path/flutter/ios/Runner/GeneratedPluginRegistrant.m:12:9: Module 'app_settings' not found
I had the same issue after upgrading the Xcode to 13.3 and my production build flavor wasn't working. I was using firebase as well. In my production build flavor, I didn't append anything to the configuration name (i.e. all the other configurations have the name like "Debug-staging", "Debug-development", but in the production, it's only "Debug"). I just deleted the pod file and run:
flutter run --flavor production --target lib/main_production.dart
Everything worked fine for me.
I'm practicing capacitor js, and was able successfully to package the (html, css & js) files and build them on 'android studio' according to the commands on 'https://capacitorjs.com/docs/android'.
Yet when i powered up macOS version 10.14 on VMware and tried to do the same steps 'https://capacitorjs.com/docs/ios' to build on Xcode, the following warnings and errors occured...
Bugs
I traced the path written in the error and couldn't find neither file nor folder named Pods....
The App folder
I'm using XCode version 11.3 and did install 'Node.js & Xcode command line tools' as mentioned as "capacitor js requirements" on the documentation, also installed CocoaPods.
It's my first time using macOS so I might have missed some additional steps that needed to be done.
Would be very thankful if anyone could guide me through that bug.
Looks like you've openend the .xcodeproj file. Don't do that, use the .xcworkspace exclusively. Also, if you don't have a Pods folder, you probably forgot to run pod install
Thanks to Gereon the step that was missing is to use the command pod install on the 'App' folder that has the 'Podfile.txt', it will extract some extra files including the required Pods folder.
App Folder After Using pod install
If after building you faced the following error...
failed to initiate service connection to simulator
Just clean the build folder and run again.
To clean the build folder you can use the shortcut Command+Option+Shift+K or Menu Bar → Product → Hold Option Key → Clean build Folder.
I've build a react-native application and suddenly I get this error message on my terminal during run of the command react-native run-ios.
The same code work fine 10 minutes ago and suddenly I get this error message.
Please help...
If you don't have cocoa pods installed you need to sudo gem install cocoapods
run cd ios
run pod install
cd ..
delete build folder
run react-native run-ios
if the error persists,
delete build folder again
open the /ios folder in x-code
navigate File -> Project Settings -> Build System -> change (Shared workspace settings and Per-User workspace settings): Build System -> Legacy Build System`
You should be good to go.
delete the build/ folder in ios/ and rerun
if that doesn't do any change then
File -> Project Settings (or WorkSpace Settings) -> Build System -> Legacy Build System
Rerun and voilà !
In case this doesn't work, don't be sad, there is another solution to deeply clean project
Delete ios/ and android/ folders.
Run react-native eject [Edit: deprecated, so skip this step]
Run react-native link
react-native run-ios
This will bring a whole new resurrection for your project
SOLVED: Always be sure to update your Xcode folks!
Protip: And don't do it from the apple store (but always do it from an official apple website of course)
tip from: http://ericasadun.com/2016/03/22/xcode-upgrades-lessons-learned/
official apple download page: https://developer.apple.com/download/more/
For those who are unable to resolve with above method
Go to project settings in Xcode. Menu File->Project Settings
Go to per-User Project Settings section.
Click on advanced.
Select Xcode Default option. previously this used to be Legacy for my project.
I have analysed on similar lines and concluded that clean is causing the archive to fail. So, the new build system is not clearing the custom/legacy build directory.
delete the build/ folder in ios/ and rerun if that doesn't do any change then
File -> Project Settings (or WorkSpace Settings) -> Build System -> Legacy Build System
Rerun and voilà !
If it still Fails you need to clean full project
Do the following:
Delete ios dir manually
Clean cache Run npm cache clean --force
Run react-native eject
Re-install all packages npm install
Run the link command react-native link
Finally run react-native run-ios
cd ios && rm Podfile.lock && pod install worked for me.
And perhaps few updates if the first didn't help as much, as:
sudo gem install cocoapods
rm Podfile.lock && pod install --repo-update
For me it caused by installing react-native-vector-icons and linking by running the react-native link react-native-vector-icons command.
I just unlinked the react-native-vector-icons by following commands
react-native unlink react-native-vector-icons
cd ios
pod install
cd ..
react-native run-ios
As I already installed an other icon library.
After upgrading react-native, you may have stale dependencies. The steps below should fix it.
cd ios
delete Podfile.lock
pod deintegrate && pod install
Navigate back to package.json directory
run react-native run-ios
In Xcode you can build your project again too
I did this after upgrading to react-native 0.61
Should always start with the simplest first, after wasting hours and days on this error.
And after an extensive amount of research,
Simply
RESTART YOUR MACHINE
This resolved this error.
I'm on
react-native-cli: 2.0.1
react-native: 0.63.3
If you don't have cocoa pods installed you need to:
sudo gem install cocoapods
Then run:
cd /ios
pod install
delete the build folder in ios folder of your react native project
run:
react-native run-ios
if error persists:
delete build folder again
open the /ios folder in Xcode
navigate File -> Project Settings -> Build System -> change (Shared
workspace settings and Per-User workspace settings): Build System -> Legacy Build System
This problem may occur after installing react-native-vector-icons
Open the project in Xcode.
Go to build phases.
go to Copy Build resources.
Remove all .ttf files from here.
Run the application.
I had the same error, but it was caused by the package manager process port being already used (port 8081).
To fix, I just ran the react-native by specifying a different port, see below.
react-native run-ios --port 8090
A popular reason to builds failing and error code 65 is a missmatch between cached pod files and current packages used. Here is how to remove the cache and recreate the pods.
1. Delete Derivate Data - Remove data that includes cached info of the project Example how to do it: https://www.youtube.com/watch?v=f8bTvx0Aoyo
2. Delete .xcworkspace file from ios folder - This is the Xcode project file that gets created when you run pod install we want to recreate it in step 4. This project file uses pods and has a white coloured icon instead of the blue coloured base project without pods.
3. Delete Podfile.lock - Remove old dependencies info so we can recreate them in the next step.
Do a pod-install in ios folder or npx pod-install in root with (React native) - Here we download the pod dependencies again and the pod files only the ones that are used from the current packages are downloaded. A .xcworkspace is regenerated
In my case, the issue was with my Xcode build scheme. When you run react-native run-ios you may see something like,
info Found Xcode workspace "myproject.xcworkspace"*
info Building (using "xcodebuild -workspace myproject.xcworkspace -configuration Debug -scheme myproject -destination id=xxxxxxxx-xxxxx-xxxxx-xxxx-xxxxxxxxx -derivedDataPath build/myproject")*
In this case, there should be a scheme named myproject in your ios configurations. The way I fixed it is,
Double clicked on myproject.xcworkspace in ios directory (to open workspace with Xcode)
Navigate into Product > Scheme > Manage Schemes...
Created a Scheme appropriately with name myproject (this name is case-sensitive)
Ran react-native run-ios in project directory
In case you are using a Mac M1 architecture it is not directly compatible with Cocoapods. If you encounter issues when installing pods, you can solve it by running:
sudo arch -x86_64 gem install ffi
arch -x86_64 pod install
These commands install the ffi package, to load dynamically-linked libraries and let you run the pod install properly, and runs pod install with the proper architecture.
Source: https://reactnative.dev/docs/environment-setup see "Note for Mac M1 users"
run pod install inside ios folder then go back to root folder and run npx react-native run-ios
What worked for me was to rename the project by removing the special characters.
Example: "project_marketplace" to "projectmarketplace"
In this case, I redid the project with react-native init and copied the src and package.json folder.
If you encountered issues with M1.
Try installing the ffi package and running install again.
sudo arch -x86_64 gem install ffi
cd ios
arch -x86_64 pod install
Another solution that I found here works great, basically installing cacoapods with brew (and passing -arm64).
sudo gem uninstall cocoapods
arch -arm64 brew install cocoapods
cd ios
pod install
This could also be due to having custom named schemes, in that case:
cd ios
xcodebuild -list
Find your's, it might have a -dev suffix. Then:
cd .. (root of the app)
npx react-native run-ios --scheme custom-scheme-name
In my case everything solved after re-cloning the repo and launching it again.
Setup:
Xcode 12.4
Mac M1
In my case, none of the answers resolved it, since am not able to open .xcworkspace at all. But the legacy comment hinted to a RN to Xcode <> compatibility issue, so i tried all the previous RN Versions and all below RN#0.64 seem to work with xcode 11.3.1
npx react-native init projectName --version 0.62.0
Thanks
Below work for me though I encounter error code 65 due to I rename an existing project name to a new name which I did for all the files within the project.
My solution was :-
At ios folder level open xworkspace with xcode.
Click on file tab then click on workspace settings.
I clicked on advance then I select xcode default then I clicked on close button.
I clicked on scheme tab which is beside the stop button at the right then I clicked on edit scheme.
When the edit scheme opened I clicked on build tab then I click on manage scheme button.
I selected scheme of my project name then I clicked the minus(-) button to delete it then I clicked on close
I clicked on clean build folder then when its complete I clicked on build tab to rebuild the project.
I clicked on play button which i selected the simulator I want then everything work perfectly again.
I too had an issue with react-native-vector-icons causing this. I still wanted to use the icons though, and I was using VSCode
Workaround was to more or less the same as the manual instructions from the docs but a little different.
npm install --save react-native-vector-icons
copy the .tff files you want to use in node_modules -> react-native-vector-icons -> fonts
create a new folder "fonts" in src -> ios
...paste the .tff files in there
open 'info.plist' in src -> ios -> mobile
on the line above </dict> paste:
<array>
<string>AntDesign.ttf</string>
<string>Entypo.ttf</string>
<string>EvilIcons.ttf</string>
<string>Feather.ttf</string>
<string>FontAwesome.ttf</string>
<string>FontAwesome5_Brands.ttf</string>
<string>FontAwesome5_Regular.ttf</string>
<string>FontAwesome5_Solid.ttf</string>
<string>Foundation.ttf</string>
<string>Ionicons.ttf</string>
<string>MaterialIcons.ttf</string>
<string>MaterialCommunityIcons.ttf</string>
<string>SimpleLineIcons.ttf</string>
<string>Octicons.ttf</string>
<string>Zocial.ttf</string>
<string>Fontisto.ttf</string>
</array>
...or whatever fonts you selected.
I ran react-native run-ios and it worked like a charm.
Some changes in Podfile haven't been updated. Maybe one of your native dependencies has changed.
expo prebuild --clean
cd ios
pod install
yarn ios
In a React Native app, I removed some font assets that I previously linked. For some reason, they didn't get deleted from the Xcode project. I deleted them manually and then it worked.
For our project, we had to run the npx react-native link command in order to get the react native vector icons to show up on Android phones. But that added code to the ios/yourprojectname.xcodeproj/project.pbxproj file.
And that caused the build to fail, throwing an error code 65 and listing out all the fonts that were duplicated.
So, to fix the error, we just removed all of the new code that was added by the npx react-native link command.
If you've built/run your app previous from Xcode and want to go back to using the terminal you need to clean your build folder.
Go to product -> Clean Build Folder
In my case it was an issue between different installations of npm installed via nvm and homebrew which somehow messed up my setup.
Building via Xcode usually works without solving the initial problem. I have solved it as follows. Notice, that this guide is suitable if you want to use nvm.
First, we remove a possible installation of npm and yarn using brew as follows.
brew uninstall npm
brew uninstall yarn
We might want to remove nvm as well.
rm -rf "$NVM_DIR"
Next, we reinstall nvm by executing the following command.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | <ShellOfYourCoice>
Replace <ShellOfYourCoice> with bash if you are using bash, with zsh if you are using zsh.
Add the following content to ~/.bash_profile (.bashrc) for bash or to ~/.zshrc for zsh (you might need to create these files).
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
For zsh, we might need to fix some permissions. Execute the following command.
compaudit | xargs chmod g-w
Then, source the shell of your choice. Verify the installation by executing the following.
nvm --version
which npm
The last command should print something similar to the following.
/Users/<userName>/.nvm/versions/node/v16.10.0/bin/npm
If yarn were installed using npm previously, we first remove it.
npm uninstall yarn
Next, we reinstall it.
npm i -g yarn
These steps fixed the issue for me.
For macOS, make sure that none of the names of the directories has a space character ' ' in their names. I spent hours figuring out the problem and the problem was so small.
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65
That was my error and i resolve this error with the following commands:-
1- Uninstall Ruby with: brew uninstall ruby --force
2-Uninstall CocoaPods. At first, try to list all CocoaPods versions / components with gem list --local | grep cocoapods. Then uninstall them one by one, in my case:
1- sudo gem uninstall cocoapods
2- sudo gem uninstall cocoapods-core
3- sudo gem uninstall cocoapods-downloader
,cocoapods-plugins
,cocoapods-search
,cocoapods-trunk
,cocoapods-try
etc.
3- As a next step I was able to reinstall ffi and then CocoaPods with:
i) sudo arch -x86_64 gem install ffi
ii) sudo arch -x86_64 gem install cocoapods
Once done, I could run pod install as expected. Note that I had the Terminal open all the time in standard mode - no Rosetta required.
If you're like me and tried to change the name of the TestApp-folder. Notice the last line in the warning:
xcodebuild: error: The workspace named "TestApp2" does not contain a
scheme named "TestApp-tvOS". The "-list" option can be used to find
the names of the schemes in the workspace.
Not changing the TestApp name in the command nor after from this, helped me get rid of the message and the app was built:
react-native init TestApp --version=react-native#npm:react-native-tvos#latest
there was some issue while creating the app
so in my case i just deleted the package-lock.json and did npm i
after that
cd ios/ and pod install
Showing Recent Messages:-1: mkdir -p /Users/spritzindia/Library/Developer/Xcode/DerivedData/Contigo-atftiouzrdopcmcpprphpilawwzm/Build/Products/Debug-iphonesimulator/Contigo.app/Frameworks
Showing Recent Messages:-1: rsync --delete -av --filter P .*.?????? --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "/Users/pothi/Library/Developer/Xcode/DerivedData/Contigo-atftiouzrdopcmcpprphpilawwzm/Build/Products/Debug-iphonesimulator/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework" "/Users/pothi/Library/Developer/Xcode/DerivedData/Contigo-atftiouzrdopcmcpprphpilawwzm/Build/Products/Debug-iphonesimulator/Contigo.app/Frameworks"
Command PhaseScriptExecution failed with a nonzero exit code
I deleted derived data.
i have tried :
keychain access -> right click on login -> lock & unlock again ->
clear Xcode project
Restarted machine, no use
How do I resolve "Command PhaseScriptExecution failed with a nonzero exit code" error when trying to archive project.
And I am using those librarys
pod 'IQKeyboardManagerSwift'
pod 'SDWebImage', '~> 4.0'
pod 'KRPullLoader'
pod 'Paytm-Payments'
After trying all the solutions, I was missing is to enable this option in:
Targets -> Build Phases -> Embedded pods frameworks
In newer versions it may be listed as:
Targets -> Build Phases -> Bundle React Native code and images
Run script only when installing
Go to
Keychain Access -> Right-click on login -> Lock & unlock again
Xcode -> Clean Xcode project ->Make build again
Run the following commands from the ios directory:
pod deintegrate
pod install
XCode Clean build
Or, One-Liner:
pod deintegrate; pod install
Warning: Legacy Build System is deprecated and will be removed in a further release.
Xcode -> File -> Workspace Setting -> change Build System to Legacy Build System.
Note - Its not the ideal solution.
For me, I was removing Crashlytics, Fabric and FirebaseCrashlytics. So there was a script (Run Script) for Fabric. So since app was running that first and I had removed the framework already, I was getting this error. So I removed the Run Script tab for Fabrics and then it worked perfectly fine.
I have faced the same issue in Xcode 13. I have updated the Crashlytics SDK after that I got the same issue.
In my case I have followed the Solution2
Solution1:
I have removed the data from Run Script.
-> Targets ->go to Build Settings ->Click Run Script -> Remove script data
Solution2:
If script is mandatory to your project just select install builds only option.
Select For install builds only option
Script:
"${PODS_ROOT}/FirebaseCrashlytics/upload-symbols" -gsp "${PROJECT_DIR}/#####/GoogleService-Info.plist" -p ios "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}"
In the above script ##### is the app name, if required replace with your app name. If not, use below script.
"${PODS_ROOT}/FirebaseCrashlytics/upload-symbols" -gsp "${PROJECT_DIR}/GoogleService-Info.plist" -p ios "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}"
Solution 3
And one more importent thing is you must set the path of the file properly.
Find the below example path.
You have multiple google services plist piles, in this case you are
maintaining 2 different files.
Your google service info plist file was under FireBase, Dev. In this case you must add these files path properly. Otherwise you will get the same error.
"${PODS_ROOT}/FirebaseCrashlytics/upload-symbols" -gsp "${PROJECT_DIR}/#####/Firebase/Dev/GoogleService-Info.plist" -p ios "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}"
Solution 3 file structure:
Xcode 12.2 solution:
Go to:
Build settings -> Excluded Architectures
Delete "arm64"
I was facing this issue because of Firebase Crashlytics. In
Targets -> Build Phases -> Run Script
I had Firebase Crashlytics written like
${PODS_ROOT}/FirebaseCrashlytics/run
I changed that and put it in double quotes
"${PODS_ROOT}/FirebaseCrashlytics/run"
For me, the issue was with the node version that xcode was using. My project was building fine in Expo but not in Xcode after ejecting. I found my answer here: https://github.com/expo/expo/issues/8488
check you have the latest version of node
$ node --version
delete the version in /usr/local/bin/
$ rm /usr/local/bin/node
re add a sym link
$ ln -s $(which node) /usr/local/bin/node
Restart worked for me... Mac OS restart, not xCode restart...
The reason
This build phase also lets you provide a list of input and output files. The script always runs when no input and output files are provided. When input and output files are provided, the script only runs if it has never been run before, one of the input files has changed, or one of the output files is missing
If you are using cocoapods, you may not be required to have an additional run script .
The solution
So the solution is remove the script as follows:
I had a similar error
/{path to project root}/Pods/Target Support Files/Pods-{project name}/Pods-{project name}-frameworks.sh: Permission denied
Command PhaseScriptExecution failed with a nonzero exit code
In my case I had received a zip of a repo that included the Pods folder. It turns out that at some point between it being originally created and sent to me, the *.sh files in Pods/Target Support Files/Pods-{PROJECT}/ had all lost their execute permissions. Giving those files +x was the solution
For Example:
chmod +x (File name in the error)
In my case: chmod +x Pods-TestExample-frameworks.sh
In my case the error was caused by the lack of space on my machine. Deleting old builds fixed the problem.
In Xcode 12.4, after hours of try found the solution to this.
Go to Target > Architectures
Set Build Active Architecture Only to YES
and Excluded Architectures to x86_64
try this step if you need: Xcode 11.5
1- open terminal: cd Path_project
2- cd pod clean
3- pod install
if nothing change make this step
1- open Build Phases for target -> [CP] Embed Pods FrameWork
check this field
Another reason for the error might be is that Xcode is running a script during the run phase.
If this is the case, you have 2 options:
Delete the script (makes sense if the script is NOT important)
Modify/update the scripts location path (Xcode might not be able to locate the script)
In my case, the script was important, so I modified/updated its location.
Originally, the script location path was written like this:
$SRCROOT/scripts/clean-assets.sh
Because the scripts path contained spaces (I moved the project to a new directory), I changed the path to this:
"$SRCROOT"/scripts/clean-assets.sh
By adding quotes to SRCROOT, changing it to "$SRCROOT", the error will go away.
If you are doing Unity Project. You can get this error.
Command PhaseScriptExecution failed with a nonzero exit code
The solution is very simple
https://forum.unity.com/threads/error-on-build.561706/
Pre-requisites: Have cocoapods installed
Not Needed: 1. Install "cocoapods"
for installing run following line in your terminal: $sudo gem install cocoapods
Open your project folder using terminal
Run this line: chmod +x MapFileParser.sh
Run this line: chmod +x process_symbols.sh
It worked for me)
I think that installing "cocoapods" is not necessary, only step 3 and 4 enough to solve, but it does not work, you can try it.
If you experience this issue in flutter. Try running the application on a real iPhone device from other IDE like android studio or vs code.
The issue was flutter SDK missing iOS-profile-release.
So by running the flutter command
flutter run
It downloads the missing things before running and this solves the problem.
solution for me, none of these arch -x86_64 pod install and etc does not work until I did these steps:
run sudo gem install ffi in terminal.
then run arch -x86_64 pod install and build again.
and worked fine.
In terminal go to project path and follow the below steps
pod deintegrate
pod cache clean --all
pod install
For Xcode 11, React Native development environment.
I usually have this problem when a dependency is not updated.
You can try following these steps, this usually works for me:
1- Delete your Podfile.lock (I like to use the command '-rm -rf Podfile.lock' on the terminal for this)
2- Delete your Pods folder (I like to use the command '-rm -rf Pods' in the terminal for this)
3- Delete your .xcworkspace
4- Pod install
5- Clear your project into XCode> Product> Clean Build Folder
I got the error while using react-native-config.
Got this error since I had an empty line in .env files...
FIRST_PARAM=SOMETHING
SECOND_PARAM_AFTER_EMPTY_LINE=SOMETHING
3 hours wasted, maybe will save someone time
I have a project in React Native and suddenly this error appeared. I was doing something with homebrew beforehand and this solved the issue for me:
brew update
brew upgrade
brew cleanup
By mistake I had uninstalled carthage from my system. Adding that fixed the issue for me.
Step 1:
Download & install latest carthage DMG here: Carthage
Step 2:
carthage update --platform iOS --cache-builds
Step 3:
Run project & enjoy. :)
I tried everything above nothing worked
for me it was a space in a folder name
/swift files/project a/code.xcworkspace ->
/swift_files/project_a/code.xcworkspace
did the trick If I looked deeper it was stopping at /swift
For me the reason was while changing name of app I added a single quote ' in name.
I tried different solution and ran into different errors, but at last, while renaming app, I did not include ' single quote and it solved the problem.
For me, the issue was with Sentry.
in Xcode navigate to targets->Build Phases
delete the Upload Debug Symbols to Sentry phase
clean the build folder and try the build again
I used flutter to create iOS project.
When build for Simulator, failed with the same error message.
It is solved by following work.
xCode 12.3
Build Settings->Build Active Architecture Only, set it to Yes.
I was able to resolve this error by remove file in Pods -> Targets Support Files -> Pods-AppName -> Pods-AppName-frameworks.sh. After removing that file again install pod using command pod install.
OR.
Try this:
-> quit xcode
-> install pod(again)
-> start xcode
Take Pods-resources.sh from project path and paste in Terminal
sudo chmod a+x "Pods-resources.sh file path here"
Example Usage:
sudo chmod a+x "/Users/path/Desktop-path/My Work-path/Pods/Pods-resources.sh"
I am trying to implement react-native-google-sigin package to my react-native Ios project . I have configured everything.
But now the problem if I include google framework to my project there is a pop an error and As soon as I remove it. It works!!
I really don't know why m getting build fail with the following error
Every time i include ios/GoogleSdk frameworks in my project.
I don't know why or how but I ran into this issue and after numerous cleans, DerivedData deletes etc., the solution that worked for me was to follow XCode's advice on upgrading to the recommended settings and changing the iOS Deployment Target of RNGoogleSignIn project to 8.0. I'm using XCode 9 if that helps.
This is how I solved this:
rm -rf node_modules/ ios/
(Copied my podfile to another location)
npm install & react-native upgrade
(this will give me a error free start cause by react-native link)
cp my podfile inside ios/ Pod install
Followed the remaining steps from react-native-google-signin
Added the following to my login.js (iosCLientId and CLientId are different Id's)
await GoogleSignin.configure({
iosClientId: 'iosClientId',
webClientId: 'webClientId',
offlineAccess: false
});
Open Xcode Clear and Build the project.
Note: I would have easily removed the googlesdk(frameworks), links and library . But instead I choose to get get a fresh start. Hope this helps anyone