Skip to content

GoogleMaps SDK Bundle can't be found when linking against framework #6541

@monchote

Description

@monchote

What happened?

  • We'd like to start using the recently introduced SPM support for the Google Maps SDK (version 8.4.0)
  • The Google Maps SDK is added as a dependency to a framework target instead of the app target
  • The bundle fails to load when initialising the SDK

How do we reproduce it?

Reproduction steps

  1. Open the attached sample project: tuist-googlemaps.zip
  2. Run mise x -- tuist install && mise x -- tuist generate
  3. Run the project from Xcode and observe the crash when initialising a GMSMapView

Workaround

  1. Adding an extra copy step to the framework configuration bypasses the issue but duplicates the bundle (and it's very brittle as it references the .build folder)
.glob(pattern: .relativeToRoot(".build/checkouts/**/GoogleMaps.bundle"))

Error log

WARNING: Unable to find and load 'GoogleMaps.bundle' for Google Maps SDK for iOS. This may be a sign that you've forgotten to include a resources bundle in your 'Copy Bundle Resources' build phase. As this bundle contains important resources, you may encounter missing images, translations and other incorrect behavior.
*** Terminating app due to uncaught exception 'GMSServicesException', reason: 'Google Maps SDK for iOS requires GoogleMaps.bundle to be part of your target under 'Copy Bundle Resources''

macOS version

14.5

Tuist version

4.21.2

Xcode version

15.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions