Framework not found GoogleToolboxForMac

2019-01-03 09:52发布

After I update my Firebase via "pod update", I got error like this :

ld: warning: directory not found for option '-F/Users/bennysantoso/Library/Developer/Xcode/DerivedData/FCM-atfcxuircoryufazlomgwfgmvaqm/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac'
ld: framework not found GoogleToolboxForMac
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Here my Podfile :

# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
pod 'Firebase/Core'
pod 'Firebase/Messaging'

target 'BB' do
  # Comment this line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for BB

  target 'BBTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'BBUITests' do
    inherit! :search_paths
    # Pods for testing
  end

end

Does anybody know about this error?

I seek out relationships GoogleToolboxForMac and Firebase, but I just get a little bit of information.

FYI, I use Swift 2.3 and Firebase 3.8.0.

I will be grateful for any help you can provide. Thanks!

15条回答
够拽才男人
2楼-- · 2019-01-03 09:52

Framework Not Found

When using Pods, we usually face this issue.

There are two main reasons for this

  1. When we open the .xcodeproj file instead of .xcworkspace as mentioned by izaaz-yunus in this Answer

  2. When Build Active Architecture Only is set to Yes in Build Settings

    This applies to the projects target and also to all the targets in the pod project

Main Project Screenshot Set Build Active Architecture Only to No

Pod Project Screenshot enter image description here

  1. Select Build Settings (of main project, pod project both)
  2. Select each Target one by one
  3. Set Build Active Architectures to No for each target

Finally clean and rebuild your project.

查看更多
劳资没心,怎么记你
3楼-- · 2019-01-03 09:52
its work's
1. select your project in directories
2. select General
3. Add "GoogleToolboxForMac.framework" to the Linked "frameworks and Libraries"
查看更多
看我几分像从前
4楼-- · 2019-01-03 09:53

If you're facing the same error, in your XCode, go to:

Your Project > your target > Scroll down to Linked Framework and Libraries and check if the Library entry is dimmed:

XCode Linked Framework and Libraries screenshot

If so, remove and add it again. In my case, I had duplicated entries and one of them was dimmed (when XCode can't find them on disk).

查看更多
ら.Afraid
5楼-- · 2019-01-03 10:00

Closed the project that I was trying to build after I did pod install then opened the .workspace and then everything builds perfectly.

查看更多
smile是对你的礼貌
6楼-- · 2019-01-03 10:00

Make sure your "Build Active Architecture settings" for both your project target and the pod are same. Setting NO in both these cases fixed my issue.

查看更多
Animai°情兽
7楼-- · 2019-01-03 10:03

This was fixed by adding $(inherited) in the Build Settings -> Search for LIBRARY_SEARCH_PATHS.

This is understandable, since when updating your pod file for the latest versions of libraries which your project depends on, the debug output tells you where you need to add all the $(inherited) flags: LIBRARY_SEARCH_PATHS OTHER_LD_FLAGS GCC_PREPROCESSOR_DEFINITIONS

查看更多
登录 后发表回答