firebase / firebase-ios-sdk

Firebase SDK for Apple App Development
https://firebase.google.com
Apache License 2.0
5.59k stars 1.46k forks source link

Problem installing the Firebase / Messaging pod #4143

Closed pixsolution closed 4 years ago

pixsolution commented 4 years ago

[REQUIRED] Step 2: Describe your environment

[REQUIRED] Step 3: Describe the problem

Hello! I am trying to implement push notifications for iOS through CocoaPods: https://cocoapods.org/pods/FirebaseMessaging I have a problem installing the Firebase / Messaging pod, this error causes me the following error:

Captura de Pantalla 2019-10-23 a la(s) 8 27 44 a  m Captura de Pantalla 2019-10-23 a la(s) 8 28 14 a  m Captura de Pantalla 2019-10-23 a la(s) 8 12 40 a  m

the installation by the Firebase / Messaging pod has the version 4.1.7

How can I solve this?

google-oss-bot commented 4 years ago

I found a few problems with this issue:

paulsUsername commented 4 years ago

I am having the same issue, this line in particular:

FIRInstanceIDCheckinPreferences *checkinPreferences =
      [FIRInstanceIDCheckinPreferences preferencesFromKeychainContents:checkinKeychainContent];
morganchen12 commented 4 years ago

@paulsUsername please file a separate issue.

@pixsolution can you share your entire Podfile and Podfile.lock, as well as the full build log and linker error?

pixsolution commented 4 years ago

Hi @morganchen12 Ok I attached that issue-files.zip

Thanks Regards

morganchen12 commented 4 years ago

Looks like FirebaseDatabase and FirebaseMessaging aren't being correctly linked into your app. In your Podfile, make sure Firebase/Database and Firebase/Messaging are being added to the correct build target.

If you're still unable to resolve the issue, please share your project.

pixsolution commented 4 years ago

Hi @morganchen12 Yes, but my target is SaludVitale and when I check the libraries appear there. It is not badly located if it did not appear, in addition to that the firebaseDatabase where it is locate was not giving problems because I was doing the chat queries without errors, it starts to fail with the new library

Please give me your gitlab user? to add you to the repo

morganchen12 commented 4 years ago

Unfortunately I don't have a gitlab account. You can try running pod deintegrate and pod install to reinstall the pods and see if it fixes your issue.

pixsolution commented 4 years ago

Hi @morganchen12 I have tried it but it still has the same error. I have uploaded the project on github and I have already added you.

I would greatly appreciate your help!

REPTILEHAUS commented 4 years ago

Also getting issues all day trying to istall Firebase/Messaging albeit via Ionic Capacitor

――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

Command

/usr/local/bin/pod install

Report

Stack

   CocoaPods : 1.8.4
        Ruby : ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin18]
    RubyGems : 2.5.2.3
        Host : Mac OS X 10.14.6 (18G95)
       Xcode : 11.0 (11A420a)
         Git : git version 2.21.0
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib
Repositories : master - git - https://github.com/CocoaPods/Specs.git @ d33540d9d0b81baee65fd570a69cad9e974212af
               trunk - CDN - https://cdn.cocoapods.org/

Plugins

cocoapods-deintegrate  : 1.0.4
cocoapods-dependencies : 1.3.0
cocoapods-plugins      : 1.0.0
cocoapods-search       : 1.0.0
cocoapods-stats        : 1.1.0
cocoapods-trunk        : 1.4.1
cocoapods-try          : 1.1.0

Podfile

platform :ios, '11.0'
use_frameworks!

# workaround to avoid Xcode 10 caching of Pods that requires
# Product -> Clean Build Folder after new Cordova plugins installed
# Requires CocoaPods 1.6 or newer
install! 'cocoapods', :disable_input_output_paths => true

def capacitor_pods
  # Automatic Capacitor Pod dependencies, do not delete
  pod 'Capacitor', :path => '../../node_modules/@capacitor/ios'
  pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios'
  pod 'CordovaPlugins', :path => '../capacitor-cordova-ios-plugins'
  pod 'CordovaPluginsStatic', :path => '../capacitor-cordova-ios-plugins'
  pod 'CordovaPluginsResources', :path => '../capacitor-cordova-ios-plugins'
  # Do not delete
end

target 'App' do
  capacitor_pods
  pod 'Firebase/Messaging' # Add this line
end

Error

JSON::ParserError - 743: unexpected token at ''
/Library/Ruby/Gems/2.3.0/gems/json-2.0.2/lib/json/common.rb:156:in `parse'
/Library/Ruby/Gems/2.3.0/gems/json-2.0.2/lib/json/common.rb:156:in `parse'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/specification/json.rb:61:in `from_json'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/specification.rb:715:in `from_string'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/specification.rb:689:in `from_file'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/source.rb:186:in `specification'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/resolver/lazy_specification.rb:37:in `specification'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/resolver/lazy_specification.rb:29:in `subspec_by_name'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/resolver.rb:362:in `block in specifications_for_dependency'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/resolver.rb:362:in `map'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/resolver.rb:362:in `specifications_for_dependency'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/resolver.rb:165:in `search_for'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/resolver.rb:274:in `block in sort_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/resolver.rb:267:in `each'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/resolver.rb:267:in `sort_by'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/resolver.rb:267:in `sort_dependencies'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:53:in `block in sort_dependencies'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:70:in `with_no_such_dependency_error_handling'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:52:in `sort_dependencies'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:288:in `initial_state'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:210:in `start_resolution'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:168:in `resolve'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in `resolve'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/resolver.rb:94:in `resolve'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:986:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:984:in `resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:410:in `analyze'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:234:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:233:in `resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:156:in `install!'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:22:in `load'
/usr/local/bin/pod:22:in `<main>'

――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

morganchen12 commented 4 years ago

@REPTILEHAUS this is a CocoaPods error that you should file at the CocoaPods repo.

REPTILEHAUS commented 4 years ago

Can you clarify whether the way to install this is pod Firebase/Messaging ? or pod FirebaseMessaging ?

morganchen12 commented 4 years ago

Both should work. Firebase/Messaging under the hood uses the FirebaseMessaging pod.

REPTILEHAUS commented 4 years ago

Strange, it only works for me using FirebaseMessaging

morganchen12 commented 4 years ago

@pixsolution I'm not able to open the GitHub invite.

Closing this issue since it's not a Firebase issue. If you're still having trouble, you can try asking on StackOverflow.

adammendoza commented 4 years ago

I'm having this same issue. Where you able to resolve it?