XCode Not build my project - ios

I'am using React-Native and react-native-maps but if i want to build it will build failed. Errors is "Apple Mach-O Linker Error Group"
Error:
ld: warning: directory not found for option '-L/Users/mrkacan/Library/Developer/Xcode/DerivedData/tracis-hckbanztjtfhnresvxragwaciwlc/Build/Products/Release-iphonesimulator/DoubleConversion'
ld: warning: directory not found for option '-L/Users/mrkacan/Library/Developer/Xcode/DerivedData/tracis-hckbanztjtfhnresvxragwaciwlc/Build/Products/Release-iphonesimulator/Folly'
ld: warning: directory not found for option '-L/Users/mrkacan/Library/Developer/Xcode/DerivedData/tracis-hckbanztjtfhnresvxragwaciwlc/Build/Products/Release-iphonesimulator/Google-Maps-iOS-Utils'
ld: warning: directory not found for option '-L/Users/mrkacan/Library/Developer/Xcode/DerivedData/tracis-hckbanztjtfhnresvxragwaciwlc/Build/Products/Release-iphonesimulator/React'
ld: warning: directory not found for option '-L/Users/mrkacan/Library/Developer/Xcode/DerivedData/tracis-hckbanztjtfhnresvxragwaciwlc/Build/Products/Release-iphonesimulator/glog'
ld: warning: directory not found for option '-L/Users/mrkacan/Library/Developer/Xcode/DerivedData/tracis-hckbanztjtfhnresvxragwaciwlc/Build/Products/Release-iphonesimulator/react-native-google-maps'
ld: warning: directory not found for option '-L/Users/mrkacan/Library/Developer/Xcode/DerivedData/tracis-hckbanztjtfhnresvxragwaciwlc/Build/Products/Release-iphonesimulator/react-native-maps'
ld: warning: directory not found for option '-L/Users/mrkacan/Library/Developer/Xcode/DerivedData/tracis-hckbanztjtfhnresvxragwaciwlc/Build/Products/Release-iphonesimulator/yoga'
ld: library not found for -lDoubleConversion
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Edit:
set Build Active architecture Only to Yes
and add Google maps library its worked!

Please close the xcode project, and open the .xcworkspace file (with white XCode icon) and build your project, as it is required by any project that use Pods.

Related

"warning: directory not found; error: library not found" using Xcode build

I'm trying to build an iOS app using Xcode. I'm new to XCode.
I had trouble building it for release purposes with this command : bundle exec fastlane beta that lead to an error :
❌ ld: library not found for -lDoubleConversion
I didn't know what to do so I started by trying to build my app with Xcode, and had this stack :
ld: warning: directory not found for option '-L/Users/myuser/Library/Developer/Xcode/DerivedData/mobile-eeuzlarvkxgtncfhtkicciemdrtq/Build/Products/Debug-iphonesimulator/DoubleConversion'
ld: warning: directory not found for option '-L/Users/myuser/Library/Developer/Xcode/DerivedData/mobile-eeuzlarvkxgtncfhtkicciemdrtq/Build/Products/Debug-iphonesimulator/react-native-cameraroll'
ld: warning: directory not found for option '-L/Users/myuser/Library/Developer/Xcode/DerivedData/mobile-eeuzlarvkxgtncfhtkicciemdrtq/Build/Products/Debug-iphonesimulator/react-native-image-picker'
ld: warning: directory not found for option '-L/Users/myuser/Library/Developer/Xcode/DerivedData/mobile-eeuzlarvkxgtncfhtkicciemdrtq/Build/Products/Debug-iphonesimulator/react-native-safe-area-context'
ld: warning: directory not found for option '-L/Users/myuser/Library/Developer/Xcode/DerivedData/mobile-eeuzlarvkxgtncfhtkicciemdrtq/Build/Products/Debug-iphonesimulator/react-native-webview'
ld: warning: directory not found for option '-L/Users/myuser/Library/Developer/Xcode/DerivedData/mobile-eeuzlarvkxgtncfhtkicciemdrtq/Build/Products/Debug-iphonesimulator/rn-fetch-blob'
ld: library not found for -lDoubleConversion
clang: error: linker command failed with exit code 1 (use -v to see invocation)
From what I already read, I should add these libraries to the Search Paths > Library Search Paths in XCode but these libraries already are set in this configuration. ( screenshot below )
And the "PODS_CONFIGURATION_BUILD" is set as below :
I tried removing those paths and launch the build again, but the project couldn't build. So I reverted the changes.
I'm not sure about what I need to do as I'm new to XCode and this is an existing project.

React Native can not build and run by Xcode10

