0

Good morning all,

I come to you for a problem during the compilation of my application for IOS, It is the first time that I use Xcode.

During compilation I encounter the following problem: ld: framework not found FBLPromises clang: error: linker command failed with exit code 1 (use -v to see invocation)

I followed the instructions from firebase to integrate it into my application. I notably installed COCOAPOD and created the Podfile file with the following instructions:

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
# Add the Firebase pod for Google Analytics
pod 'Firebase/Analytics'

# Add the pods for any other Firebase products you want to use in your app
# For example, to use Firebase Authentication and Cloud Firestore
pod 'Firebase/Auth'
pod 'Firebase/Firestore'
target 'iOS Push' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!

# Pods for iOS Push

end

No matter how much I search the internet for the same problem, I can't help but solve this problem. I already tried to reintegrate pot and redo Install podium and lots of other manipulation but still this problem.

thank you in advance for your help.

2 Answers2

0

Check if you followed all this steps, that are necessary to use the Firebase framework in your project:

  1. Install Cocoapds to your Mac
  2. Create your Podfile in your project folder (with pod init)
  3. Add the Firebase pods you want to use to your Podfile
  4. Create a iOS project in Firebase console (https://console.firebase.google.com/u/0/) and link it to your app, using your bundle identifier
  5. Download the GoogleService-Info.plist provided from firebase console when creating the link and add it to your Xcode project
  6. Install the pod in your project folder using pod install

If you did everything correctly, you should see a .xcworkspace in your project folder, which you should use from now on (instead of the normal .xcodeproj).

Maria
  • 134
  • 6
  • I now have this error message: ld: library not found for -lBoringSSL-GRPC clang: error: linker command failed with exit code 1 (use -v to see invocation) – Valentin FRANCOIS Apr 03 '20 at 12:24
0

You pod file should be setup like this.

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'iOS Push' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!

# Pods for iOS Push
pod 'Firebase/Analytics'
pod 'Firebase/Auth'
pod 'Firebase/Firestore'

end

You added your pods outside of 'iOS Push' target. Also as @Maria Fernanda Azolin mentioned, use .xcworkspace after pod installation

Samin
  • 275
  • 5
  • 13
  • I still get the same error message that appears. I did not specify that I develop this application under windev mobile. – Valentin FRANCOIS Apr 03 '20 at 10:06
  • I now have this error message: ld: library not found for -lBoringSSL-GRPC clang: error: linker command failed with exit code 1 (use -v to see invocation) – – Valentin FRANCOIS Apr 03 '20 at 16:51
  • A solution to give? I tried to reinstall everything and I have the same error as at the beginning, I do not master XCode and I may search the internet I do not know how to solve this problem that it can not find the library. – Valentin FRANCOIS Apr 06 '20 at 08:41
  • Does blank project with firebase setup be ok? I can create blank project with firebase pods building right on git. You can compare them or if it does not build than something else is issue. – Samin Apr 06 '20 at 10:02
  • Also can you provide me the instruction link you followed? – Samin Apr 06 '20 at 10:09
  • I followed this documentation but applying what I need – Valentin FRANCOIS Apr 06 '20 at 16:38
  • Here is the documentation link: https://firebase.google.com/docs/ios/setup – Valentin FRANCOIS Apr 06 '20 at 16:39
  • I don't mind trying to create a blank project with Firebase and the following in the Podfile: `# add the Firebase pod for Google Analytics 'Firebase / Analytics' pod # add pods for any other desired Firebase products # https://firebase.google.com/docs/ios/setup#available-pods` – Valentin FRANCOIS Apr 06 '20 at 16:41
  • I tried the steps. It built as expected. Also I added 'pod 'Firebase/Messaging'' for push notification. Did you open .xcodeproj file after pod install? You should always open .xcworkspace (white icon file) after pod install. I hope it helps. – Samin Apr 07 '20 at 05:07
  • Ok, I still can't do it. You can send me your project by email so that I compare with mine to find out what's wrong? I thank you in advance. – Valentin FRANCOIS Apr 07 '20 at 14:10
  • I just realized that I had not integrated the initialization code in the project. This code given by Firebase is obviously not compatible with xcode. `@import UIKit; @import Firebase; @implementation WDAppDelegate - (BOOL) application: (UIApplication *) application     didFinishLaunchingWithOptions: (NSDictionary *) launchOptions {   [FIRApp configure];   return YES; }` XCODE does not recognize this code when I integrate it in WDAppDelegate is this the source of my problem maybe? – Valentin FRANCOIS Apr 07 '20 at 14:17
  • https://github.com/saminadhikari/iOS-push-firebase-test pod install first. I am using Swift. Looks like you're using objective C but the setup is similar anyway – Samin Apr 08 '20 at 06:42
  • Thank you very much for your project, indeed it works very well. I tried on mine with the same Podfile, nothing to do it can not find Firebase. I noticed on my project that it appears in the terminal of the information which does not appear when I made pod install with your project, the problem comes from it? – Valentin FRANCOIS Apr 08 '20 at 14:55
  • [!] The `CRE Pays de la Loire [Debug]` target overrides the `FRAMEWORK_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-CRE Pays de la Loire/Pods-CRE Pays de la Loire.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the `$(inherited)` flag, or - Remove the build settings from the target. – Valentin FRANCOIS Apr 08 '20 at 14:55
  • [!] The `CRE Pays de la Loire [Debug]` target overrides the `HEADER_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-CRE Pays de la Loire/Pods-CRE Pays de la Loire.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the `$(inherited)` flag, or - Remove the build settings from the target. – Valentin FRANCOIS Apr 08 '20 at 14:56
  • [!] The `CRE Pays de la Loire [Release]` target overrides the `FRAMEWORK_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-CRE Pays de la Loire/Pods-CRE Pays de la Loire.release.xcconfig'. This can lead to problems with the CocoaPods installation - Use the `$(inherited)` flag, or - Remove the build settings from the target. – Valentin FRANCOIS Apr 08 '20 at 14:56
  • [!] The `CRE Pays de la Loire [Release]` target overrides the `HEADER_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-CRE Pays de la Loire/Pods-CRE Pays de la Loire.release.xcconfig'. This can lead to problems with the CocoaPods installation - Use the `$(inherited)` flag, or - Remove the build settings from the target. – Valentin FRANCOIS Apr 08 '20 at 14:56
  • I think this is some build setting issue on xcode. Maybe https://developpaper.com/cocoapod-target-overrides-the-other_ldflags-the-solution-of/ or https://stackoverflow.com/questions/18376416/the-target-overrides-the-other-ldflags-build-setting-defined-in-pods-pods can help. But incase this does not help. Starting new project and adding storyboards/files from old project can be time saver. Messed up build settings can be hard to fix sometimes :) – Samin Apr 09 '20 at 08:43
  • Thank you very much for the link. The problem comes from that for framwork not found. I added an ObjeC file in the project with the initialization code of Firebase, the app builds correctly. Firebase recognizes that the application is installed and communicated, but I don't receive any notification even using my project and replacing the google.plist file. What can this come from? – Valentin FRANCOIS Apr 10 '20 at 14:57
  • Try using these steps https://mobikul.com/send-push-notification-via-firebase-ios-postman/ . – Samin Apr 11 '20 at 09:34
  • I tried with an old script that I have for Firebase and Android, I put the token that I receive from my application but obviously it does not work. Is there a notification receipt code to put in addition somewhere? – Valentin FRANCOIS Apr 12 '20 at 10:27