Closed adithyaxx closed 4 years ago
Thanks for reporting this issue. It seemed to be a problem with the apple_maps_flutter plugin. I converted the iOS code to swift 5 which should fix the issues you had while building your app.
Run flutter packages upgrade
to get the newest version of the apple_maps_flutter plugin which the platform_maps_flutter package depends on.
Please let me know if that solved your problem.
Thank you for the prompt response. I am able to build the app now. However I am facing other issues with apple maps and I am not sure if I should open a new issue or just continue here. Regardless, here are the issues I'm facing:
Hey, I was not able to reproduce these issues. Did you also encounter this behavior on the stable channel? I would also appreciate a minimal working example so I can further investigate these issues and hopefully get them fixed soon :)
Refer to this example to demonstrate these issues better:
Unhandled Exception: type 'BitmapDescriptor' is not a subtype of type 'BitmapDescriptor' where
BitmapDescriptor is from package:apple_maps_flutter/apple_maps_flutter.dart
BitmapDescriptor is from package:platform_maps_flutter/platform_maps_flutter.dart
It seems like polylines are working in the example that I put together so we can skip that for now.
Try sliding the sheet up and down and the map will become irresponsive to user touch after that. So it seems like redrawing the map breaks user input.
Hello, I have same issues too.
Running pod install... 1.3s Running Xcode build...
Xcode build done. 4.1s Failed to build iOS app Error output from Xcode build: ↳ 2019-12-30 19:24:59.667 xcodebuild[75632:436875] DTDeviceKit: deviceType from 00008006-000368291AC1002E was NULL 2019-12-30 19:24:59.769 xcodebuild[75632:436825] [MT] DTDeviceKit: deviceType from 00008006-000368291AC1002E was NULL 2019-12-30 19:24:59.773 xcodebuild[75632:436825] [MT] DTDeviceKit: deviceType from 00008006-000368291AC1002E was NULL 2019-12-30 19:24:59.777 xcodebuild[75632:436825] [MT] DTDeviceKit: deviceType from 00008006-000368291AC1002E was NULL BUILD FAILED
Xcode's output:
↳
/Users/rodrigo.gomes/flutter/.pub-cache/hosted/pub.dartlang.org/apple_mapsflutter-0.0.6+2/ios/Classes/FlutterMap
View.swift:194:75: error: 'init(:)' has been renamed to 'MKMapPointForCoordinate(:)'
let distance: Float = Float(distanceOf(pt: MKMapPoint.init(coord), toPoly: overlay as!
MKPolyline))
^~~~
MKMapPointForCoordinate
MapKit.MKMapPoint:4:30: note: 'init(:)' was introduced in Swift 4.2
public /not inherited/ init(_ coordinate: CLLocationCoordinate2D)
^
/Users/rodrigo.gomes/flutter/.pub-cache/hosted/pub.dartlang.org/apple_mapsflutter-0.0.6+2/ios/Classes/FlutterMap
View.swift:252:48: error: 'distance(to:)' has been renamed to 'MKMetersBetweenMapPoints(:_:)'
distance = min(distance, ptClosest.distance(to: pt))
^~~~
MKMetersBetweenMapPoints
MapKit.MKMapPoint:9:17: note: 'distance(to:)' was introduced in Swift 4.2
public func distance(to b: MKMapPoint) -> CLLocationDistance
^
/Users/rodrigo.gomes/flutter/.pub-cache/hosted/pub.dartlang.org/apple_mapsflutter-0.0.6+2/ios/Classes/FlutterMap
View.swift:261:27: error: 'init(:)' has been renamed to 'MKMapPointForCoordinate(:)'
return MKMapPoint.init(coordA).distance(to: MKMapPoint.init(coordB))
^~~~
MKMapPointForCoordinate
MapKit.MKMapPoint:4:30: note: 'init(:)' was introduced in Swift 4.2
public /not inherited/ init(_ coordinate: CLLocationCoordinate2D)
^
/Users/rodrigo.gomes/flutter/.pub-cache/hosted/pub.dartlang.org/apple_mapsflutter-0.0.6+2/ios/Classes/FlutterMap
View.swift:261:40: error: 'distance(to:)' has been renamed to 'MKMetersBetweenMapPoints(:_:)'
return MKMapPoint.init(coordA).distance(to: MKMapPoint.init(coordB))
^~~~
MKMetersBetweenMapPoints
MapKit.MKMapPoint:9:17: note: 'distance(to:)' was introduced in Swift 4.2
public func distance(to b: MKMapPoint) -> CLLocationDistance
^
/Users/rodrigo.gomes/flutter/.pub-cache/hosted/pub.dartlang.org/apple_mapsflutter-0.0.6+2/ios/Classes/FlutterMap
View.swift:261:64: error: 'init(:)' has been renamed to 'MKMapPointForCoordinate(:)'
return MKMapPoint.init(coordA).distance(to: MKMapPoint.init(coordB))
^~~~
MKMapPointForCoordinate
MapKit.MKMapPoint:4:30: note: 'init(:)' was introduced in Swift 4.2
public /not inherited/ init(_ coordinate: CLLocationCoordinate2D)
^
/Users/rodrigo.gomes/flutter/.pub-cache/hosted/pub.dartlang.org/apple_maps_flutter-0.0.6+2/ios/Classes/MapViewExt
ension.swift:210:58: error: value of type 'MKMapPoint' has no member 'MKMetersBetweenMapPoints'
let distance = MKMapPoint.init(centerCoordinate).MKMetersBetweenMapPoints(to: MKMapPoint.init(topBottom))
/Users/rodrigo.gomes/flutter/.pub-cache/hosted/pub.dartlang.org/apple_maps_flutter-0.0.6+2/ios/Classes/FlutterMap
View.swift:194:75: error: 'init(_:)' has been renamed to 'MKMapPointForCoordinate(_:)'
let distance: Float = Float(distanceOf(pt: MKMapPoint.init(coord), toPoly: overlay as!
MKPolyline))
^~~~
MKMapPointForCoordinate
MapKit.MKMapPoint:4:30: note: 'init(_:)' was introduced in Swift 4.2
public /*not inherited*/ init(_ coordinate: CLLocationCoordinate2D)
^
/Users/rodrigo.gomes/flutter/.pub-cache/hosted/pub.dartlang.org/apple_maps_flutter-0.0.6+2/ios/Classes/FlutterMap
View.swift:252:48: error: 'distance(to:)' has been renamed to 'MKMetersBetweenMapPoints(_:_:)'
distance = min(distance, ptClosest.distance(to: pt))
^~~~~~~~
MKMetersBetweenMapPoints
MapKit.MKMapPoint:9:17: note: 'distance(to:)' was introduced in Swift 4.2
public func distance(to b: MKMapPoint) -> CLLocationDistance
^
/Users/rodrigo.gomes/flutter/.pub-cache/hosted/pub.dartlang.org/apple_maps_flutter-0.0.6+2/ios/Classes/FlutterMap
View.swift:261:27: error: 'init(_:)' has been renamed to 'MKMapPointForCoordinate(_:)'
return MKMapPoint.init(coordA).distance(to: MKMapPoint.init(coordB))
^~~~
MKMapPointForCoordinate
MapKit.MKMapPoint:4:30: note: 'init(_:)' was introduced in Swift 4.2
public /*not inherited*/ init(_ coordinate: CLLocationCoordinate2D)
^
/Users/rodrigo.gomes/flutter/.pub-cache/hosted/pub.dartlang.org/apple_maps_flutter-0.0.6+2/ios/Classes/FlutterMap
View.swift:261:40: error: 'distance(to:)' has been renamed to 'MKMetersBetweenMapPoints(_:_:)'
return MKMapPoint.init(coordA).distance(to: MKMapPoint.init(coordB))
^~~~~~~~
MKMetersBetweenMapPoints
MapKit.MKMapPoint:9:17: note: 'distance(to:)' was introduced in Swift 4.2
public func distance(to b: MKMapPoint) -> CLLocationDistance
^
/Users/rodrigo.gomes/flutter/.pub-cache/hosted/pub.dartlang.org/apple_maps_flutter-0.0.6+2/ios/Classes/FlutterMap
View.swift:261:64: error: 'init(_:)' has been renamed to 'MKMapPointForCoordinate(_:)'
return MKMapPoint.init(coordA).distance(to: MKMapPoint.init(coordB))
^~~~
MKMapPointForCoordinate
MapKit.MKMapPoint:4:30: note: 'init(_:)' was introduced in Swift 4.2
public /*not inherited*/ init(_ coordinate: CLLocationCoordinate2D)
^
/Users/rodrigo.gomes/flutter/.pub-cache/hosted/pub.dartlang.org/apple_maps_flutter-0.0.6+2/ios/Classes/MapViewExt
ension.swift:210:58: error: value of type 'MKMapPoint' has no member 'MKMetersBetweenMapPoints'
let distance = MKMapPoint.init(centerCoordinate).MKMetersBetweenMapPoints(to: MKMapPoint.init(topBottom))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~
note: Using new build system
note: Planning build
note: Constructing build description
And My Flutter version Stable.
flutter doctor -v 56% (1:36)
[✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Mac OS X 10.14.6 18G1012, locale en-BR)
• Flutter version 1.12.13+hotfix.5 at /Users/rodrigo.gomes/flutter
• Framework revision 27321ebbad (3 weeks ago), 2019-12-10 18:15:01 -0800
• Engine revision b863200c37
• Dart version 2.5.0
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/rodrigo.gomes/Android/Sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• ANDROID_HOME = /Users/rodrigo.gomes/Android/Sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.2.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.2.1, Build version 11B500
• CocoaPods version 1.6.2
[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 42.1.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
[✓] Connected device (1 available)
• iPhone 8 • 645FB980-DECC-4DB2-8BFA-FE3A8A9B5A91 • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-2 (simulator)
• No issues found!
I`m not be able to build.
thanks.
Refer to this example to demonstrate these issues better:
- Whenever I try to set a custom marker icon I get this exception:
Unhandled Exception: type 'BitmapDescriptor' is not a subtype of type 'BitmapDescriptor' where BitmapDescriptor is from package:apple_maps_flutter/apple_maps_flutter.dart BitmapDescriptor is from package:platform_maps_flutter/platform_maps_flutter.dart
- It seems like polylines are working in the example that I put together so we can skip that for now.
- Try sliding the sheet up and down and the map will become irresponsive to user touch after that. So it seems like redrawing the map breaks user input.
Thanks for providing this example, I'm back from Holiday and will continue investigating this issue!
Hello, I have same issues too.
Running pod install... 1.3s Running Xcode build...
Xcode build done. 4.1s Failed to build iOS app Error output from Xcode build: ↳ 2019-12-30 19:24:59.667 xcodebuild[75632:436875] DTDeviceKit: deviceType from 00008006-000368291AC1002E was NULL 2019-12-30 19:24:59.769 xcodebuild[75632:436825] [MT] DTDeviceKit: deviceType from 00008006-000368291AC1002E was NULL 2019-12-30 19:24:59.773 xcodebuild[75632:436825] [MT] DTDeviceKit: deviceType from 00008006-000368291AC1002E was NULL 2019-12-30 19:24:59.777 xcodebuild[75632:436825] [MT] DTDeviceKit: deviceType from 00008006-000368291AC1002E was NULL BUILD FAILED
Xcode's output: ↳ /Users/rodrigo.gomes/flutter/.pub-cache/hosted/pub.dartlang.org/apple_mapsflutter-0.0.6+2/ios/Classes/FlutterMap View.swift:194:75: error: 'init(:)' has been renamed to 'MKMapPointForCoordinate(:)' let distance: Float = Float(distanceOf(pt: MKMapPoint.init(coord), toPoly: overlay as! MKPolyline)) ^~~~ MKMapPointForCoordinate MapKit.MKMapPoint:4:30: note: 'init(:)' was introduced in Swift 4.2 public /not inherited/ init(_ coordinate: CLLocationCoordinate2D) ^ /Users/rodrigo.gomes/flutter/.pub-cache/hosted/pub.dartlang.org/apple_mapsflutter-0.0.6+2/ios/Classes/FlutterMap View.swift:252:48: error: 'distance(to:)' has been renamed to 'MKMetersBetweenMapPoints(:_:)' distance = min(distance, ptClosest.distance(to: pt)) ^
~~~ MKMetersBetweenMapPoints MapKit.MKMapPoint:9:17: note: 'distance(to:)' was introduced in Swift 4.2 public func distance(to b: MKMapPoint) -> CLLocationDistance ^ /Users/rodrigo.gomes/flutter/.pub-cache/hosted/pub.dartlang.org/apple_mapsflutter-0.0.6+2/ios/Classes/FlutterMap View.swift:261:27: error: 'init(:)' has been renamed to 'MKMapPointForCoordinate(:)' return MKMapPoint.init(coordA).distance(to: MKMapPoint.init(coordB)) ^~~~ MKMapPointForCoordinate MapKit.MKMapPoint:4:30: note: 'init(:)' was introduced in Swift 4.2 public /not inherited/ init(_ coordinate: CLLocationCoordinate2D) ^ /Users/rodrigo.gomes/flutter/.pub-cache/hosted/pub.dartlang.org/apple_mapsflutter-0.0.6+2/ios/Classes/FlutterMap View.swift:261:40: error: 'distance(to:)' has been renamed to 'MKMetersBetweenMapPoints(:_:)' return MKMapPoint.init(coordA).distance(to: MKMapPoint.init(coordB)) ^~~~ MKMetersBetweenMapPoints MapKit.MKMapPoint:9:17: note: 'distance(to:)' was introduced in Swift 4.2 public func distance(to b: MKMapPoint) -> CLLocationDistance ^ /Users/rodrigo.gomes/flutter/.pub-cache/hosted/pub.dartlang.org/apple_mapsflutter-0.0.6+2/ios/Classes/FlutterMap View.swift:261:64: error: 'init(:)' has been renamed to 'MKMapPointForCoordinate(:)' return MKMapPoint.init(coordA).distance(to: MKMapPoint.init(coordB)) ^~~~ MKMapPointForCoordinate MapKit.MKMapPoint:4:30: note: 'init(:)' was introduced in Swift 4.2 public /not inherited/ init(_ coordinate: CLLocationCoordinate2D) ^ /Users/rodrigo.gomes/flutter/.pub-cache/hosted/pub.dartlang.org/apple_maps_flutter-0.0.6+2/ios/Classes/MapViewExt ension.swift:210:58: error: value of type 'MKMapPoint' has no member 'MKMetersBetweenMapPoints' let distance = MKMapPoint.init(centerCoordinate).MKMetersBetweenMapPoints(to: MKMapPoint.init(topBottom))/Users/rodrigo.gomes/flutter/.pub-cache/hosted/pub.dartlang.org/apple_maps_flutter-0.0.6+2/ios/Classes/FlutterMap View.swift:194:75: error: 'init(_:)' has been renamed to 'MKMapPointForCoordinate(_:)' let distance: Float = Float(distanceOf(pt: MKMapPoint.init(coord), toPoly: overlay as! MKPolyline)) ^~~~ MKMapPointForCoordinate MapKit.MKMapPoint:4:30: note: 'init(_:)' was introduced in Swift 4.2 public /_not inherited_/ init(_ coordinate: CLLocationCoordinate2D) ^ /Users/rodrigo.gomes/flutter/.pub-cache/hosted/pub.dartlang.org/apple_maps_flutter-0.0.6+2/ios/Classes/FlutterMap View.swift:252:48: error: 'distance(to:)' has been renamed to 'MKMetersBetweenMapPoints(_:_:)' distance = min(distance, ptClosest.distance(to: pt)) ^~~~~~~~ MKMetersBetweenMapPoints MapKit.MKMapPoint:9:17: note: 'distance(to:)' was introduced in Swift 4.2 public func distance(to b: MKMapPoint) -> CLLocationDistance ^ /Users/rodrigo.gomes/flutter/.pub-cache/hosted/pub.dartlang.org/apple_maps_flutter-0.0.6+2/ios/Classes/FlutterMap View.swift:261:27: error: 'init(_:)' has been renamed to 'MKMapPointForCoordinate(_:)' return MKMapPoint.init(coordA).distance(to: MKMapPoint.init(coordB)) ^~~~ MKMapPointForCoordinate MapKit.MKMapPoint:4:30: note: 'init(_:)' was introduced in Swift 4.2 public /_not inherited_/ init(_ coordinate: CLLocationCoordinate2D) ^ /Users/rodrigo.gomes/flutter/.pub-cache/hosted/pub.dartlang.org/apple_maps_flutter-0.0.6+2/ios/Classes/FlutterMap View.swift:261:40: error: 'distance(to:)' has been renamed to 'MKMetersBetweenMapPoints(_:_:)' return MKMapPoint.init(coordA).distance(to: MKMapPoint.init(coordB)) ^~~~~~~~ MKMetersBetweenMapPoints MapKit.MKMapPoint:9:17: note: 'distance(to:)' was introduced in Swift 4.2 public func distance(to b: MKMapPoint) -> CLLocationDistance ^ /Users/rodrigo.gomes/flutter/.pub-cache/hosted/pub.dartlang.org/apple_maps_flutter-0.0.6+2/ios/Classes/FlutterMap View.swift:261:64: error: 'init(_:)' has been renamed to 'MKMapPointForCoordinate(_:)' return MKMapPoint.init(coordA).distance(to: MKMapPoint.init(coordB)) ^~~~ MKMapPointForCoordinate MapKit.MKMapPoint:4:30: note: 'init(_:)' was introduced in Swift 4.2 public /_not inherited_/ init(_ coordinate: CLLocationCoordinate2D) ^ /Users/rodrigo.gomes/flutter/.pub-cache/hosted/pub.dartlang.org/apple_maps_flutter-0.0.6+2/ios/Classes/MapViewExt ension.swift:210:58: error: value of type 'MKMapPoint' has no member 'MKMetersBetweenMapPoints' let distance = MKMapPoint.init(centerCoordinate).MKMetersBetweenMapPoints(to: MKMapPoint.init(topBottom)) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~ note: Using new build system note: Planning build note: Constructing build description And My Flutter version Stable. flutter doctor -v 56% (1:36) [✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Mac OS X 10.14.6 18G1012, locale en-BR) • Flutter version 1.12.13+hotfix.5 at /Users/rodrigo.gomes/flutter • Framework revision 27321ebbad (3 weeks ago), 2019-12-10 18:15:01 -0800 • Engine revision b863200c37 • Dart version 2.5.0 [✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3) • Android SDK at /Users/rodrigo.gomes/Android/Sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-28, build-tools 28.0.3 • ANDROID_HOME = /Users/rodrigo.gomes/Android/Sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 11.2.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 11.2.1, Build version 11B500 • CocoaPods version 1.6.2 [✓] Android Studio (version 3.5) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin version 42.1.1 • Dart plugin version 191.8593 • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405) [✓] Connected device (1 available) • iPhone 8 • 645FB980-DECC-4DB2-8BFA-FE3A8A9B5A91 • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-2 (simulator) • No issues found! I`m not be able to build. thanks.
Thank you for reporting, this issue. I don't think this build issue is related to the one from @adithyaxx. Please consider opening a new Issue, but I will already try to find the cause of this error.
@adithyaxx I released a new version that should fix the BitmapDescriptor type errors. I will close this issue for now and will continue investigating the error with the sliding_up_panel here #8. @rodrigogalhardo I still wasn't able to reproduce this build error, please consider opening a new issue if the problem persists.
@LuisThein I have the same problem. I cloned the repo and tried to run the example but got a bunch of errors complaining about Swiff 3 and Swift 4.2. Is the fix currently on the master branch of this library?
I tried apple_maps_flutter
and that one worked perfectly. Are these in sync?
The build issues should be fixed in the latest version. Please consider opening a new issue if this did not resolve your build issue.
I am trying to switch over from using the google maps plugin to this one and I am unable to run my app after adding this plugin.
Here is the output when running the app on my iPhone:
Here is the output of flutter doctor: