I have an iOS project with Google AdMob SDK installed using cocoa pods. When I started the project, the name of the project is called MAPPER. Then I renamed the project to GLITTER in Xcode. Xcode changed the name in almost all places except for cocoa pods. I had to rename in manually as in
target 'Glitters' do
pod 'Google-Mobile-Ads-SDK', '~> 7.0'
end
target 'GlittersTests' do
end
I have to manually rename it. Then POD INSTALL worked fine. But my compile is failing with linker error as below
ld: library not found for -lPods-Mapper
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Full log message
Ld /Users/BharathMBA/Library/Developer/Xcode/DerivedData/Glitters-fakjqrbepxlfnzcvhrerurokbtzs/Build/Products/Debug-iphonesimulator/Glitters.app/Glitters normal x86_64
cd /Users/BharathMBA/iOS/Swift/Mapper
export IPHONEOS_DEPLOYMENT_TARGET=7.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk -L/Users/BharathMBA/Library/Developer/Xcode/DerivedData/Glitters-fakjqrbepxlfnzcvhrerurokbtzs/Build/Products/Debug-iphonesimulator -F/Users/BharathMBA/Library/Developer/Xcode/DerivedData/Glitters-fakjqrbepxlfnzcvhrerurokbtzs/Build/Products/Debug-iphonesimulator -F/Users/BharathMBA/iOS/Swift/Mapper/Pods/Google-Mobile-Ads-SDK/GoogleMobileAdsSdkiOS-7.0.0 -filelist /Users/BharathMBA/Library/Developer/Xcode/DerivedData/Glitters-fakjqrbepxlfnzcvhrerurokbtzs/Build/Intermediates/Glitters.build/Debug-iphonesimulator/Glitters.build/Objects-normal/x86_64/Glitters.LinkFileList -Xlinker -rpath -Xlinker #executable_path/Frameworks -Xlinker -objc_abi_version -Xlinker 2 -ObjC -lPods-Glitters-Google-Mobile-Ads-SDK -framework AVFoundation -framework AudioToolbox -framework CoreGraphics -framework CoreTelephony -framework EventKit -framework EventKitUI -framework GoogleMobileAds -framework MessageUI -framework StoreKit -framework SystemConfiguration -weak_framework AdSupport -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -Xlinker -force_load -Xlinker /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a -Xlinker -add_ast_path -Xlinker /Users/BharathMBA/Library/Developer/Xcode/DerivedData/Glitters-fakjqrbepxlfnzcvhrerurokbtzs/Build/Intermediates/Glitters.build/Debug-iphonesimulator/Glitters.build/Objects-normal/x86_64/Glitters.swiftmodule -mios-simulator-version-min=7.0 -lPods-Mapper -lPods-Glitters -Xlinker -dependency_info -Xlinker /Users/BharathMBA/Library/Developer/Xcode/DerivedData/Glitters-fakjqrbepxlfnzcvhrerurokbtzs/Build/Intermediates/Glitters.build/Debug-iphonesimulator/Glitters.build/Objects-normal/x86_64/Glitters_dependency_info.dat -o /Users/BharathMBA/Library/Developer/Xcode/DerivedData/Glitters-fakjqrbepxlfnzcvhrerurokbtzs/Build/Products/Debug-iphonesimulator/Glitters.app/Glitters
In the log I could see -Pods-Mapper is called for linking in line
-Xlinker -add_ast_path -Xlinker /Users/BharathMBA/Library/Developer/Xcode/DerivedData/Glitters-fakjqrbepxlfnzcvhrerurokbtzs/Build/Intermediates/Glitters.build/Debug-iphonesimulator/Glitters.build/Objects-normal/x86_64/Glitters.swiftmodule -mios-simulator-version-min=7.0 -lPods-Mapper -lPods-Glitters -Xlinker -dependency_info
I am not sure how to get rid of this issue.
Thanks
Go to the General tab of your target and scroll to section named Linked Frameworks and Libraries.
Here, you should see 2 references to your Pods' framework:
one with the name Pods_<previous-target-name>.framework
a second with the name Pods_<current-target-name>.framework
Delete the reference to pod Pods_<previous-target-name>.framework.
I had the same issue and found that some paths were not changed by xcode. I ended up doing the following:
Select your project file (top most entry in your xcode workspace)
Select the target you use to build your app
Switch to the build phases tab
Find the [CP] Embed Pods Frameworks and the [CP] Copy Pods Frameworks phase
Open them and you will see that they still have the old file path in there.
Change the file paths so they fit your new project name
However, this only gave me more errors. I selected the project itself this time and expanded the Configurations section. Here I saw that a lot of old references were used. Instead of manually changing them I decided that it was easier to deintegrate and install the pods again by using pod deintegrate and pod install which then solved the problem.
I guess the first steps are unnecessary when deintegrating but I think it's good to know that they exist.
Related
I recently updated XCode to V 11.1, and since updating, for some reason when I run my app in release mode, I'm thrown the following error:
ld: can't link with a main executable file
'/Users/me/Library/Developer/Xcode/DerivedData/myapp-btokobigvkxtgwgcjrapocxlexno/Build/Products/Release-iphoneos/myapp.app/myapp'
for architecture armv7 clang: error: linker command failed with exit
code 1 (use -v to see invocation)
I have absolutely no clue how to resolve this - and I can't run my app in release mode without it (and yes, I'm using a Distribution profile). Help would be much appreciated. I've browsed a few other answers but none seem to solve this issue.
When I navigate to that file path, 'myapp' is simply an icon with a circle and a slash through it (can't be a good sign). This same thing occurs even after I clean the build folder. When I try to rebuild in release mode, the build fails and throws me the above yet again.
See full error:
Ld
/Users/admin/Library/Developer/Xcode/DerivedData/myapp-btokobigvkxtgwgcjrapocxlexno/Build/Intermediates.noindex/myapp.build/Release-iphoneos/myappTests.build/Objects-normal/armv7/Binary/myappTests
normal armv7 (in target 'myappTests' from project 'myapp')
cd /Users/admin/Desktop/myapp
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-target armv7-apple-ios8.4 -bundle -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.1.sdk
-L/Users/admin/Library/Developer/Xcode/DerivedData/myapp-btokobigvkxtgwgcjrapocxlexno/Build/Products/Release-iphoneos
-F/Users/admin/Library/Developer/Xcode/DerivedData/myapp-btokobigvkxtgwgcjrapocxlexno/Build/Products/Release-iphoneos
-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.1.sdk/Developer/Library/Frameworks
-F/Users/admin/Desktop/myapp/Pods/FirebaseAnalytics/Frameworks -F/Users/admin/Desktop/myapp/Pods/GoogleAppMeasurement/Frameworks -F/Users/admin/Desktop/myapp/Pods/GoogleMaps/Base/Frameworks -F/Users/admin/Desktop/myapp/Pods/GoogleMaps/Maps/Frameworks -F/Users/admin/Desktop/myapp/Pods/GooglePlaces/Frameworks -L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib
-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks
-filelist /Users/admin/Library/Developer/Xcode/DerivedData/myapp-btokobigvkxtgwgcjrapocxlexno/Build/Intermediates.noindex/myapp.build/Release-iphoneos/myappTests.build/Objects-normal/armv7/myappTests.LinkFileList
-Xlinker -rpath -Xlinker #executable_path/Frameworks -Xlinker -rpath -Xlinker #loader_path/Frameworks -dead_strip -bundle_loader /Users/admin/Library/Developer/Xcode/DerivedData/myapp-btokobigvkxtgwgcjrapocxlexno/Build/Products/Release-iphoneos/myapp.app/myapp
-Xlinker -object_path_lto -Xlinker /Users/admin/Library/Developer/Xcode/DerivedData/myapp-btokobigvkxtgwgcjrapocxlexno/Build/Intermediates.noindex/myapp.build/Release-iphoneos/myappTests.build/Objects-normal/armv7/myappTests_lto.o
-fobjc-arc -fobjc-link-runtime -lc++ -licucore -lsqlite3 -lz -framework Accelerate -framework CFNetwork -framework CoreData -framework CoreGraphics -framework CoreImage -framework CoreLocation -framework CoreTelephony -framework CoreText -framework Foundation -framework GLKit -framework ImageIO -framework OpenGLES -framework QuartzCore -framework Security -framework StoreKit -framework
SystemConfiguration -framework UIKit -framework XCTest
-lPods-myappTests -Xlinker -dependency_info -Xlinker /Users/admin/Library/Developer/Xcode/DerivedData/myapp-btokobigvkxtgwgcjrapocxlexno/Build/Intermediates.noindex/myapp.build/Release-iphoneos/myappTests.build/Objects-normal/armv7/myappTests_dependency_info.dat
-o /Users/admin/Library/Developer/Xcode/DerivedData/myapp-btokobigvkxtgwgcjrapocxlexno/Build/Intermediates.noindex/myapp.build/Release-iphoneos/myappTests.build/Objects-normal/armv7/Binary/myappTests
ld: can't link with a main executable file
'/Users/admin/Library/Developer/Xcode/DerivedData/myapp-btokobigvkxtgwgcjrapocxlexno/Build/Products/Release-iphoneos/myapp.app/myapp'
for architecture armv7 clang: error: linker command failed with exit
code 1 (use -v to see invocation)
Finally found the fix in my case. Hopefully this answer is helpful to others.
Product > Scheme > Edit Scheme, and then tap the 'Build' category on
the left hand side.
Under your appTests targets, uncheck "Run".
Problem solved.
Could you say where do you find the slashed icon - it may be a sign Xcode tries to look at a wrong path. You may easily verify it with right-click on the project from Project Navigator, show in Finder.
I recommend Changing deployment target to 8.4.
A solution might be going to Product > Scheme > Edit Scheme, choose Build and uncheck 'Run'
I was getting the ld: can't link with a main executable file error because the Build Settings between my app target and the test app were different, mainly the iOS Deployment Target.
Ensuring that these two were the same allowed the build to succeed.
Hey guys Im making an app of react native after installing react native payola wrapper im facing this issues
Module RNPaypalWrapper requires main queue setup since it overrides constantsToExport but doesn't implement requiresMainQueueSetup. In a future release React Native will default to initializing all native modules on a background thread unless explicitly opted-out of.
Apple-Mach-O linker Error
Ld /Users/mac/Library/Developer/Xcode/DerivedData/Shopping-bffzrhylanxuelcazupfwylbgyoq/Build/Products/Debug-iphonesimulator/Shopping.app/Shopping
normal x86_64
cd /Users/mac/Desktop/Tanveer/Tabtest/Shopping/ios
export IPHONEOS_DEPLOYMENT_TARGET=9.0
export PATH="/Applications/Xcode_9.4.1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode_9.4.1.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode_9.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-arch x86_64 -isysroot /Applications/Xcode_9.4.1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk
-L/Users/mac/Library/Developer/Xcode/DerivedData/Shopping-bffzrhylanxuelcazupfwylbgyoq/Build/Products/Debug-iphonesimulator
-L/Users/mac/Desktop/Tanveer/Tabtest/Shopping/ios/Pods/CardIO/CardIO -L/Users/mac/Desktop/Tanveer/Tabtest/Shopping/ios/Pods/PayPal-iOS-SDK/PayPalMobile
-F/Users/mac/Library/Developer/Xcode/DerivedData/Shopping-bffzrhylanxuelcazupfwylbgyoq/Build/Products/Debug-iphonesimulator
-filelist /Users/mac/Library/Developer/Xcode/DerivedData/Shopping-bffzrhylanxuelcazupfwylbgyoq/Build/Intermediates.noindex/Shopping.build/Debug-iphonesimulator/Shopping.build/Objects-normal/x86_64/Shopping.LinkFileList
-Xlinker -rpath -Xlinker #executable_path/Frameworks -mios-simulator-version-min=9.0 -Xlinker -object_path_lto -Xlinker /Users/mac/Library/Developer/Xcode/DerivedData/Shopping-bffzrhylanxuelcazupfwylbgyoq/Build/Intermediates.noindex/Shopping.build/Debug-iphonesimulator/Shopping.build/Objects-normal/x86_64/Shopping_lto.o
-Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -ObjC -lCardIO -lPayPalMobile -lc++ -lopencv_core -lopencv_imgproc -framework AVFoundation -framework Accelerate -framework AudioToolbox -framework CoreLocation -framework
CoreMedia -framework CoreVideo -framework MessageUI -framework
MobileCoreServices -framework OpenGLES -framework QuartzCore
-framework Security -framework SystemConfiguration -framework UIKit -ObjC -lc++ -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/mac/Library/Developer/Xcode/DerivedData/Shopping-bffzrhylanxuelcazupfwylbgyoq/Build/Intermediates.noindex/Shopping.build/Debug-iphonesimulator/Shopping.build/Shopping.app-Simulated.xcent
/Users/mac/Library/Developer/Xcode/DerivedData/Shopping-bffzrhylanxuelcazupfwylbgyoq/Build/Products/Debug-iphonesimulator/libRCTBlob.a
/Users/mac/Library/Developer/Xcode/DerivedData/Shopping-bffzrhylanxuelcazupfwylbgyoq/Build/Products/Debug-iphonesimulator/libRCTAnimation.a
/Users/mac/Library/Developer/Xcode/DerivedData/Shopping-bffzrhylanxuelcazupfwylbgyoq/Build/Products/Debug-iphonesimulator/libReact.a
/Users/mac/Library/Developer/Xcode/DerivedData/Shopping-bffzrhylanxuelcazupfwylbgyoq/Build/Products/Debug-iphonesimulator/libRCTAnimation.a
/Users/mac/Library/Developer/Xcode/DerivedData/Shopping-bffzrhylanxuelcazupfwylbgyoq/Build/Products/Debug-iphonesimulator/libRCTActionSheet.a
/Users/mac/Library/Developer/Xcode/DerivedData/Shopping-bffzrhylanxuelcazupfwylbgyoq/Build/Products/Debug-iphonesimulator/libRCTGeolocation.a
/Users/mac/Library/Developer/Xcode/DerivedData/Shopping-bffzrhylanxuelcazupfwylbgyoq/Build/Products/Debug-iphonesimulator/libRCTImage.a
/Users/mac/Library/Developer/Xcode/DerivedData/Shopping-bffzrhylanxuelcazupfwylbgyoq/Build/Products/Debug-iphonesimulator/libRCTLinking.a
/Users/mac/Library/Developer/Xcode/DerivedData/Shopping-bffzrhylanxuelcazupfwylbgyoq/Build/Products/Debug-iphonesimulator/libRCTNetwork.a
/Users/mac/Library/Developer/Xcode/DerivedData/Shopping-bffzrhylanxuelcazupfwylbgyoq/Build/Products/Debug-iphonesimulator/libRCTSettings.a
/Users/mac/Library/Developer/Xcode/DerivedData/Shopping-bffzrhylanxuelcazupfwylbgyoq/Build/Products/Debug-iphonesimulator/libRCTText.a
/Users/mac/Library/Developer/Xcode/DerivedData/Shopping-bffzrhylanxuelcazupfwylbgyoq/Build/Products/Debug-iphonesimulator/libRCTVibration.a
/Users/mac/Library/Developer/Xcode/DerivedData/Shopping-bffzrhylanxuelcazupfwylbgyoq/Build/Products/Debug-iphonesimulator/libRCTWebSocket.a
-lRNImagePicker -lRNPaypalWrapper -lPods-Shopping -Xlinker -dependency_info -Xlinker /Users/mac/Library/Developer/Xcode/DerivedData/Shopping-bffzrhylanxuelcazupfwylbgyoq/Build/Intermediates.noindex/Shopping.build/Debug-iphonesimulator/Shopping.build/Objects-normal/x86_64/Shopping_dependency_info.dat
-o /Users/mac/Library/Developer/Xcode/DerivedData/Shopping-bffzrhylanxuelcazupfwylbgyoq/Build/Products/Debug-iphonesimulator/Shopping.app/Shopping
ld: library not found for -lPods-Shopping
clang: error: linker command failed with exit code 1 (use -v to see invocation)
how can I resolve these errors......
these are the installation instruction for the package do every step carefully.
npm install --save react-native-paypal-wrapper or yarn add
react-native-paypal-wrapper
react-native link react-native-paypal-wrapper
clone this repo ( You do not need all the components in this repo
you download selectives )
Add the PayPalMobile directory (containing several .h files and
libPayPalMobile.a) to your Xcode project. We recommend checking
"Copy items..." and selecting "Create groups...".
In your project's Build Settings (in the TARGETS section, not the
PROJECTS section):
add -lc++ -ObjC to Other Linker Flags
enable Enable Modules (C and Objective-C)
enable Link Frameworks Automatically
In your project's Build Phases, link your project with these
libraries. Weak linking for iOS versions back to 6.0 is supported.
Accelerate.framework
AudioToolbox.framework
AVFoundation.framework
CoreLocation.framework
CoreMedia.framework
MessageUI.framework
MobileCoreServices.framework
SystemConfiguration.framework
SafariServices.framework
Add the open source license acknowledgments from acknowledgments.md
to your app's acknowledgments.
In your app's Info.plist, add the following URL schemes to
LSApplicationQueriesSchemes:
com.paypal.ppclient.touch.v1
com.paypal.ppclient.touch.v2
org-appextension-feature-password-management
Note: These installation instructions were collected from react-native-paypal-wrapper and also as it suggested the paypal ios sdk documentation they were perfect for our projects
I have been struggling to get schemes on iOS to work for my react native project reliably.
I followed the suggestions at https://medium.com/#ywongcode/building-multiple-versions-of-a-react-native-app-4361252ddde5, as well as tried using react-native-schemes-manager, which worked 1 time, but couldn't be duplicated onto another computer. I get all kinds of different problems, from libraries not found, to duplicate declarations and other problems. I have tried many many suggestions and none of them seem to work. I believe the problem all have to do with the build paths or search paths, but I am not expert enough in Xcode to figure out what is going wrong. I use quite a number of 3rd party libraries, including Code Push, Fabric, RNConfig, ImageCropPicker amongst others.
So finally I have decided to revert everything and start again from just the basic Debug and Release config, and have deleted all the additional configs and schemes. So, by doing this everything works (Run, and Archive).
Next, I just created a build config by duplicating the Release config, and called it Staging. Next I edited the working scheme release to use the Staging config for archiving, and ran the archive. This fails with the following message:
/opt/react/XXX/ios/XXX/AppDelegate.m:11:9: fatal error: 'CodePush/CodePush.h' file not found
#import <CodePush/CodePush.h>
Before I went through this exercise of deleting all the configs, if I used the previous Staging config in the same scheme, it this other error:
Showing Recent Messages
Ld Build/Intermediates/ArchiveIntermediates/XXX/IntermediateBuildFilesPath/XXX.build/Staging-iphoneos/XXX.build/Objects-normal/arm64/YYY.St normal arm64
cd /opt/react/XXX/ios
export IPHONEOS_DEPLOYMENT_TARGET=8.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk -L/opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos -L/opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Staging-iphoneos/QBImagePickerController -L/opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Staging-iphoneos/RSKImageCropper -L/opt/react/XXX/ios -F/opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos -F/opt/react/XXX/ios/Pods/Crashlytics/iOS -F/opt/react/XXX/ios/Pods/Fabric/iOS -filelist /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/IntermediateBuildFilesPath/XXX.build/Staging-iphoneos/XXX.build/Objects-normal/arm64/YYY.St.LinkFileList -Xlinker -rpath -Xlinker #executable_path/Frameworks -miphoneos-version-min=8.0 -Xlinker -object_path_lto -Xlinker /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/IntermediateBuildFilesPath/XXX.build/Staging-iphoneos/XXX.build/Objects-normal/arm64/YYY.St_lto.o -fembed-bitcode -Xlinker -bitcode_verify -Xlinker -bitcode_hide_symbols -Xlinker -bitcode_symbol_map -Xlinker /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos -Xlinker -final_output -Xlinker /Applications/YYY.St.app/YYY.St -fobjc-arc -fobjc-link-runtime -ObjC -lQBImagePickerController -lRSKImageCropper -lc++ -lz -framework Crashlytics -framework Fabric -framework Photos -framework QuartzCore -framework Security -framework SystemConfiguration -framework UIKit -weak_framework CoreFoundation -lz /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos/libimageCropPicker.a /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos/libRCTPdf.a /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos/libRNFetchBlob.a /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos/libRCTVideo.a /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos/libRNVectorIcons.a /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos/libRCTPushNotification.a /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos/libRNSound.a /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos/libReact.a /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos/libRCTAnimation.a /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos/libRCTActionSheet.a /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos/libRCTGeolocation.a /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos/libRCTImage.a /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos/libRCTLinking.a /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos/libRCTNetwork.a /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos/libRCTSettings.a /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos/libRCTText.a /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos/libRCTVibration.a /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/BuildProductsPath/Release-iphoneos/libRCTWebSocket.a -lRNAudio -lRCTCamera -lRNDeviceInfo -lCodePush -lLRDRCTSimpleToast -lRCTOrientation -lPods-XXX -lReactNativeConfig -lRNPhotoView -lReact -lyoga -lcxxreact -ljschelpers -lRNSensitiveInfo -Xlinker -dependency_info -Xlinker /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/IntermediateBuildFilesPath/XXX.build/Staging-iphoneos/XXX.build/Objects-normal/arm64/YYY.St_dependency_info.dat -o /opt/react/XXX/ios/Build/Intermediates/ArchiveIntermediates/XXX/IntermediateBuildFilesPath/XXX.build/Staging-iphoneos/XXX.build/Objects-normal/arm64/YYY.St
ld: library not found for -lPods-XXX
clang: error: linker command failed with exit code 1 (use -v to see invocation)
There are so many variations to the errors that I have had with this, so I can't figure out what I am doing wrong.
Have already set Header Search Paths, Framework Search Paths and Library Search Paths to include $(BUILD_DIR)/Release$(EFFECTIVE_PLATFORM_NAME)
I always clean project before trying another variation, but no luck...
Help!!!
I think question has an answer here:
Why does exact copy of Xcode Build Configuration fail?
I wonder if this is caused by a bug in React Native - this looks similar to what you are reporting:
https://github.com/facebook/react-native/issues/19929
If it is, maybe you can chip in and we'll get more attention towards this problem.
So I've added some Cocoapods to a project, and now when I build, I'm getting the following error:
Ld Build/Products/Debug-iphonesimulator/[AppName].app/[AppName] normal x86_64
cd /Users/[username]/Developer/[AppName]
export IPHONEOS_DEPLOYMENT_TARGET=8.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.4.sdk -L/Users/[username]/Developer/[AppName]/Build/Products/Debug-iphonesimulator -L/Users/[username]/Developer/[AppName] -F/Users/[username]/Developer/[AppName]/Build/Products/Debug-iphonesimulator -filelist /Users/[username]/Developer/[AppName]/Build/Intermediates/[AppName].build/Debug-iphonesimulator/[AppName].build/Objects-normal/x86_64/[AppName].LinkFileList -Xlinker -rpath -Xlinker #executable_path/Frameworks -Xlinker -objc_abi_version -Xlinker 2 -ObjC -lCMDQueryStringSerialization -lISO8601 -lReactiveCocoa -lSimpleAuth -lc++ -lpop -framework Foundation -framework UIKit -lPods-CMDQueryStringSerialization -lPods-ISO8601 -lPods-ReactiveCocoa -lPods-SimpleAuth -framework Foundation -framework UIKit -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=8.0 -framework MapKit -framework CoreLocation -lPods -Xlinker -dependency_info -Xlinker /Users/[username]/Developer/[AppName]/Build/Intermediates/[AppName].build/Debug-iphonesimulator/[AppName].build/Objects-normal/x86_64/[AppName]_dependency_info.dat -o /Users/[username]/Developer/[AppName]/Build/Products/Debug-iphonesimulator/[AppName].app/[AppName]
ld: library not found for -lPods-CMDQueryStringSerialization
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've uninstalled and reinstalled all the Cocoapods in the workspace several times to no avail. I've also seen so many other similar errors and done what those answers said to do, but I'm still getting the error.
Also, as a side note, earlier I was not getting this error but instead a '233 duplicate symbols for architecture x86_64' error pointing to some (read: a lot of) Objective-C files in some of the pods (i.e. ReactiveCocoa). It seems like these errors came after I added Facebook's Pop pod to my Podfile, but I'm not pointing any fingers because I'm pretty sure that didn't cause all these problems.
Please and thanks for any help!
EDIT:
Here is the Podfile:
pod 'SimpleAuth/LinkedInWeb'
pod 'SimpleAuth/GoogleWeb'
pod 'pop', '~> 1.0'
inhibit_all_warnings!
UPDATE & FIX:
Ok, so I've fixed the problem. Here's what I did:
Remove any pods that are causing the error.
Delete Derived Data sub-folders.
Remove any explicit '-lPods-[Pod]' linker flags in Build Settings -> Other Linker Flags.
Quit/Restart Xcode.
Add back pods and run pod install.
Open .xcworkspace and build. Hopefully it should be fixed!
I'm not sure how necessary all of these steps are, but that's what I did to fix it for me.
Add pod 'SimpleAuth' to your Podfile and run pod install, see if that helps.
I've been trying to get my app up and running. From what I could tell the app was missing Cocoapods as a dependency. So. I installed and added Cocoapods. But I'm still getting the same error for whatever reason. I'm an inexperienced developer trying to teach himself I must add.
Ld
/Users/bfarag/Library/Developer/Xcode/DerivedData/Umbrella-cspuzusfqmqgnwdqfhtiyivaqwke/Build/Products/Debug-iphonesimulator/Umbrella.app/Umbrella
normal i386
cd "/Users/bfarag/Desktop/The Nerdery/BRAVO.iOS.CodeChallenge"
export IPHONEOS_DEPLOYMENT_TARGET=7.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk
-L/Users/bfarag/Library/Developer/Xcode/DerivedData/Umbrella-cspuzusfqmqgnwdqfhtiyivaqwke/Build/Products/Debug-iphonesimulator
-F/Users/bfarag/Library/Developer/Xcode/DerivedData/Umbrella-cspuzusfqmqgnwdqfhtiyivaqwke/Build/Products/Debug-iphonesimulator
-filelist /Users/bfarag/Library/Developer/Xcode/DerivedData/Umbrella-cspuzusfqmqgnwdqfhtiyivaqwke/Build/Intermediates/Umbrella.build/Debug-iphonesimulator/Umbrella.build/Objects-normal/i386/Umbrella.LinkFileList
-Xlinker -objc_abi_version -Xlinker 2 -ObjC -lPods-Umbrella-AFNetworking -framework CoreGraphics -framework MobileCoreServices -framework Security -framework SystemConfiguration
-fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=7.0 -framework Accelerate -framework UIKit -framework Foundation -framework CoreGraphics -lPods -lPods-Umbrella -Xlinker -dependency_info -Xlinker /Users/bfarag/Library/Developer/Xcode/DerivedData/Umbrella-cspuzusfqmqgnwdqfhtiyivaqwke/Build/Intermediates/Umbrella.build/Debug-iphonesimulator/Umbrella.build/Objects-normal/i386/Umbrella_dependency_info.dat
-o /Users/bfarag/Library/Developer/Xcode/DerivedData/Umbrella-cspuzusfqmqgnwdqfhtiyivaqwke/Build/Products/Debug-iphonesimulator/Umbrella.app/Umbrella
ld: library not found for -lPods
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This error usually occurs either when you don't have the correct frameworks (might be missing one) or when you don't have the right thing in linker flags.
Go to the main page for the app (on the navigation thing on the left click on your apps name or the top section) -> Build Settings and under Linker Flags, make sure there is nothing in your Other Linker Flags. I had this same error when I had -ObjC in my other Linker Flags.
You might also want to try adding -lPods to your Other Linker Flags or adding the CoreGraphics framework if you don't already have it.
Good luck
Open workspace file, not project file. Cocoapods automatically creates a xcworkspace file on the same directory as xcproject file.
Xcode started displaying this message and I tried pretty much everything to solve it. What finally did the trick for me was deleting all content from ~/Library/Developer/Xcode/DerivedData/