evollu / react-native-fcm

react native module for firebase cloud messaging and local notification
MIT License
1.73k stars 681 forks source link

library not found for -lGoogleToolboxForMac #864

Open hjJunior opened 6 years ago

hjJunior commented 6 years ago
  1. What version of RN and react-native-fcm are you running? react-native: 0.54.0 react-native-fcm: ^14.1.3
  2. What device are you using? (e.g iOS9 emulator, Android 6 device)? not applicable
  3. Is your app running in foreground, background or not running? not applicable

I'm getting error on build saying that library not found, this have done just after I use pod install

My PodFile

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

#pod 'Firebase/Core'
pod 'Firebase/Messaging'
#pod 'react-native-fcm', :path => '../node_modules/react-native-fcm'

target 'TabelionatoAmorim' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for TabelionatoAmorim

  target 'TabelionatoAmorim-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
  end

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

end

I've tried to uncomment the following lines and remove and installing again running pod install

#pod 'Firebase/Core'
#pod 'react-native-fcm', :path => '../node_modules/react-native-fcm'

Update I

I also tried to specify a platform in Podfile (platform :ios, '9.0'), and for each update on Podfile I'm running this command above instead of pod update

rm -rf Pods/ Podfile.lock && nano Podfile && pod install

Here following logs about the error on xcode

ld: warning: directory not found for option '-L/Users/webdev/Library/Developer/Xcode/DerivedData/TabelionatoAmorim-bvvrnpjdeuqofiautzexjiililoz/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac'
ld: warning: directory not found for option '-L/Users/webdev/Library/Developer/Xcode/DerivedData/TabelionatoAmorim-bvvrnpjdeuqofiautzexjiililoz/Build/Products/Debug-iphonesimulator/Protobuf'
ld: warning: directory not found for option '-L/Users/webdev/Library/Developer/Xcode/DerivedData/TabelionatoAmorim-bvvrnpjdeuqofiautzexjiililoz/Build/Products/Debug-iphonesimulator/nanopb'
ld: library not found for -lGoogleToolboxForMac
clang: error: linker command failed with exit code 1 (use -v to see invocation)
evollu commented 6 years ago

How do you integrate with react-native-fcm? manual linking (the result is you have a project in main project -> Library folder) react-native link (the result is you have a project under Pod project)

hjJunior commented 6 years ago

Using react-native link and pod install, and so after I've checked the files if has changed

EDIT

And I've so followed the tutor

evollu commented 6 years ago

can you provide an example project with the issue?

hjJunior commented 6 years ago

Yep, do want that I create a repository here in GitHub or maybe a private repository in Bitbucket, I mean what's the best way ?

evollu commented 6 years ago

public git repo

hjJunior commented 6 years ago

Okay, I'll init a new repo, with new code, and I back to here to put the link ;)

Edit 1

I created the repo, follow the link here, I'm pushing files to repo

Edit 2

Repository is online at this link

monkariarti commented 6 years ago

Hi! I have the same problem

hjJunior commented 6 years ago

I even tried to clone the example repository, but I'm getting the same error

hjJunior commented 6 years ago

Any update?

evollu commented 6 years ago

looking

evollu commented 6 years ago

tried the repo and build without issue. I did

  1. pod repo update
  2. pod install my project file changed but I can't open a PR against your branch. no permission
omarciovsena commented 6 years ago

Hi! I have the same problem