Fix warnings in MapLibre iOS example app (#3857)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -83,10 +83,15 @@ class CustomStyleLayer: MLNCustomStyleLayer {
|
||||
}
|
||||
"""
|
||||
|
||||
var error: NSError?
|
||||
let device = resource.device
|
||||
let library = try? device?.makeLibrary(source: shaderSource, options: nil)
|
||||
assert(library != nil, "Error compiling shaders: \(String(describing: error))")
|
||||
var library: MTLLibrary? = nil
|
||||
var shaderError: Error? = nil
|
||||
do {
|
||||
library = try device?.makeLibrary(source: shaderSource, options: nil)
|
||||
} catch {
|
||||
shaderError = error
|
||||
}
|
||||
assert(library != nil, "Error compiling shaders: \(String(describing: shaderError))")
|
||||
let vertexFunction = library?.makeFunction(name: "vertexShader")
|
||||
let fragmentFunction = library?.makeFunction(name: "fragmentShader")
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ class PrivacyExampleCoordinator: NSObject, MLNMapViewDelegate {
|
||||
super.init()
|
||||
}
|
||||
|
||||
@MainActor func mapView(_: MLNMapView, didChangeLocationManagerAuthorization manager: MLNLocationManager) {
|
||||
func mapView(_: MLNMapView, didChangeLocationManagerAuthorization manager: MLNLocationManager) {
|
||||
guard let accuracySetting = manager.accuracyAuthorization else {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user