I'm having some issues with the GoogleMaps SDK in SwiftUI. I manually installed the SDK, because cocoa pods don't work on my Mac. But now I have building issues:
Showing Recent Messages
Ignoring file /Users/f4mdev/AndroidStudioProjects/fabTraceability/iosApp/iosApp/GoogleMapsCore.framework/GoogleMapsCore, file is universal (arm64) but does not contain the x86_64 architecture: /Users/f4mdev/AndroidStudioProjects/fabTraceability/iosApp/iosApp/GoogleMapsCore.framework/GoogleMapsCore
Ignoring file /Users/f4mdev/AndroidStudioProjects/fabTraceability/iosApp/iosApp/GoogleMapsBase.framework/GoogleMapsBase, file is universal (arm64) but does not contain the x86_64 architecture: /Users/f4mdev/AndroidStudioProjects/fabTraceability/iosApp/iosApp/GoogleMapsBase.framework/GoogleMapsBase
Ignoring file /Users/f4mdev/AndroidStudioProjects/fabTraceability/iosApp/iosApp/GoogleMaps.framework/GoogleMaps, file is universal (arm64) but does not contain the x86_64 architecture: /Users/f4mdev/AndroidStudioProjects/fabTraceability/iosApp/iosApp/GoogleMaps.framework/GoogleMaps
Undefined symbol: _OBJC_CLASS_$_GMSCameraPosition
Undefined symbol: _OBJC_CLASS_$_GMSMapView
Undefined symbol: _OBJC_CLASS_$_GMSServices
This is my Code I tried:
import UIKit
import GoogleMaps
import SwiftUI
struct GoogleMapsView: UIViewRepresentable {
private let zoom: Float = 15.0
func makeUIView(context: Self.Context) -> GMSMapView {
let camera = GMSCameraPosition.camera(withLatitude: -33.86, longitude: 151.20, zoom: 6.0)
let mapView = GMSMapView.map(withFrame: CGRect.zero, camera: camera)
return mapView
}
Google Maps package doesn't support Apple Silicon. Running the app on an actual device or running xcode in rosetta should work.