0

I am currently using cocoapods in my Xcode Project to create a google sign in button for my app, and after going through the tutorial steps again, there are still errors showing up on build. Here are the error messages that are showing up on build. Would appreciate any help in fixing this problem.

Short Error Message(At the end of the console error message)

ld: file not found: /Users/tarunaarora/Desktop/GunnOracleApplication/Pods/GoogleUtilities/Libraries/libGTM_NSData+zlib_external.a
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Full Error Message(error message above the short error message):

Ld /Users/tarunaarora/Library/Developer/Xcode/DerivedData/GunnOracleApplication-epkumjpjfmvimzansuewkghneyzh/Build/Products/Debug-iphonesimulator/GunnOracleApplication.app/GunnOracleApplication normal x86_64
        cd /Users/tarunaarora/Desktop/GunnOracleApplication
        export IPHONEOS_DEPLOYMENT_TARGET=10.2
        export PATH="/Users/tarunaarora/Downloads/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Users/tarunaarora/Downloads/Xcode-beta.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
        /Users/tarunaarora/Downloads/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Users/tarunaarora/Downloads/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.2.sdk -L/Users/tarunaarora/Library/Developer/Xcode/DerivedData/GunnOracleApplication-epkumjpjfmvimzansuewkghneyzh/Build/Products/Debug-iphonesimulator -L/Users/tarunaarora/Desktop/GunnOracleApplication/Pods/Firebase -F/Users/tarunaarora/Library/Developer/Xcode/DerivedData/GunnOracleApplication-epkumjpjfmvimzansuewkghneyzh/Build/Products/Debug-iphonesimulator -F/Users/tarunaarora/Library/Developer/Xcode/DerivedData/GunnOracleApplication-epkumjpjfmvimzansuewkghneyzh/Build/Products/Debug-iphonesimulator/GTMOAuth2 -F/Users/tarunaarora/Library/Developer/Xcode/DerivedData/GunnOracleApplication-epkumjpjfmvimzansuewkghneyzh/Build/Products/Debug-iphonesimulator/GTMSessionFetcher -F/Users/tarunaarora/Library/Developer/Xcode/DerivedData/GunnOracleApplication-epkumjpjfmvimzansuewkghneyzh/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac -F/Users/tarunaarora/Desktop/GunnOracleApplication/Pods/FirebaseAnalytics/Frameworks/frameworks -F/Users/tarunaarora/Desktop/GunnOracleApplication/Pods/FirebaseCore/Frameworks/frameworks -F/Users/tarunaarora/Desktop/GunnOracleApplication/Pods/FirebaseInstanceID/Frameworks/frameworks -F/Users/tarunaarora/Desktop/GunnOracleApplication/Pods/Google/Frameworks -F/Users/tarunaarora/Desktop/GunnOracleApplication/Pods/GoogleAppUtilities/Frameworks/frameworks -F/Users/tarunaarora/Desktop/GunnOracleApplication/Pods/GoogleInterchangeUtilities/Frameworks/frameworks -F/Users/tarunaarora/Desktop/GunnOracleApplication/Pods/GoogleSignIn/Frameworks -F/Users/tarunaarora/Desktop/GunnOracleApplication/Pods/GoogleSymbolUtilities/Frameworks/frameworks -filelist /Users/tarunaarora/Library/Developer/Xcode/DerivedData/GunnOracleApplication-epkumjpjfmvimzansuewkghneyzh/Build/Intermediates/GunnOracleApplication.build/Debug-iphonesimulator/GunnOracleApplication.build/Objects-normal/x86_64/GunnOracleApplication.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=10.2 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/tarunaarora/Library/Developer/Xcode/DerivedData/GunnOracleApplication-epkumjpjfmvimzansuewkghneyzh/Build/Intermediates/GunnOracleApplication.build/Debug-iphonesimulator/GunnOracleApplication.build/Objects-normal/x86_64/GunnOracleApplication_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-link-runtime -L/Users/tarunaarora/Downloads/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -Xlinker -add_ast_path -Xlinker /Users/tarunaarora/Library/Developer/Xcode/DerivedData/GunnOracleApplication-epkumjpjfmvimzansuewkghneyzh/Build/Intermediates/GunnOracleApplication.build/Debug-iphonesimulator/GunnOracleApplication.build/Objects-normal/x86_64/GunnOracleApplication.swiftmodule -ObjC -lc++ -lsqlite3 -lstdc++ -lz -framework AddressBook -framework AssetsLibrary -framework CoreFoundation -framework CoreLocation -framework CoreMotion -framework CoreText -framework FirebaseAnalytics -framework FirebaseCore -framework FirebaseInstanceID -framework GGLCore -framework GGLSignIn -framework GTMOAuth2 -framework GTMSessionFetcher -framework GoogleAppUtilities -framework GoogleInterchangeUtilities -framework GoogleSignIn -framework GoogleSymbolUtilities -framework GoogleToolboxForMac -framework MessageUI -framework SafariServices -framework Security -framework StoreKit -framework SystemConfiguration -lGGLCore -lGGLSignIn -lGIPNSURL+FIFE_external -lGSDK_Overload_external -lGTMOAuth2_external_external -lGTMOAuth2_internal_external -lGTMSessionFetcher_core_external -lGTMSessionFetcher_full_external -lGTMStackTrace_external -lGTM_AddressBook_external -lGTM_DebugUtils_external -lGTM_GTMURLBuilder_external -lGTM_KVO_external -lGTM_NSData+zlib_external -lGTM_NSDictionary+URLArguments_external -lGTM_NSScannerJSON_external -lGTM_NSStringHTML_external -lGTM_NSStringXML_external -lGTM_Regex_external -lGTM_RoundedRectPath_external -lGTM_StringEncoding_external -lGTM_SystemVersion_external -lGTM_UIFont+LineHeight_external -lGTM_core_external -lGTM_iPhone_external -lOpenInChrome_external -lProtocolBuffers_external -lSignIn_external -lc++ -lsqlite3 -lstdc++ -lz -framework AddressBook -framework AssetsLibrary -framework CoreFoundation -framework CoreGraphics -framework CoreLocation -framework CoreMotion -framework CoreText -framework FirebaseAnalytics -framework FirebaseCore -framework FirebaseInstanceID -framework GoogleToolboxForMac -framework MessageUI -framework SafariServices -framework Security -framework StoreKit -framework SystemConfiguration -force_load /Users/tarunaarora/Desktop/GunnOracleApplication/Pods/GoogleUtilities/Libraries/libGTM_NSData+zlib_external.a -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/tarunaarora/Library/Developer/Xcode/DerivedData/GunnOracleApplication-epkumjpjfmvimzansuewkghneyzh/Build/Intermediates/GunnOracleApplication.build/Debug-iphonesimulator/GunnOracleApplication.build/GunnOracleApplication.app.xcent -framework Pods_GunnOracleApplication -Xlinker -dependency_info -Xlinker /Users/tarunaarora/Library/Developer/Xcode/DerivedData/GunnOracleApplication-epkumjpjfmvimzansuewkghneyzh/Build/Intermediates/GunnOracleApplication.build/Debug-iphonesimulator/GunnOracleApplication.build/Objects-normal/x86_64/GunnOracleApplication_dependency_info.dat -o /Users/tarunaarora/Library/Developer/Xcode/DerivedData/GunnOracleApplication-epkumjpjfmvimzansuewkghneyzh/Build/Products/Debug-iphonesimulator/GunnOracleApplication.app/GunnOracleApplication

