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 10:04

GoogleToolboxForMac is a dependency of Firebase/Messaging. Details in the podspec. When doing "pod update", Cocoapods should set up your workspace to build and link GoogleToolboxForMac.

It sounds like something about your workspace is in a bad state. Does Product -> Clean help? What about deleting Derived Data and the ModuleCache (Xcode -> Preferences -> Locations -> Derived Data)?

It shouldn't be necessary, but you could also try explicitly adding pod 'GoogleToolboxForMac/Logger' to your Podfile.

查看更多
Juvenile、少年°
3楼-- · 2019-01-03 10:05

Open the your-project.xcworkspace in your project destination.

1)Open terminal -> 2) $cd /project_destination -> 3) $open your-project.xcworkspace

or just open the file in finder

查看更多
对你真心纯属浪费
4楼-- · 2019-01-03 10:07

-I search in harddrive for the GoogleToolboxForMac files, found in : /Users/Marco/Documents/iosapps/BomRetiro/Bom Retiro/Pods/Target Support Files

  • And then i copied the files to this folder : /Users/YourHomeFolder/Library/Developer/Xcode/DerivedData/Bom_Retiro-bsfjbazzzuwmuidqurdmjvdtnnsb/Build/Products

And then for me is resolved opening the project usinf .xcworkspace file.

查看更多
Emotional °昔
5楼-- · 2019-01-03 10:09

I had the same error. Once you install the pods, you'll see the following message.

[!] Please close any current Xcode sessions and use MyApp.xcworkspace for this project from now on.

I didn't notice this for the first time and was trying to build the project using the regular xcodeproj file. After I saw this message, I opened the right project and it worked fine.

Once you open this project you'll notice that you have two subprojects. One would be your project, and another would be the Pods project.

查看更多
一纸荒年 Trace。
6楼-- · 2019-01-03 10:15

In my case all integration are well-done and also did try so many time to remove and reinstall pod but did not get success.

Finally try with below step

Projetc->Manage Schemes -> Select check box "Pods-MyProjectName"

And get success.

查看更多
何必那么认真
7楼-- · 2019-01-03 10:15

I had the same issue when I tried to run it on my device. On the simulator it was working fine. I tried some of the above but it didn't work for me. I checked that I was working on .xcworkspace instead of .xcodeproj file, so I tried this one. Follow these steps to:

  1. Open Xcode project (cocoapods project) using .xc... file.
  2. Select Pods project in the project navigator (blue icon on left).
  3. Under Targets, ensure Pods-ProjectName (blue icon) is selected.
  4. Navigate to Build Settings and set the iOS Deployment Target on which iOS version you are going to run project.

Note:It is same as what you set in Project->Targets->Deployment info->Deployment Target.

Maybe someone get benefitted from this.

查看更多
登录 后发表回答