firebase-ios-sdk: No such module 'GoogleUtilities' in HeartbeatsPayload

Description

I just upgraded to xcode 15.3 and can’t run the project Screenshot 2024-02-21 at 16 16 28

Reproducing the issue

No response

Firebase SDK Version

10.18

Xcode Version

15.3

Installation Method

CocoaPods

Firebase Product(s)

All

Targeted Platforms

iOS

Relevant Log Output

No response

If using Swift Package Manager, the project’s Package.resolved

Expand Package.resolved snippet

Replace this line with the contents of your Package.resolved.

If using CocoaPods, the project’s Podfile.lock

Expand Podfile.lock snippet

Replace this line with the contents of your Podfile.lock!

About this issue

  • Original URL
  • State: closed
  • Created 4 months ago
  • Reactions: 4
  • Comments: 21 (7 by maintainers)

Most upvoted comments

Hi @dlpigpen, I merged #12714 which will hopefully fix the issue. It merged shortly after the last release went out so it happened at the beginning of the release cycle. The next release is scheduled for the end of April. If you’re using CocoaPods, you could try applying the changes made in #12714 to see if that resolves it. SPM is harder to experiment with without changing target tag/branch.

Feel free to share your Podfile.lock or Package.resolved as the issue may be due to a conflicting version of GoogleUtilities, as was likely the case in some of the scenarios I responded to in https://github.com/firebase/firebase-ios-sdk/issues/12409#issuecomment-2040494532.

I haven’t been able to reproduce this issue, but I have a few suggestions based on some of the artifacts I’ve seen above:

@tanmayg1502, consider moving use_frameworks! :linkage => :static above your Podfile’s target definition. Potentially the order matters? More importantly though, I’m seeing a lot of very old SDK versions that are mixing in with new SDK versions. I would highly recommend updating to the latest major versions of Firebase, GoogleSignIn, and Google-Mobile-Ads-SDK. I’m seeing a very old GoogleUtilities version that is getting pulled in and is likely the problem. I suspect that the dated AdMob and GoogleSignIn dependencies are pulling in a very old version of FirebaseAnalytics that is pulling in a conflicting version of GoogleUtilities.

  - FirebaseAnalytics (3.4.2): <-- FirebaseAnalytics is now on major version 10
    - FirebaseInstanceID (~> 1.0)
    - GoogleInterchangeUtilities (~> 1.2)
    - GoogleSymbolUtilities (~> 1.1)
    - GoogleUtilities (~> 1.2) <-- Firebase 10 is using is now on GoogleUtilities 7
<snip>
  - GoogleUtilities/UserDefaults (7.12.0): <-- The correct GoogleUtilities version is also getting pulled in.
    - GoogleUtilities/Logger

@lephamkieutrinh, did you encounter this issue after recently updating? Do you have any Swift files in your project?


@adamvnovak, I created a package that depends on the firebase-ios-sdk but was not able to reproduce this. I don’t think this is related, but I recommend moving away from .package(url: "https://github.com/firebase/firebase-ios-sdk", branch: "main") and instead using the .package(url:from:) API to point to a released Firebase version (main is not officially supported and may break at any time).

I’m having the exact same issue: “No such module ‘GoogleUtilities_NSData’” in HeartbeatsPayload.swift. I’m using the following custom SPM file. What’s going on here?

// swift-tools-version: 5.10
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
    name: "iOS",
    platforms: [.iOS(.v15)],
    products: [
        .library(name: "Models", targets: ["Models"]),
        .library(name: "Constants", targets: ["Constants"]),
        .library(name: "Analytics", targets: ["Analytics"]),
        .library(name: "RefineMyCurationFeature", targets: ["RefineMyCurationFeature"]),
        .library(name: "ImageFiltering", targets: ["ImageFiltering"]),
        .library(name: "VideoHelpers", targets: ["VideoHelpers"]),
    ],
    dependencies: [ //Available product names for each dependency are listed to the right
        .package(url: "https://github.com/applidium/OverlayContainer", from: "3.5.2"), //OverlayContainer
        .package(url: "https://github.com/BenEmdon/CenteredCollectionView", from: "2.2.2"), //CenteredCollectionView
        .package(url: "https://github.com/googlemaps/ios-places-sdk", from: "8.5.0"), //GooglePlaces
        .package(url: "https://github.com/adamvnovak/SwiftEssentialsLibrary", branch: "main"), //SwiftEssentialsLibrary
        .package(url: "https://github.com/getsentry/sentry-cocoa", from: "8.19.0"), //Sentry, Sentry-Dynamic, SentrySwiftUI
        .package(url: "https://github.com/PostHog/posthog-ios", from: "2.1.0"), //PostHog
        .package(url: "https://github.com/firebase/firebase-ios-sdk", branch: "main"), 

    ],
    targets: [
        .target(
            name: "Models",
            dependencies: [
                .product(name: "SwiftEssentialsLibrary", package: "SwiftEssentialsLibrary"),
                .product(name: "GooglePlaces", package: "ios-places-sdk"),
            ]
        ),
        .target(
            name: "Constants",
            dependencies: [
                .product(name: "SwiftEssentialsLibrary", package: "SwiftEssentialsLibrary"),
                .product(name: "GooglePlaces", package: "ios-places-sdk"),
            ],
            resources: [
              .copy("Resources/GooglePlacesResources/GooglePlaces.bundle")
            ]
        ),
        .target(
            name: "Analytics",
            dependencies: [
                .product(name: "SwiftEssentialsLibrary", package: "SwiftEssentialsLibrary"),
                .product(name: "PostHog", package: "posthog-ios"),
                .product(name: "Sentry", package: "sentry-cocoa"),
                .product(name: "FirebaseAnalytics", package: "firebase-ios-sdk"),
                .product(name: "FirebaseAnalyticsSwift", package: "firebase-ios-sdk"),
                .product(name: "FirebaseCrashlytics", package: "firebase-ios-sdk"),
                .product(name: "FirebasePerformance", package: "firebase-ios-sdk"),
                .product(name: "FirebaseRemoteConfig", package: "firebase-ios-sdk"),
                .product(name: "FirebaseRemoteConfigSwift", package: "firebase-ios-sdk"),

            ]
        ),
        .target(
            name: "ImageFiltering",
            dependencies: [
            ]
        ),
        .target(
            name: "VideoHelpers",
            dependencies: [
            ]
        ),
        .target(
            name: "RefineMyCurationFeature",
            dependencies: [
                "Models",
                "Constants",
                .product(name: "GooglePlaces", package: "ios-places-sdk"),
                .product(name: "CenteredCollectionView", package: "CenteredCollectionView"),
                .product(name: "OverlayContainer", package: "OverlayContainer"),
                .product(name: "SwiftEssentialsLibrary", package: "SwiftEssentialsLibrary"),
            ]
        )
    ]
)