New react native project can react-native run-ios to run on device but can not run by xcode 10.
It gets the error when I build the project.
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/DoubleConversion'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/Folly'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/React-Core'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/React-DevSupport'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/React-RCTActionSheet'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/React-RCTAnimation'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/React-RCTBlob'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/React-RCTImage'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/React-RCTLinking'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/React-RCTNetwork'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/React-RCTSettings'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/React-RCTText'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/React-RCTVibration'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/React-RCTWebSocket'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/React-cxxreact'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/React-fishhook'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/React-jsi'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/React-jsiexecutor'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/React-jsinspector'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/glog'
ld: warning: directory not found for option '-L/Users/viatick/Library/Developer/Xcode/DerivedData/BMSHelper-ehajbfildwyjzqgtszurmsvheorm/Build/Products/Debug-iphoneos/yoga'
ld: library not found for -lDoubleConversion
I need to add some native modules in ios but now I get the problem with building the project in xcode10.
As I know, the ios project uses cocoapods then I try deleting the podfile.lock and run pod install again but it did not work.
I also tried delete node_modules folder and run yarn install again but still get problem.
I expect to build it and can run from xcode. Now it only can run by command react-native run-ios
Make sure you have opened "projName.workspace" ,then select your project goto "General" tab -> "prjtNameTests" then select host application "yourproject"

linker command failed with exit code 1

I am getting some errors and warnings when I build my IOS project
ld: warning: directory not found for option '-L/Users/parikshitpatel/Documents/IphoneDevelopment/FH/funkiorangemobile_iphonehealthadviceapp/Social'
ld: warning: directory not found for option '-LMedia/Twitter/Twitter'
ld: warning: directory not found for option '-LLibrary/Libraries'
ld: warning: directory not found for option '-L/Users/parikshitpatel/Documents/IphoneDevelopment/FH/funkiorangemobile_iphonehealthadviceapp0/Social'
ld: warning: directory not found for option '-L&'
ld: warning: directory not found for option '-LHeaders'
ld: warning: directory not found for option '-LMedia/Twitter'
ld: library not found for -lOAuth
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am not getting how to fix this error can some one help?
It looks like your Library path is incorrect.
Try to go to: Targets - Build Phases - Link Binary with Libraries
and add your Twitter Library/Framework
In your Folder path there are blank spaces between them. for example:
/Users/parikshitpatel/Documents/IphoneDevelopment/FH/funkiorangemobile_iphonehealthadviceapp/Social Media
In your Library dependencies write Social\ Media instead.
Do the same for other library.
For me I was opening the .xcodeproj Xcode project instead of the .xcworkspace workspace. I'm pretty new to iOS development, but this feels similar to opening the wrong gradle file in Android Studio

How to fixed framework errors?

I am using lot of frameworks and pod files in my project like as Parse framework, Bolts Framework etc. and I have fixed all errors like parse.h file not found and any others but now I have some error also like ....
ld: warning: directory not found for option '-L/Crain/iOS Apps/crain_comm_ios/crainmagazine/common/Brightcove-3.0.1/Libraries'
ld: warning: directory not found for option '-L/Crain/iOS Apps/crain_comm_ios/frameworks/Flurry'
ld: warning: directory not found for option '-L/Crain/iOS Apps/crain_comm_ios'
ld: warning: directory not found for option '-F/Crain/iOS'
ld: warning: directory not found for option '-FApps/crain_comm_ios'
ld: warning: directory not found for option '-FApps/crain_comm_ios/frameworks'
ld: warning: directory not found for option '-FApps/crain_comm_ios/frameworks/Parse.framework'
ld: warning: directory not found for option '-F2'
ld: library not found for -lBCiOSSDK
clang: error: linker command failed with exit code 1 (use -v to see invocation)
so can you please tell me answer or any solution.
Some times the device that u compile the project is using 64bit. In debug mode the pod projects in some architecture aren't even complie, U should do this:
See my selections (set it to NO in both modes debug and release) :
warning: directory not found for option - you should fix that problems, linker could not find libraries, I think, you add add headers, but not libraries.

Xcode 5- clang: error: linker command failed with exit code 1 (use -v to see invocation)

I'm using xcode 5 for my mobile app project. I got this error when I try build the project.
ld: warning: directory not found for option '-L\\\\\\\"/Applications/MAMP/htdocs/rmbp/apps/rmbp/iphone/native/WorklightSDK\\\\\\\"'
ld: warning: directory not found for option '-L/Applications/MAMP/htdocs/rmbp/apps/rmbp/iphone/native/WikitudeSDK'
ld: warning: directory not found for option '-F"/Applications/MAMP/htdocs/rmbp/apps/rmbp/iphone/native/Frameworks"'
ld: warning: directory not found for option '-F/Applications/MAMP/htdocs/rmbp/apps/rmbp/iphone/native/WikitudeSDK'
ld: framework not found sqlcipher
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ld: warning: directory not found for option '-L\\\\\\\"/Applications/MAMP/htdocs/rmbp/apps/rmbp/iphone/native/WorklightSDK\\\\\\\"'
ld: warning: directory not found for option '-L/Applications/MAMP/htdocs/rmbp/apps/rmbp/iphone/native/WikitudeSDK'
ld: warning: directory not found for option '-F"/Applications/MAMP/htdocs/rmbp/apps/rmbp/iphone/native/Frameworks"'
ld: warning: directory not found for option '-F/Applications/MAMP/htdocs/rmbp/apps/rmbp/iphone/native/WikitudeSDK'
ld: framework not found sqlcipher
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Why?
This error is because of some missing libraries in your project.
Check in your Build Phases -> Link Binary With Libraries. Any of your framework may had been removed from there.
Add it and Clean and Build your project. It should work fine.
Hope it helps you.
There is another probability that you are using Cocoa Pods to install the library but not open the workspace (*.xcworkspace) file of the project after pod install was successfully executed.

Resources