Framework not found GoogleToolboxForMac

IosFirebaseSwift2CocoapodsGoogle Toolbox-for-Mac

Ios Problem Overview


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!

Ios Solutions


Solution 1 - Ios

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.

Solution 2 - Ios

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.

Solution 3 - Ios

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.

Solution 4 - Ios

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.

Solution 5 - Ios

its work's

  1. select your project in directories
  2. select General
  3. Add "GoogleToolboxForMac.framework" to the Linked "frameworks and Libraries"

Solution 6 - Ios

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

Solution 7 - Ios

Go to : target -> Build Settings -> Other Linker Flags -> remove framework "GoogleToolboxforMAC" and build the project.

Solution 8 - Ios

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.

Solution 9 - Ios

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).

Solution 10 - Ios

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

Solution 11 - Ios

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

Solution 12 - Ios

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.

Solution 13 - Ios

My issue was that I had a /bin/sh script that copied specific Pods which didn't exist. This was one of them. Removing the script resolved the build issue.

Solution 14 - Ios

-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.

Solution 15 - Ios

For those still having issues after all this. I am working on a cordova project and the issue suddenly appeared after upgrading to XCode 11.5.

Finally I was able to solve it by opening the pods.json file in the project root and remove the entry in "libraries" which belongs to "FirebaseMessaging". We were not using that and I dont know how it got there. Additionally I have changed the "Build Setting" -> "Build Active Architecture Only" to "No" everywhere.

Afterwards I opened the .xcworkspace file again and the build ran through.

Solution 16 - Ios

Worked solution is

  • Search GoogleToolboxForMa in xcodeproj
  • Remove all references from the build configurations

Solution 17 - Ios

Swift 5 Simple Answer

Shift+Alt+Cmd+K  //Clean the project and Run again! 
//if not work restart Xcode and again clean it 
//Its will work happy coding

Solution 18 - Ios

    Friends, you must be confused with the exact result, as i was. So, i feel to share the 
screenshot that might be helpful. We all had to be careful that we need to change the flag for property **"Build Active architecture Only"** for **pod target** to **NO** And build, it would not show the linking error.
    
    See the attached screenshot.
    Screen Shot 1, Screen Shot 2, Screen Shot 3
    [Select Pods][1]
    [Select Targets in the pod][2]
    [Change flag to No][3]


  [1]: https://i.stack.imgur.com/E7mjX.png
  [2]: https://i.stack.imgur.com/wCwET.png
  [3]: https://i.stack.imgur.com/KVGKM.png

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
QuestionbennysantosoView Question on Stackoverflow
Solution 1 - IosIzaaz YunusView Answer on Stackoverflow
Solution 2 - IosVinay KumarView Answer on Stackoverflow
Solution 3 - IosiPatelView Answer on Stackoverflow
Solution 4 - IosPaul BeusterienView Answer on Stackoverflow
Solution 5 - Ioskiran pmView Answer on Stackoverflow
Solution 6 - IosTomVView Answer on Stackoverflow
Solution 7 - IosDeblina DasView Answer on Stackoverflow
Solution 8 - IosSimple MauryaView Answer on Stackoverflow
Solution 9 - IosLuiz DiasView Answer on Stackoverflow
Solution 10 - IosSatheeshView Answer on Stackoverflow
Solution 11 - IosRadek StašekView Answer on Stackoverflow
Solution 12 - IosHarsh KView Answer on Stackoverflow
Solution 13 - IosArminView Answer on Stackoverflow
Solution 14 - IosbosozokuView Answer on Stackoverflow
Solution 15 - IosSLiView Answer on Stackoverflow
Solution 16 - IosKrishna KiranaView Answer on Stackoverflow
Solution 17 - IosShakeel AhmedView Answer on Stackoverflow
Solution 18 - IosRavi KantView Answer on Stackoverflow