ios - 在 Xcode 10 中使用 MapboxNavigation iOS
问题描述
是否有可能将MapboxNavigation
(版本0.21
或0.22
)iOS 与 Xcode 10 一起使用。在其 Github 和 CocoaPods 网站上声明,它只能与 Xcode 9 一起使用,但 Github 上的一些问题提到(成功)使用 Xcode 10 MapboxNavigation
.
但是,我尝试MapboxNavigation
使用 Xcode 10 通过 CocoaPods 安装并得到一堆错误:
/Users/Paul_Obernolte/Library/Developer/Xcode/DerivedData/pq-app-v2-gynuaxsohvqddqegrvemywowchkr/Build/Products/Debug-iphonesimulator/MapboxDirections.swift/Swift Compatibility Header/MapboxDirections-Swift.h:171:9: error: 'MapboxDirections/MapboxDirections.h' file not found
#import <MapboxDirections/MapboxDirections.h>
^
<unknown>:0: error: could not build Objective-C module 'MapboxDirections'
是否有任何解决方法可以避免使用 Xcode 10 出现此错误?
编辑:这是我的 Podfile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
EXPO_CPP_HEADER_DIR = 'ExpoKit'
target 'pq-app-v2' do
pod 'MapboxDirections.swift', '~> 0.23'
pod 'MapboxMobileEvents',
:git => 'https://github.com/mapbox/mapbox-events-ios.git',
:commit => "79d29f1df5a9187481f5c9ac8fa13430d1f04139"
pod 'MapboxNavigation', '~> 0.21.0'
... (more Pods)
end
MapboxMobileEvents
由于这个问题,我需要单独下载: https ://github.com/mapbox/mapbox-events-ios/pull/85
解决方案
target 'pq-app-v2' do
use_frameworks!
... (more Pods)
end
如果“use_frameworks!”,请更改 pod 文件中的代码 被评论而不是像上面那样取消评论。
推荐阅读
- java - 展开树中的自动调整旋转策略
- c# - IDX10501:签名验证失败。Azure SSO WS 联合
- c# - C#奇怪的模速度行为
- javascript - 过滤和映射后如何获取用户ID
- python - 如何从给定的锚标签中提取标题
- azure-devops - 无法为 Azure 数据工厂 V2 设置 Azure Devops 的代码存储库
- python - 如何直接在 python 代码中 ocr pdf
- flutter - Flutter 是否有一种用于页面的接口/适配器类?
- html - 在 html 和 css 中重新调整材料设计图标大小的最简单方法是什么?
- c - 使用 EOF 在 while 循环中停止 scanf