我正在Xcode上的iOS项目中工作,并希望使用以下代码行包含MapboxNavigation:
let navigationService = MapboxNavigationService(route: route, simulating: .always)
let navigationController = NavigationViewController(for: route, navigationService: navigationService)
但是每当我使用这两行代码时,都会出现以下错误:
1. While type-checking 'viewDidAppear(animated:)' at /Users/Paul/Desktop/ExpoProjekte/pq-app-v2/ios/pq-app-v2/TurnByTurnView.swift:26:14
2. While type-checking declaration 0x7fcf351aeb70 at /Users/Paul/Desktop/ExpoProjekte/pq-app-v2/ios/pq-app-v2/TurnByTurnView.swift:27:9
3. While type-checking expression at [/Users/Paul/Desktop/ExpoProjekte/pq-app-v2/ios/pq-app-v2/TurnByTurnView.swift:27:33 - line:27:90] RangeText="MapboxNavigationService(route: route, simulating: .always)"
4. While reading from 'MapboxNavigation'
5. While deserializing 'RouteMapViewControllerDelegate' (ProtocolDecl #804) in 'MapboxNavigation'
Command failed due to signal: Abort trap: 6
我已经在网上搜索了错误,并找到了将“构建设置”中的Optimization Level
设置为无的建议。如您在以下屏幕截图中所见,我一直遵循此建议,但未成功
那我该如何解决这个问题?