Warnings for GoogleMaps Framework in test target - xcode

After upgrading to Xcode 7.1 and fixing some issues with my cocoapods (I had pods in both the main target and the test target), I now have the following warnings.
ld: warning: directory not found for option
'-F/Users/john/development/OurLatitude/OurLatitude/Pods/GoogleMaps/Frameworks”'
ld: warning: Auto-Linking supplied
'/Users/john/development/OurLatitude/OurLatitude/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/GoogleMaps',
framework linker option at
/Users/john/development/OurLatitude/OurLatitude/Pods/GoogleMaps/Frameworks/GoogleMaps.framework/GoogleMaps
is not a dylib
Originally I did only had the Auto-Linking
warning, but some how managed to pick up the directory not found warning
I have the following in my test target search path:
"$(PODS_ROOT)/GoogleMaps/Frameworks" $(inherited) $(PROJECT_DIR)/Pods/GoogleMaps/Frameworks”
If I delete this entry I get the following error:
ld: framework not found GoogleMaps for architecture i386
at one point I think this was complaining about armv7, I forget what I changed that affected that.
Including the path in my test target searchpath, is just a warning and everything , including the test seem to run, but I would like to get rid of the warning if possible.
Any ideas?
I tried what was suggested in this answer, but it only seemed to make matters worse.

Related

How to fix a library not found error on Xcode

I use Xcode 11.3.1.
I receive an Xcode project from a coworker that is using Xcode 12.4.
I open the project and try to build it.
I receive the following error:
Library not found for ISO8601DateFormatterValueTransformer
Inside Xcode there are some details:
ld: warning: directory not found for option '-L/Users/catalina/Library/Developer/Xcode/DerivedData/CDA-chskvgcrkhxpgnghuarozjoeymbq/Build/Products/Debug-iphonesimulator/ISO8601DateFormatterValueTransformer'
ld: warning: directory not found for option '-L/Users/catalina/Library/Developer/Xcode/DerivedData/CDA-chskvgcrkhxpgnghuarozjoeymbq/Build/Products/Debug-iphonesimulator/RKValueTransformers'
ld: warning: directory not found for option '-L/Users/catalina/Library/Developer/Xcode/DerivedData/CDA-chskvgcrkhxpgnghuarozjoeymbq/Build/Products/Debug-iphonesimulator/RestKit'
ld: warning: directory not found for option '-L/Users/catalina/Library/Developer/Xcode/DerivedData/CDA-chskvgcrkhxpgnghuarozjoeymbq/Build/Products/Debug-iphonesimulator/SOCKit'
ld: warning: directory not found for option '-L/Users/catalina/Library/Developer/Xcode/DerivedData/CDA-chskvgcrkhxpgnghuarozjoeymbq/Build/Products/Debug-iphonesimulator/TransitionKit'
ld: warning: directory not found for option '-L/Users/catalina/Library/Developer/Xcode/DerivedData/CDA-chskvgcrkhxpgnghuarozjoeymbq/Build/Products/Debug-iphonesimulator/ZBarSDK'
ld: library not found for -lISO8601DateFormatterValueTransformer
clang: error: linker command failed with exit code 1 (use -v to see invocation)
My coworker said to me to delete the Pods folder and run the pod install command. After running the command some libraries are installed on the project.
But when I try to build the project, it fails.
This problem could be related to my Xcode version? I mean, I was trying to compile a project using an old version of Xcode
Or
this is a problem related to not importing correctly the Library?
I find out what was causing the problem.
I open the xcproject file. The correct file to open the project is the xcworkspace file.
The problem is fixed now.

Linker command failed with exit code 1 (use -v to see invocation) with Swift 3

