albert-heijn-technology / platform_maps_flutter

A Flutter package to provide the native maps to Android/iOS
BSD 2-Clause "Simplified" License
80 stars 64 forks source link

Unable to build app on dev channel #4

Closed adithyaxx closed 4 years ago

adithyaxx commented 4 years ago

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:

Xcode's output:
↳
    /Users/adithya/.pub-cache/hosted/pub.dartlang.org/apple_maps_flutter-0.0.6+1/ios/Classes/FlutterMapView.swift:117:48: error: 'UIButtonType' has been renamed to 'UIButton.ButtonType'
               let locationButton = UIButton(type: UIButtonType.custom) as UIButton
                                                   ^~~~~~~~~~~~
                                                   UIButton.ButtonType
    UIKit.UIButtonType:2:18: note: 'UIButtonType' was obsoleted in Swift 4.2
    public typealias UIButtonType = UIButton.ButtonType
                     ^
    /Users/adithya/.pub-cache/hosted/pub.dartlang.org/apple_maps_flutter-0.0.6+1/ios/Classes/FlutterMapView.swift:194:64: error: 'MKMapPointForCoordinate' has been replaced by 'MKMapPoint.init(_:)'
                        let distance: Float = Float(distanceOf(pt: MKMapPointForCoordinate(coord), toPoly: overlay as! MKPolyline))
                                                                   ^~~~~~~~~~~~~~~~~~~~~~~
                                                                   MKMapPoint
    MapKit.MKMapPointForCoordinate:3:13: note: 'MKMapPointForCoordinate' was obsoleted in Swift 3
    public func MKMapPointForCoordinate(_ coordinate: CLLocationCoordinate2D) -> MKMapPoint
                ^
    /Users/adithya/.pub-cache/hosted/pub.dartlang.org/apple_maps_flutter-0.0.6+1/ios/Classes/FlutterMapView.swift:249:29: error: 'MKMapPointMake' is unavailable in Swift
                    ptClosest = MKMapPointMake(ptA.x + u * xDelta, ptA.y + u * yDelta)
                                ^~~~~~~~~~~~~~
    MapKit.MKMapPointMake:2:13: note: 'MKMapPointMake' has been explicitly marked unavailable here
    public func MKMapPointMake(_ x: Double, _ y: Double) -> MKMapPoint
                ^
    /Users/adithya/.pub-cache/hosted/pub.dartlang.org/apple_maps_flutter-0.0.6+1/ios/Classes/FlutterMapView.swift:252:38: error: 'MKMetersBetweenMapPoints' has been replaced by instance method 'MKMapPoint.distance(to:)'
                distance = min(distance, MKMetersBetweenMapPoints(ptClosest, pt))
                                         ^~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~
                                         ptClosest.distance                  to:
    MapKit.MKMetersBetweenMapPoints:3:13: note: 'MKMetersBetweenMapPoints' was obsoleted in Swift 3
    public func MKMetersBetweenMapPoints(_ a: MKMapPoint, _ b: MKMapPoint) -> CLLocationDistance
                ^
    /Users/adithya/.pub-cache/hosted/pub.dartlang.org/apple_maps_flutter-0.0.6+1/ios/Classes/FlutterMapView.swift:261:16: error: 'MKMetersBetweenMapPoints' has been replaced by instance method 'MKMapPoint.distance(to:)'
            return MKMetersBetweenMapPoints(MKMapPointForCoordinate(coordA), MKMapPointForCoordinate(coordB))
                   ^~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                   MKMapPointForCoordinate(coordA).distance                  to:
    MapKit.MKMetersBetweenMapPoints:3:13: note: 'MKMetersBetweenMapPoints' was obsoleted in Swift 3
    public func MKMetersBetweenMapPoints(_ a: MKMapPoint, _ b: MKMapPoint) -> CLLocationDistance
                ^
    /Users/adithya/.pub-cache/hosted/pub.dartlang.org/apple_maps_flutter-0.0.6+1/ios/Classes/FlutterMapView.swift:261:41: error: 'MKMapPointForCoordinate' has been replaced by 'MKMapPoint.init(_:)'
            return MKMetersBetweenMapPoints(MKMapPointForCoordinate(coordA), MKMapPointForCoordinate(coordB))
                                            ^~~~~~~~~~~~~~~~~~~~~~~
                                            MKMapPoint
    MapKit.MKMapPointForCoordinate:3:13: note: 'MKMapPointForCoordinate' was obsoleted in Swift 3
    public func MKMapPointForCoordinate(_ coordinate: CLLocationCoordinate2D) -> MKMapPoint
                ^
    /Users/adithya/.pub-cache/hosted/pub.dartlang.org/apple_maps_flutter-0.0.6+1/ios/Classes/FlutterMapView.swift:261:74: error: 'MKMapPointForCoordinate' has been replaced by 'MKMapPoint.init(_:)'
            return MKMetersBetweenMapPoints(MKMapPointForCoordinate(coordA), MKMapPointForCoordinate(coordB))
                                                                             ^~~~~~~~~~~~~~~~~~~~~~~
                                                                             MKMapPoint
    MapKit.MKMapPointForCoordinate:3:13: note: 'MKMapPointForCoordinate' was obsoleted in Swift 3
    public func MKMapPointForCoordinate(_ coordinate: CLLocationCoordinate2D) -> MKMapPoint
                ^
    /Users/adithya/.pub-cache/hosted/pub.dartlang.org/apple_maps_flutter-0.0.6+1/ios/Classes/MapViewExtension.swift:142:22: error: 'MKCoordinateRegionMake' is unavailable in Swift
            let region = MKCoordinateRegionMake(centerCoordinate, span)
                         ^~~~~~~~~~~~~~~~~~~~~~
    MapKit.MKCoordinateRegionMake:2:13: note: 'MKCoordinateRegionMake' has been explicitly marked unavailable here
    public func MKCoordinateRegionMake(_ centerCoordinate: CLLocationCoordinate2D, _ span: MKCoordinateSpan) -> MKCoordinateRegion
                ^
    /Users/adithya/.pub-cache/hosted/pub.dartlang.org/apple_maps_flutter-0.0.6+1/ios/Classes/MapViewExtension.swift:184:16: error: 'MKCoordinateSpanMake' is unavailable in Swift
            return MKCoordinateSpanMake(latitudeDelta, longitudeDelta)
                   ^~~~~~~~~~~~~~~~~~~~
    MapKit.MKCoordinateSpanMake:2:13: note: 'MKCoordinateSpanMake' has been explicitly marked unavailable here
    public func MKCoordinateSpanMake(_ latitudeDelta: CLLocationDegrees, _ longitudeDelta: CLLocationDegrees) -> MKCoordinateSpan
                ^
    /Users/adithya/.pub-cache/hosted/pub.dartlang.org/apple_maps_flutter-0.0.6+1/ios/Classes/MapViewExtension.swift:210:24: error: 'MKMetersBetweenMapPoints' has been replaced by instance method 'MKMapPoint.distance(to:)'
            let distance = MKMetersBetweenMapPoints(MKMapPointForCoordinate(centerCoordinate), MKMapPointForCoordinate(topBottom))
                           ^~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                           MKMapPointForCoordinate(centerCoordinate).distance                  to:
    MapKit.MKMetersBetweenMapPoints:3:13: note: 'MKMetersBetweenMapPoints' was obsoleted in Swift 3
    public func MKMetersBetweenMapPoints(_ a: MKMapPoint, _ b: MKMapPoint) -> CLLocationDistance
                ^
    /Users/adithya/.pub-cache/hosted/pub.dartlang.org/apple_maps_flutter-0.0.6+1/ios/Classes/MapViewExtension.swift:210:49: error: 'MKMapPointForCoordinate' has been replaced by 'MKMapPoint.init(_:)'
            let distance = MKMetersBetweenMapPoints(MKMapPointForCoordinate(centerCoordinate), MKMapPointForCoordinate(topBottom))
                                                    ^~~~~~~~~~~~~~~~~~~~~~~
                                                    MKMapPoint
    MapKit.MKMapPointForCoordinate:3:13: note: 'MKMapPointForCoordinate' was obsoleted in Swift 3
    public func MKMapPointForCoordinate(_ coordinate: CLLocationCoordinate2D) -> MKMapPoint
                ^
    /Users/adithya/.pub-cache/hosted/pub.dartlang.org/apple_maps_flutter-0.0.6+1/ios/Classes/MapViewExtension.swift:210:92: error: 'MKMapPointForCoordinate' has been replaced by 'MKMapPoint.init(_:)'
            let distance = MKMetersBetweenMapPoints(MKMapPointForCoordinate(centerCoordinate), MKMapPointForCoordinate(topBottom))
                                                                                               ^~~~~~~~~~~~~~~~~~~~~~~
                                                                                               MKMapPoint
    MapKit.MKMapPointForCoordinate:3:13: note: 'MKMapPointForCoordinate' was obsoleted in Swift 3
    public func MKMapPointForCoordinate(_ coordinate: CLLocationCoordinate2D) -> MKMapPoint
                ^
    /Users/adithya/.pub-cache/hosted/pub.dartlang.org/apple_maps_flutter-0.0.6+1/ios/Classes/PolylineController.swift:65:21: error: 'add' has been renamed to 'addOverlay(_:)'
                mapView.add(polyline)
                        ^~~
                        addOverlay
    MapKit.MKMapView:66:15: note: 'add' was obsoleted in Swift 4.2
        open func add(_ overlay: MKOverlay)
                  ^
    /Users/adithya/.pub-cache/hosted/pub.dartlang.org/apple_maps_flutter-0.0.6+1/ios/Classes/PolylineController.swift:91:29: error: 'remove' has been renamed to 'removeOverlay(_:)'
                        mapView.remove(polyline)
                                ^~~~~~
                                removeOverlay
    MapKit.MKMapView:13:15: note: 'remove' was obsoleted in Swift 4.2
        open func remove(_ overlay: MKOverlay)
                  ^
    /Users/adithya/.pub-cache/hosted/pub.dartlang.org/apple_maps_flutter-0.0.6+1/ios/Classes/PolylineController.swift:98:17: error: 'remove' has been renamed to 'removeOverlay(_:)'
            mapView.remove(oldPolyline)
                    ^~~~~~
                    removeOverlay
    MapKit.MKMapView:13:15: note: 'remove' was obsoleted in Swift 4.2
        open func remove(_ overlay: MKOverlay)
                  ^
    /Users/adithya/.pub-cache/hosted/pub.dartlang.org/apple_maps_flutter-0.0.6+1/ios/Classes/PolylineController.swift:99:17: error: 'add' has been renamed to 'addOverlay(_:)'
            mapView.add(newPolyline)
                    ^~~
                    addOverlay
    MapKit.MKMapView:66:15: note: 'add' was obsoleted in Swift 4.2
        open func add(_ overlay: MKOverlay)
                  ^
    Command MergeSwiftModule failed with a nonzero exit code
    note: Using new build system
    note: Planning build
    note: Constructing build description