This is what my Xcode Project Podfile document and Pods show up like:

Podfile and Pods image

I am also currently using Xcode 8.2 beta

EDIT:

At the end I have including my solution as to what I did to fix the problem since most of the other ones had not worked. Feel free to look at the solution.

Rajat Khare
  • 522
  • 8
  • 26

4 Answers4

2
  1. In your podfile, notice the difference between ` to '. enter image description here

  2. Once this is corrected, you can:

    a. Clean the project (product -> clean)

    b. Close XCode

    c. Run pod install

    d. Open yourProjectName.xcworkspace

Idan
  • 5,405
  • 7
  • 35
  • 52
  • so far I have tried your solution and the others listed below and none of these have worked for me. Do you have any other ideas? – Rajat Khare Nov 17 '16 at 07:10
0

You should change the scheme name. Delete old scheme and add new one!

You can autocreate schemes for your targets by going to Product > Scheme > Manage Schemes and pressing "Autocreate Schemes Now"

Reference : this so post

Community
  • 1
  • 1
Ketan Parmar
  • 27,092
  • 9
  • 50
  • 75
  • so far I have tried your solution as well as many other ones listed here. None of them have worked so far. Do you have any other ideas? – Rajat Khare Nov 17 '16 at 07:11
  • 1
    refer [this so post](http://stackoverflow.com/questions/15950653/file-not-found-linker-command-failed-with-exit-code-1-in-xcode-4-5-1) and [this so post](http://stackoverflow.com/questions/26665196/ld-file-not-found-linker-command-failed-with-exit-code-1-use-v-to-see-invoca) if it help! – Ketan Parmar Nov 17 '16 at 07:21
0

Open Build Settings Go to Framework Search Paths

enter image description hereThis inherited & Project Directory will cause automatically detection from Pods, and it will not more create problem for you. Try to do so it will automatically detect the pod. Might be this can help

B25Dec
  • 2,301
  • 5
  • 31
  • 54
  • so far I have tried your solution as well as many other ones listed here. None of them have worked so far. Do you have any other ideas? – Rajat Khare Nov 17 '16 at 07:11
  • Okay , Try this one. First Put # before each pod file and run the command pod install. It will un install the all pods. Then close the xcode , and re - run the command by removing the # sign. And open the xcode and build. – B25Dec Nov 17 '16 at 08:29
0

After reading the solutions above, none of them had worked for me, so I started experimenting myself to see if there were any other solutions to this problem.

Here are the steps that had led me to solving this problem:

  1. Recreating the Project. (I copied the files I needed and left out the ones I didn't need, so I only copied the Main.storyboard and Assets files)

  2. Installing the Pods correctly. (I went through the tutorial I was using again and made sure I was installing the same exact pods he was installing. The project builded without any errors.)

  3. Coding the ViewController.swift and Appdelegate files. (I watched the tutorial again, and carefully re-wrote the code that he was writing in the tutorial)

  4. Building the project and understanding the errors. (I built the project using the correct scheme settings and then I had went through any errors shown in the console, and corrected them.) All errors that I had encountered, had solutions in the tutorial.

  5. Now the project has been successfully created without any errors!

Rajat Khare
  • 522
  • 8
  • 26