I am working on building a Swift library and am hosting it on GitHub.
All was going fine until I added BluetoothKit to the project. I then got an Apple Mach-O Linker Error:
ld: warning: directory not found for option '-F/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.0.sdk/Developer/Library/Frameworks'
ld: /Users/calebklevetertest/Library/Developer/Xcode/DerivedData/Napalm-dblvhbjdwovurocsvzrzaxzkjjyw/Build/Products/Debug-iphonesimulator/Napalm.framework/Napalm compiled with older version of Swift language (2.0) than previous files (3.0) for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
From reading the error it appears the issue somehow stems from the fact I am using Swift 3, but I can't figure out how to fix it.
I did convert BluetoothKit to Swift 3 when I added it.
There is one class that uses BluetoothKit and it is called NPFBluetooth.
A couple things to note are 1) Even though the class is public, the compiler gives an error of 'unresolved identifier', 2) The class does not show in the auto-complete and 3) All the other classes work fine.
I ran into the error migrating to swift3. As it turns out Xcode keeps copies of built frameworks and moving to swift3 is apparently not a cue to rebuild those (even after finding out it was built using swift2.... no let's throw a vague error instead...)
The solution is to delete the content of your 'derived data' folder.
Works for frameworks installed with Carthage and cocoapods.....
Go to your build settings and switch the target's settings to ENABLE_BITCODE = YES for now.
It's working for me ;)

CocoaPods linking "clang: error: no such file or directory: 'dynamic_lookup' and 'suppress'"

I'm getting a clang error when my project tries to link.
I can see the following flags in the Pods.debug.xcconfig and Pods.release.xcconfig
-undefined dynamic_lookup suppress
And then the error appears in issue navigator
clang: error: no such file or directory: 'dynamic_lookup'
clang: error: no such file or directory: 'suppress'
I've tried removing the following files incase it was some generated code that was causing the issues
Pods/
project.xcworkspace
pods.lockfile
and re-running pod install to re-generate the workspace and config files. The error is still appearing!
I ran into something similar today with a Cocoapod project after removing it from the podfile. for some reason my workspace still had reference to the framework (now removed) so i manually deleted the references from my Build Settings > Other Linker Flags.
I got this error afterwards and the issue was in the Other Linker Flags it had -framework and on the next line it had -framework again. When i manually deleted the framework i did not remove the corresponding -framework line above it so two -framework lines were in the adjacent rows and it couldn't find the next framework (imported from CocoaPods).
Hope this helps someone some day.
I fixed the issue. Go to Build Settings > Linking > Other Linker Flags > Debug and Release. Make sure all you have is $(inherited).
In my case, I accidentally edited the Other Linker Flags list of frameworks in Build settings, which consequently corrupted it. So I removed all the frameworks completely from the list and allowed Xcode to rebuild the list automatically and voila.

ld: warning: directory not found for option '-F-'

I know this has been probably asked a thousands of times, but I can't get a rid of this error upon building. I think they started to show up after I upgraded Xcode to the latest version available (6.3.2).
ld: warning: directory not found for option '-F-'
ld: library not found for -lPods-AcknowledgementsBundle
clang: error: linker command failed with exit code 1 (use -v to see invocation)
my Library Search Path (target) has:
$(inherited) non-recursive
$(PROJECT_DIR) non-recursive
I uninstalled and installed back the pod, clean and build.. nothing.
Does anybody have a good suggestion?
Thanks!

Unexplained Apple Mach-O liner warning error

Yesterday i integrated Google's Admobs fine into my Xcode 6.1 project. Everything worked. Today i open Xcode and i receive the following errors...
ld: warning: directory not found for option '-L/Users/Marco/Desktop/SpaceAlien copy 1/Space
ld: warning: directory not found for option '-LAlien'
ld: library not found for -lGoogleAdMobAds
It's 2 yellow warning errors and the RED error doesn't let me build project = GoogleAdMobAds
So I read in Project Navigator for libGoogleAdMobAds.a in target membership to unclick and then click back the check. That works and project builds. However, when i close project open it again, I get the same error. How do I make this error remove permanently? Also, for the ld: warning: directory not found errors I went to build setting then library search paths and i CAN'T delete anything, don't know what to do. Please HELP!
ld: warning: directory not found for option '-L/Users/Marco/Desktop/SpaceAlien copy 1/Space
Problem is because the path contains spaces. Try using quotes with the path: "Users/Marco/Desktop/SpaceAlien copy 1/Space"
or you can use escape "\" character to "fix" the path:
Users/Marco/Desktop/SpaceAlien\ copy\ 1/Space

Resources