I am using CocoaPods for the first time. Installing required libraries causes the build process to break.
Installing Podfile gives this warning:
xcrun: error: active developer path ("/Volumes/Xcode 6.1/Xcode.app/Contents/Developer") does not exist, use `xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools (or see `man xcode-select`)
The following is the build error message:
clang: error: no such file or directory: '/Users/aztunwin/ObjC/DenkoStation/Pods/Target Support Files/Pods-RKValueTransformers/Pods-RKValueTransformers-dummy.m'
clang: error: no input files
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
The first error appears to be because you originally launched Xcode 6.1 from your disk image (.dmg) file, so that's where MacOS appears to be looking for the command line tools. You need to reset that.
Go to terminal and type in:
xcode-select --switch /Applications/Xcode.app
Your copy of Xcode is really found in your /Applications folder (as I can see from the second error output). Once you set the command line tools path using xcode-select, clean your project and restart Xcode and try building again.
Related
On Big Sur, I had XCode CLT installed, but not xcode itself. Git was working fine.
Then I installed XCode and now when I try to run git I get the following message:
git: error: Failed to determine realpath of '/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk' (errno=No such file or directory)
git: error: sh -c '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -find git 2> /dev/null' failed with exit code 16384: (null) (errno=No such file or directory)
xcode-select: Failed to locate 'git', requesting installation of command line developer tools.
A popup comes up, asks to install CLT and when I say ok, it downloads and installs for a few minutes. But when it's done, I'm right back where I started.
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk does not exist, but there are directories for 10.15, 11.1 and 11.3. But not 10.14.
Run the command:
sudo xcode-select -switch /Library/Developer/CommandLineTools
I had the same experience. The solution was to launch Xcode and complete that first run. It downloaded some stuff as part of the process and git was fine after that.
I was receiving the same block of error messages you were, but in either the line above or below was a tidbit suggesting to run xcodebuild -runFirstLaunch which I suspect would have had the same effect as manually running Xcode that first time.
I have a problem on deploy my app to xcode after run command below:
pod install
After run this command, dependencies was installed correctly:
When I tried to compile and deploy again, I had the several erros like this:
1) Target 'XXX' (project 'XXX') has copy command from '/Users/XXX/Documents/projects/react-native/tasks/node_modules/react-native-vector-icons/Fonts/Zocial.ttf' to '/Users/XXX/Library/Developer/Xcode/DerivedData/XXX-bbklwsxeibuqhtduldwfhgorkgcg/Build/Products/Debug-iphonesimulator/XXX.app/Zocial.ttf'
2) That command depends on command in Target 'XXX' (project 'XXX'): script phase “[CP] Copy Pods Resources”
To fix it, I change build system of xcode:
But now, I have the following issue:
ld: warning: directory not found for option '-L-L/Users/XXX/Library/Developer/Xcode/DerivedData/XXX-bbklwsxeibuqhtduldwfhgorkgcg/Build/Products/Debug-iphonesimulator/CocoaAsyncSocket'
ld: library not found for -lCocoaAsyncSocket
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Problem solved with this link:
https://github.com/react-native-community/upgrade-support/issues/36
I recently removed Instabug from my React Native 0.53.3 project, but when I run react-native run-ios I get a build failure:
ld: framework not found Instabug
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **
The following build commands failed:
Ld /Users/danale/Library/Developer/Xcode/DerivedData/build/Build/Products/Debug-iphonesimulator/NFIBEngage.app/NFIBEngage normal x86_64
(1 failure)
Installing build/Build/Products/Debug-iphonesimulator/NFIBEngage.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/NFIBEngage.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
How can I completely remove Instabug from my project so it's not looking for it on iOS build?
So far I have completely removed it from App.js file, but it's still being referenced in build.gradle, MainActivity.java, MainApplication.java, settings.gradle, project.pbxproj and yarn.lock file. I don't even use yarn by the way.
How do I completely clean this up?
If react-native unlink instabug-reactnative didn't work try removing all react-native link changes manually.
You may refer these pages to remove all references
Instabug rn link checklist
Instabug Documentation
Clean the project once every reference is removed.(Deleting Xcode derived data may be needed sometimes)
ld: library not found for -lPods-Bolts
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Getting this error when I try to compile my code, been stuck on it for so long, think its pretty simple to anyone who knows Xcode development.
These might help:
xCode: Library not found - lPods-Bolts - Exit Code 1
library not found for -lPods
Other than that, off the top of my head, here are a couple of things you can try:
Make sure you have cocoapods installed locally on your machine, and that your environment has a path to it. From a shell prompt, do the following:
$ pod --version
You should see something like "0.39.0" or "1.0.0". If you see "No such file or directory", you'll need to install it (make sure to read the "Install" and "Getting Started" sections completely)
Make sure you have all of your project's pod dependencies installed:
$ pod install
Do a clean build
Good luck!
Is it possible to open the BasicMenu.xcodeproj on xcode on the new version of ECSlidingViewController without having to do it via Examples.xcworkspace? I am trying to just work through the BasicMenu example specifically and when I do I get this error: ld: library not found for -lPods
clang: error: linker command failed with exit code 1 (use -v to see invocation)
No, the dependencies to ECSlingViewController won't be available.
You should be able to work with the BasicMenu project inside the workspace. CocoaPods is not required, the repo includes the installed dependencies.