Docs / Setup / iOS / Apple MapKit
Apple MapKit setup
How to drive Apple's MapKit through MapConductor. No external dependency, no API key, no SDK initialisation — the least setup of any iOS provider.
PACKAGE
ios-for-mapkit
API KEY
None
MIN iOS
15.1
VIEW
MapKitMapView
Same provider, other platformsReact
Before you start
Xcode 15 or newer
A deployment target of iOS 15.1 or later
STEP 01
Add it with Swift Package Manager
MapKit ships with iOS, so there is no account, key or initialisation to arrange — you only add the package.
Package URLSwift Package Manager
https://github.com/MapConductor/ios-for-mapkit
Package.swiftSwift
dependencies: [
.package(url: "https://github.com/MapConductor/ios-sdk-core", from: "1.1.4"),
.package(url: "https://github.com/MapConductor/ios-for-mapkit", from: "1.0.0"),
],
targets: [
.target(
name: "YourApp",
dependencies: [
.product(name: "MapConductorCore", package: "ios-sdk-core"),
.product(name: "MapConductorForMapKit", package: "ios-for-mapkit"),
]
),
]STEP 02
Add the location permission (if needed)
If you use location, declare the purpose in Info.plist and request permission from the app.
Info.plistXML
<key>NSLocationWhenInUseUsageDescription</key> <string>We need your location to display on the map</string>
LocationManager.swiftSwift
import CoreLocation
final class LocationManager: NSObject, ObservableObject, CLLocationManagerDelegate {
private let manager = CLLocationManager()
override init() {
super.init()
manager.delegate = self
}
func requestPermission() {
manager.requestWhenInUseAuthorization()
}
}VERIFY
What you should see
The setup is complete when the map renders and zoom and pan work.
ContentView.swiftSwiftUI
import SwiftUI
import MapConductorCore
import MapConductorForMapKit
struct ContentView: View {
@StateObject var mapState = MapKitViewState(
mapDesignType: MapKitMapDesign.Standard,
cameraPosition: MapCameraPosition(
position: GeoPoint(latitude: 35.6812, longitude: 139.7671),
zoom: 12.0
)
)
var body: some View {
MapKitMapView(state: mapState)
.ignoresSafeArea()
}
}Map designs
MapKitMapDesign maps onto MKMapType.
MapKitMapDesign
Notes
Standard
The standard street map
Satellite
Satellite imagery
Hybrid
Satellite imagery with roads and labels
MutedStandard
A muted style meant as a backdrop for your own data
Troubleshooting
The map does not appear
- Check the deployment target is iOS 15.1 or later.
- Confirm MapConductorForMapKit is linked into your target.
The build fails
- Clean the build folder (Cmd+Shift+K).
- Delete ~/Library/Developer/Xcode/DerivedData and rebuild.
- Refresh the Swift Package Manager dependencies, and avoid mixing in CocoaPods.
Next
If you only target Apple platforms, this keeps your binary small — no extra SDK, no key. A MapKit JS provider is available on the Web too.