GoogleMaps SPM integration: "MTLDebugDevice newLibraryWithFile:error:"
Environment details
- Xcode 15.2
- iPhone Simulator with iOS 17.2 and 17.4
- 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
- Remove old Carthage XCFrameworks
- Follow official guide for SPM integration
- Run project
- 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)
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:
- Check the issue tracker - bugs and feature requests for Google Maps Platform APIs and SDKs
- Open a support case - Get 1:1 support in Cloud Console.
- Discord - chat with other developers
-
StackOverflow - use the
google-mapstag
This is an automated message, feel free to ignore.
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.
@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
do you have any clue?