Apple Mach-O Linker Warning "Directory Not Found For Option..."

IosObjective CLinker ErrorsLinker Warning

Ios Problem Overview


I simply want to rid of the warnings that pop up like these:

ld: warning: directory not found for option '-F/Users/m/Desktop/FacebookSDK'
ld: warning: directory not found for option '-F/Users/m/Desktop/FacebookSDK/FBAudienceNetwork'
ld: warning: directory not found for option '-F/Users/gavin/Downloads/shaffiulla11-bat-b86d81d8adc6'
ld: warning: directory not found for option '-F/Users/gavin/Desktop/shaffiulla11-bat-b86d81d8adc6'
ld: warning: ignoring file /Users/Gavin/Desktop/FacebookSDK/Bolts.framework/Bolts, missing required architecture x86_64 in file /Users/Gavin/Desktop/FacebookSDK/Bolts.framework/Bolts (2 slices)

Obviously I am using different directories now because of multiple reformats of my drive because of Logic Board issues and just would like to know the most convenient way I can get rid of these errors. Thanks for the time and help.

Ios Solutions


Solution 1 - Ios

Go into your Projects settings and remove the excess Frameworks paths in there that you don't need.

Here's what it looks like when I open my project's build settings:

Open Build Settings

Click on "Framework Search Paths" and you should find the bogus paths listed in there, which you can delete.

Solution 2 - Ios

I sat on this issue for like more than a week before figuring out. For me the issue was a missing pod reference. And the error it was showing in xcode was weird. When I say weird they don't tell you what exactly is missing or the error. See the image below: And the issue was around the test target. I was exhausted trying out all the Framework search paths and Library Search Paths reset or removing them from the project as well. Nothing worked.

And finally I did a guess and added the Google analytics pod to both test target and main app target and bang..it started working. Crazy!!! The error here in the image if you see denotes something to do with architecture. I even played around with the architecture settings.

So it's all about a pod missing in the target that you are trying to compile. Hope this helps.

GGL analytics pod was not found

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionGavinView Question on Stackoverflow
Solution 1 - IosMichael DautermannView Answer on Stackoverflow
Solution 2 - IosArjun KalidasView Answer on Stackoverflow