1

I followed this Google guide for integrating the SDK into my project. It was only a few steps and seemed pretty straight forward. I had to add a bridging-header because my app is in Swift and the SDK is in Obj-C but that wasn't hard. However, now I'm getting an error when I run the project:

ld: library not found for -lGoogleConversionTracking
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I don't even see a file with that name in the SDK though:

Google SDK

My "Other Linker Flags", empty or with "-ObjC" seems to make no difference:

enter image description here

When looking at the transcript I see a bunch of lines compiling each of my files then a line that says "Merge AppName_.swiftmodule and then:

Link /Users/Me/Library/Developer/Xcode/DerivedData/App_Name-gudgquqamuvxwzdhynbwvolfcope/Build/Products/Debug-iphonesimulator/App\ Name.app/App\ Name 

I've been trying to fix it with cleans, restarts, re-adding the SDK, playing with build phases, and I just can't get this error to go away! If I expand that error line it starts with this code:

Ld /Users/Me/Library/Developer/Xcode/DerivedData/App_Name-gudgquqamuvxwzdhynbwvolfcope/Build/Products/Debug-iphonesimulator/App\ Name.app/App\ Name normal x86_64
cd "/Users/Me/Documents/Folder/Folder/Folder"
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/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"

 //And it's really long but it ends with this:

dependency_info -Xlinker /Users/Me/Library/Developer/Xcode/DerivedData/App_Name-gudgquqamuvxwzdhynbwvolfcope/Build/Intermediates/App\ Name.build/Debug-iphonesimulator/App\ Name.build/Objects-normal/x86_64/App\ Name_dependency_info.dat -o /Users/Me/Library/Developer/Xcode/DerivedData/App_Name-gudgquqamuvxwzdhynbwvolfcope/Build/Products/Debug-iphonesimulator/App\ Name.app/App\ Name

Anyone have any ideas what's causing this?

Dave G
  • 10,974
  • 7
  • 49
  • 74

1 Answers1

1

It seems to be resolved! I read this post and it has a picture showing the library search path field. It occurred to me that the Google files don't look like a Framework but really a library. I noticed my library search path was empty in my Build Settings, so I added the file path to find the Google SDK and boom!

Community
  • 1
  • 1
Dave G
  • 10,974
  • 7
  • 49
  • 74