Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ios/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
*.swp
profile

.build/
.swiftpm/
DerivedData/
build/
GeneratedPluginRegistrant.h
Expand Down
Empty file removed ios/Assets/.gitkeep
Empty file.
4 changes: 0 additions & 4 deletions ios/Classes/AppleMapsFlutterPlugin.h

This file was deleted.

8 changes: 0 additions & 8 deletions ios/Classes/AppleMapsFlutterPlugin.m

This file was deleted.

4 changes: 2 additions & 2 deletions ios/apple_maps_flutter.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ A new flutter plugin project.
s.license = { :file => '../LICENSE' }
s.author = { 'Your Company' => '[email protected]' }
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.public_header_files = 'Classes/**/*.h'
s.source_files = 'apple_maps_flutter/Sources/apple_maps_flutter/**/*'
s.public_header_files = 'apple_maps_flutter/Sources/apple_maps_flutter/**/*.h'
s.dependency 'Flutter'

s.ios.deployment_target = '9.0'
Expand Down
23 changes: 23 additions & 0 deletions ios/apple_maps_flutter/Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// swift-tools-version: 5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "apple_maps_flutter",
platforms: [
.iOS("9.0"),
],
products: [
.library(
name: "apple-maps-flutter",
targets: ["apple_maps_flutter"]
)
],
dependencies: [],
targets: [
.target(
name: "apple_maps_flutter"
)
]
)
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
//

import Foundation
import Flutter
import UIKit

enum IconType {
case PIN, MARKER, CUSTOM_FROM_ASSET, CUSTOM_FROM_BYTES
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import Foundation
import MapKit
import Flutter

class FlutterAnnotation: NSObject, MKAnnotation {
@objc dynamic var coordinate: CLLocationCoordinate2D
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import Foundation
import MapKit
import Flutter

protocol ZPositionableAnnotation {
var stickyZPosition: CGFloat {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import Flutter
import UIKit

public class SwiftAppleMapsFlutterPlugin: NSObject, FlutterPlugin {
public class AppleMapsFlutterPlugin: NSObject, FlutterPlugin {
var factory: AppleMapViewFactory
public init(with registrar: FlutterPluginRegistrar) {
factory = AppleMapViewFactory(withRegistrar: registrar)
registrar.register(factory, withId: "apple_maps_plugin.luisthein.de/apple_maps", gestureRecognizersBlockingPolicy:FlutterPlatformViewGestureRecognizersBlockingPolicyWaitUntilTouchesEnded)
}

public static func register(with registrar: FlutterPluginRegistrar) {
registrar.addApplicationDelegate(SwiftAppleMapsFlutterPlugin(with: registrar))
registrar.addApplicationDelegate(AppleMapsFlutterPlugin(with: registrar))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import Foundation
import MapKit
import Flutter

public class AppleMapController: NSObject, FlutterPlatformView {
var contentView: UIView
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

import Foundation
import Flutter

public class AppleMapViewFactory: NSObject, FlutterPlatformViewFactory {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import Foundation
import MapKit
import CoreLocation
import Flutter

enum BUTTON_IDS: Int {
case LOCATION = 100
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import Foundation
import MapKit
import Flutter

class TouchHandler {

Expand Down