googlemaps / ios-maps-sdk

Google Maps SDK for iOS
Apache License 2.0
56 stars 9 forks source link

GoogleMaps SPM integration: "MTLDebugDevice newLibraryWithFile:error:" #12

Open NicolasEymael opened 8 months ago

NicolasEymael commented 8 months ago

Environment details

  1. Xcode 15.2
  2. iPhone Simulator with iOS 17.2 and 17.4
  3. GoogleMaps 8.4.0 using SPM

Our project had GoogleMaps 6.0.1 using Carthage, but we decided to migrate to SPM.

binary "https://dl.google.com/geosdk/GoogleMaps.json" == 6.0.1-beta

Steps to reproduce

  1. Remove old Carthage XCFrameworks
  2. Follow official guide for SPM integration
  3. Run project
  4. It happens a run time error and app crashes with the message
    -[MTLDebugDevice newLibraryWithFile:error:]:1860: failed assertion `filepath must not be nil.'

We also tried disabling Metal Renderer with the code below. Using the old renderer, the crash does not happen but the Maps in the app just become blank.

GMSServices.setMetalRendererEnabled(false)
wangela commented 8 months ago

If you would like to upvote the priority of this issue, please comment below or react on the original post above with :+1: so we can see what is popular when we triage.

@NicolasEymael Thank you for opening this issue. 🙏 Please check out these other resources that might help you get to a resolution in the meantime:

This is an automated message, feel free to ignore.

wangela commented 8 months ago

In addition to removing the xcframeworks that you already did, try following the instruction at the bottom of the Swift Package Manager tab for removing the GoogleMaps bundle from the top level directory of your project.

NicolasEymael commented 8 months ago

@wangela thanks for the help, i missed this instruction in the guide now the app stopped crashing but it is not working yet all of the maps are blank, it looks like the GMSMapView is not loading correctly

there is no error message and it just stays like this

image

do you have any clue?