Search code examples
iosswiftfirebasecocoapodsabseil

Unspecified Cocoapod libraries installed


I have recently added one line in the Podfile to use Firebase's Dynamic Links.

  pod 'Firebase/DynamicLinks'

However, when I used the command pod update in terminal, it installed one library unintended:

Installing abseil (0.20190808)

This made me nervous as it installed a weird library called abseil. When I cat Podfile.lock, it had bunch of different components:

  - abseil/algorithm (0.20190808):
  - abseil/algorithm/algorithm (= 0.20190808)
  - abseil/algorithm/container (= 0.20190808)
  - abseil/algorithm/algorithm (0.20190808)
  - abseil/algorithm/container (0.20190808):
    - abseil/algorithm/algorithm
    - abseil/base/core_headers
    - abseil/meta/type_traits
  ...
  - abseil/utility/utility (0.20190808):
    - abseil/base/base_internal
    - abseil/base/config
    - abseil/meta/type_traits

What's with this library? It doesn't seem to be part of Firebase's Dynamic Link. It is pretty long and doesn't look like necessary for my project. Did Firebase suddenly decided to include this huge library to everyone? My another project with Firebase and Dynamic Links doesn't have this abseil library even after I pod update it.


Solution

  • Are you sure that abseil is a dependency for FirebaseDynamicLinks pod? When I install only it, I can see only those dependencies:

    - Firebase
    - FirebaseAnalyticsInterop
    - FirebaseCore
    - FirebaseCoreDiagnostics
    - FirebaseCoreDiagnosticsInterop
    - FirebaseDynamicLinks
    - GoogleDataTransport
    - GoogleDataTransportCCTSupport
    - GoogleUtilities
    - nanopb
    

    Hover abseil is a dependency for FirebaseFirestore pod . As you can read in the reop:

    Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives.

    so it is quite possible that project created by teams from Google will use it. You shouldn't be nervous about it. Also, you can check which pod is using abseil as a dependency, you need to open Podfile.lock file, and in the first section (starting with PODS:) search for abseil that hasn't started with only two space. The easiest way will be to search for

        - abseil
    

    (4 space)- abseil. In my case, it looks like this:

      - FirebaseFirestore (1.8.0):
        - abseil/algorithm (= 0.20190808)
        - abseil/base (= 0.20190808)
        - abseil/memory (= 0.20190808)
        - abseil/meta (= 0.20190808)
        - abseil/strings/strings (= 0.20190808)
        - abseil/time (= 0.20190808)
        - abseil/types (= 0.20190808)
        - FirebaseAuthInterop (~> 1.0)
        - FirebaseCore (~> 6.2)
        - "gRPC-C++ (= 0.0.9)"
        - leveldb-library (~> 1.22)
        - nanopb (~> 0.3.901)