关于flutter升级后ai_amap-master项目IOS报错的解决方案

关于flutter升级后ai_amap-master项目IOS报错的解决方案

关于1.1.0 IOS 提示 type ‘AiAMapLocationPlatformView’ does not conform to protocol ‘AMapGeoFenceManagerDelegate’

日志如下:
/Users/zhangzhigang/.pub-cache/hosted/pub.flutter-io.cn/ai_amap-1.1.0/ios/Classes/AiAMapLocationPlatformView.swift:17:7: error: type 'AiAMapLocationPlatformView' does not conform to protocol 'AMapGeoFenceManagerDelegate'
class AiAMapLocationPlatformView:NSObject,FlutterPlatformView,MAMapViewDelegate, AMapLocationManagerDelegate,AMapGeoFenceManagerDelegate,AMapNaviCompositeManagerDelegate{
^
/Users/zhangzhigang/.pub-cache/hosted/pub.flutter-io.cn/ai_amap-1.1.0/ios/Classes/AiAMapLocationPlatformView.swift:17:7: note: do you want to add protocol stubs?
class AiAMapLocationPlatformView:NSObject,FlutterPlatformView,MAMapViewDelegate, AMapLocationManagerDelegate,AMapGeoFenceManagerDelegate,AMapNaviCompositeManagerDelegate{
^
/Users/zhangzhigang/.pub-cache/hosted/pub.flutter-io.cn/ai_amap-1.1.0/ios/Classes/AiAMapLocationPlatformView.swift:231:46: warning: forced cast from 'String??' to 'String' only unwraps optionals; did you mean to use '!!'?
naviTitle = annotation.title as! String;
~~~~~~~~~~~~~~~~~^~~~~~~~~~
!!

本人原本技术栈为Java 奈何不懂OC/Swift 只好用用笨办法比较差异 解决问题
修改 IOS目录下 Podfile.lock文件与插件版本一致问题解决 特此记录:

PODS:
  - ai_amap (0.0.1):
    - AMapLocation
    - AMapNavi
    - Flutter
  - AMapFoundation (1.6.3)
  - AMapLocation (2.6.5):
    - AMapFoundation (~> 1.6.3)
  - AMapNavi (7.5.0):
    - AMapFoundation (~> 1.6.3)
  - connectivity (0.0.1):
    - Flutter
    - Reachability
  - device_info (0.0.1):
    - Flutter
  - Flutter (1.0.0)
  - flutter_statusbar_manager (0.0.1):
    - Flutter
  - fluttertoast (0.0.2):
    - Flutter
  - FMDB (2.7.5):
    - FMDB/standard (= 2.7.5)
  - FMDB/standard (2.7.5)
  - path_provider (0.0.1):
    - Flutter
  - "permission_handler (5.1.0+2)":
    - Flutter
  - Reachability (3.2)
  - shared_preferences (0.0.1):
    - Flutter
  - sqflite (0.0.2):
    - Flutter
    - FMDB (>= 2.7.5)
  - url_launcher (0.0.1):
    - Flutter

DEPENDENCIES:
  - ai_amap (from `.symlinks/plugins/ai_amap/ios`)
  - connectivity (from `.symlinks/plugins/connectivity/ios`)
  - device_info (from `.symlinks/plugins/device_info/ios`)
  - Flutter (from `Flutter`)
  - flutter_statusbar_manager (from `.symlinks/plugins/flutter_statusbar_manager/ios`)
  - fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
  - path_provider (from `.symlinks/plugins/path_provider/ios`)
  - permission_handler (from `.symlinks/plugins/permission_handler/ios`)
  - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
  - sqflite (from `.symlinks/plugins/sqflite/ios`)
  - url_launcher (from `.symlinks/plugins/url_launcher/ios`)

SPEC REPOS:
  trunk:
    - AMapFoundation
    - AMapLocation
    - AMapNavi
    - FMDB
    - Reachability

EXTERNAL SOURCES:
  ai_amap:
    :path: ".symlinks/plugins/ai_amap/ios"
  connectivity:
    :path: ".symlinks/plugins/connectivity/ios"
  device_info:
    :path: ".symlinks/plugins/device_info/ios"
  Flutter:
    :path: Flutter
  flutter_statusbar_manager:
    :path: ".symlinks/plugins/flutter_statusbar_manager/ios"
  fluttertoast:
    :path: ".symlinks/plugins/fluttertoast/ios"
  path_provider:
    :path: ".symlinks/plugins/path_provider/ios"
  permission_handler:
    :path: ".symlinks/plugins/permission_handler/ios"
  shared_preferences:
    :path: ".symlinks/plugins/shared_preferences/ios"
  sqflite:
    :path: ".symlinks/plugins/sqflite/ios"
  url_launcher:
    :path: ".symlinks/plugins/url_launcher/ios"

SPEC CHECKSUMS:
  ai_amap: ccf21d9cccb9f2171f7331fd6421a287f3712cfa
  AMapFoundation: 9ed923193b357ebb30a073e9fe255d3c24054d5a
  AMapLocation: c566d448285cd502c1e313063d9e2460bd4d7100
  AMapNavi: a47cf864249da145c0055fd31c49c0006da5ce64
  connectivity: c4130b2985d4ef6fd26f9702e886bd5260681467
  device_info: d7d233b645a32c40dfdc212de5cf646ca482f175
  Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c
  flutter_statusbar_manager: 18588ba7dce7a28a538363d2a9989f9ede4a6710
  fluttertoast: b644586ef3b16f67fae9a1f8754cef6b2d6b634b
  FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
  path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c
  permission_handler: ccb20a9fad0ee9b1314a52b70b76b473c5f8dab0
  Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
  shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
  sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
  url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef

PODFILE CHECKSUM: 40c3bc70fd7ff93654b460f773c92e3806161e85

COCOAPODS: 1.10.0

重点是这里

- AMapFoundation (1.6.3)
  - AMapLocation (2.6.5):
    - AMapFoundation (~> 1.6.3)
  - AMapNavi (7.5.0):
    - AMapFoundation (~> 1.6.3)
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值