Mappls setup
How to drive Mappls (MapmyIndia)'s official iOS SDK through MapConductor. It installs through Swift Package Manager and authenticates with configuration files you place in your app.
Before you start
Get your credentials
Register your app in the Mappls developer console and obtain its credentials. On iOS these are .i.conf / .i.olf configuration files, not a single API key.
Add the packages
Add Mappls's distribution repository and the MapConductor module through Swift Package Manager.
dependencies: [
.package(url: "https://github.com/mappls-api/mappls-map-ios-distribution.git", from: "6.1.5"),
.package(url: "https://github.com/MapConductor/ios-sdk-core", from: "1.3.1"),
.package(url: "https://github.com/MapConductor/ios-for-mappls", from: "1.0.0"),
]Add the authentication files
Include the .i.conf / .i.olf files you received from Mappls in your app bundle. MapConductor loads them before creating the map. Keep them out of source control.
VERIFY
What you should see
Show a map centred on Delhi. Tiles loading means you are done.
import SwiftUI
import MapConductorCore
import MapConductorForMappls
struct TestMappls: View {
@StateObject private var state = MapplsViewState(
mapDesignType: MapplsDesign.Default,
cameraPosition: MapCameraPosition(
position: GeoPoint(latitude: 28.6139, longitude: 77.2090),
zoom: 11
)
)
var body: some View {
MapplsMapView(state: state)
}
}Map designs
Troubleshooting
The map is blank and no tiles arrive
- Check that the credentials are set before the first map is created.
- Confirm the key is active in the Mappls console and you are within quota.
- Confirm the device can reach the network.
Switching style reports "style not found"
- StandardNight and GreyDay are paid add-ons. Without the entitlement, use Default or StandardDay.
Raster layers from non-Mappls URLs do not draw
- Mappls's native HTTP layer drops or truncates requests whose URL contains neither mappls nor mapmyindia. MapConductor works around this; replacing the SDK's HTTP module yourself removes the workaround.
Next
Markers, polylines, polygons, circles, ground images, raster layers and info bubbles all work through the shared API.