CocoaPods not updating Firebase SDK to Version 4.0.0

前端 未结 6 1579
再見小時候
再見小時候 2020-12-15 05:51

I am trying to update my Swift project to Firebase\'s new SDK Version 4.0.0 using CocoaPods (as suggested by the documentation) but the updated SDK does not seem to be insta

6条回答
  •  隐瞒了意图╮
    2020-12-15 06:24

    Similarly to how Alamofire in my original podfile states the version I would like, doing so for firebase made it update to version 4.0.0 and the appropriate firebase functions work now.

    For example:

    Change (for each):

    pod 'Firebase/Auth'
    

    To:

    pod 'Firebase/Auth', '~> 4.0.0'
    

    A full example of my new podfile and the output after running pod install is as follows.

    Correct Podfile:

    # Uncomment this line to define a global platform for your project
    platform :ios, '9.2'
    # Uncomment this line if you're using Swift
    use_frameworks!
    
    
    target 'myProject' do
    
    pod 'Firebase', '~> 4.0.0'
    pod 'Firebase/Auth', '~> 4.0.0'
    pod 'Firebase/Core', '~> 4.0.0'
    pod 'Firebase/Storage', '~> 4.0.0'
    pod 'Firebase/Database', '~> 4.0.0'
    pod 'Firebase/Crash', '~> 4.0.0'
    pod 'Firebase/Messaging', '~> 4.0.0'
    
    
    pod 'Alamofire', '~> 4.4'
    
    end
    

    Output

    Analyzing dependencies
    Downloading dependencies
    Using Alamofire (4.4.0)
    Using Firebase (4.0.0)
    Using FirebaseAnalytics (4.0.0)
    Using FirebaseAuth (4.0.0)
    Using FirebaseCore (4.0.0)
    Using FirebaseCrash (2.0.0)
    Using FirebaseDatabase (4.0.0)
    Using FirebaseInstanceID (2.0.0)
    Using FirebaseMessaging (2.0.0)
    Using FirebaseStorage (2.0.0)
    Using GTMSessionFetcher (1.1.10)
    Using GoogleToolboxForMac (2.1.1)
    Using Protobuf (3.3.0)
    Generating Pods project
    Integrating client project
    Sending stats
    Pod installation complete! There are 8 dependencies from the Podfile and 13 total pods installed
    

提交回复
热议问题