Could not build the precompiled application for the device.

Error launching application on Adithya's iPhone XS Max.
Exited (sigterm)

Here is the output of flutter doctor:

[✓] Flutter (Channel dev, v1.12.16, on Mac OS X 10.14.6 18G103, locale en-SG)
    • Flutter version 1.12.16 at /Users/adithya/Development/flutter
    • Framework revision 37f9c54116 (6 days ago), 2019-11-27 11:33:38 -0800
    • Engine revision fad1b23c42
    • Dart version 2.7.0

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/adithya/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • 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 11B53
    • CocoaPods version 1.7.5

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 41.1.2
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] VS Code (version 1.40.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.6.0

[✓] Connected device (2 available)
    • Chrome     • chrome     • web-javascript • Google Chrome 78.0.3904.108
    • Web Server • web-server • web-javascript • Flutter Tools

• No issues found!
LuisThein commented 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.

adithyaxx commented 4 years ago

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:

  1. Custom marker images are not working
  2. Polylines are not showing up
  3. Map gets stuck and I am unable to move the map after a few seconds of interaction. I am not sure exactly what sequence of events causes this and it seems to occur consistently with any type of action taken. Sometimes, programmatically moving the camera causes the map to become unresponsive to touch but camera update can still be triggered via a button. So from my observation the map only becomes unresponsive to manual interaction and never to programmatically triggered camera updates.
LuisThein commented 4 years ago

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 :)

adithyaxx commented 4 years ago

Refer to this example to demonstrate these issues better:

  1. 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
  1. It seems like polylines are working in the example that I put together so we can skip that for now.

  2. 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.

rodrigogalhardo commented 4 years ago

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.
LuisThein commented 4 years ago

Refer to this example to demonstrate these issues better:

  1. 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
  1. It seems like polylines are working in the example that I put together so we can skip that for now.
  2. 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!

LuisThein commented 4 years ago

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.

LuisThein commented 4 years ago

@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.

itsJoKr commented 4 years ago

@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?

LuisThein commented 4 years ago

The build issues should be fixed in the latest version. Please consider opening a new issue if this did not resolve your build issue.