Announcing public preview of Azure Maps iOS SDK
From startups to large organizations, our customers in every industry use mapping and location-aware technology in their mobile solutions and Line-of-Business applications. It can be for mobile workforces, tracking assets (IoT), or as simple as helping a customer find your business (Store locator).
Azure Maps already has support for the Web and Android, but as of today, we are excited to announce the public preview of Azure Maps iOS SDK! With the Azure Maps iOS SDK, we make it easier for developers to integrate immersive mapping solutions in their mobile applications for the Apple ecosystem with the power of the Microsoft Cloud.
The Azure Maps iOS SDK has functional parity of the feature set in the Azure Maps Web SDK and Azure Maps Android SDK for easy cross-platform adoption. Like the Android SDK, our iOS SDK leverages the data-driven style expressions and supports vector tiles to provide the best user experience for customers' business logic and boost the performance of rendering massive data set.
Ease of development and maintenance
When working on a cross-platform solution, it is essential to reuse your Azure Maps knowledge across these different platforms without losing time in relearning. The Azure Maps team is proud to create a consistent developer experience across our Web, Android, and iOS offerings. Developers can easily add rich and performant map visualizations and geospatial experiences to their solutions across different platforms with the benefit of consistent code and low maintenance.
For example, the code below demonstrates adding a heat map layer to an Azure Map in Web, Android, and iOS projects. As a result, developers now can use almost identical code to develop mapping solutions and offer a consistent experience across these platforms.
Getting started
How to add Azure Maps to an iOS app you can read in the following steps:
Prerequisites
- Sign into the Azure portal. If you don't have an Azure subscription, create a free account before you begin.
- Make an Azure Maps account.
- Obtain a primary subscription key, also known as the primary key or the subscription key. For more information on authentication in Azure Maps, see manage authentication in Azure Maps.
- Download Xcode on the Mac App Store for free.
- The Azure Maps iOS SDK is distributed via the Swift Package Manager for this public preview.
Create a project in Xcode
First, create a new iOS App project. Complete these steps to create an Xcode project:
- Under File, select New -> Project.
- On the iOS tab, select App, and then choose Next.
- Enter app name, bundle id, and select Next.
See the Creating an Xcode Project for an App for more help with creating a new project.
Install the Azure Maps iOS SDK
The next step in building your application is to install the Azure Maps iOS SDK. Complete these steps to install the Azure Maps Control:
- Under Project setting’s Package Dependencies, click on + button to add package dependency.
- Inside the appeared dialog, in the search bar in the top right corner, insert https://github.com/Azure/azure-maps-ios-sdk-distribution.git, in Dependency rule version field, fill 1.0.0-pre.2 (We recommended to use Up to Next Major Version in the Dependency Rule)
- Wait until package gets resolved alongside its dependencies. Click on Add Package to complete the dependency setup.
Add the Map Control to the View
Now that we have the Azure Maps Control installed, we can use the Map Control in our project.
- Add custom UIView to the view controller.
- Select MapControl class from AzureMapsControl module
- In the AppDelegate.swift file you'll need to:
- add import for the Azure Maps SDK
- set your Azure Maps authentication information: Setting the authentication information on the AzureMaps class globally using the AzureMaps.configure(subscriptionKey:) or AzureMaps.configure(aadClient:aadAppId:aadTenant:) methods makes it so you won't have to add your authentication information on every view.
- Select the run button, or press CMD + R, to build your application. Xcode will take a few seconds to build the application. After the build is complete, you can test your application on the simulated iOS device.
Feedback
Visit the Azure Maps portal today to get started, and as always, we look forward to your feedback on our Tech Community site.
Published on:
Learn moreRelated posts
Introducing the Data-Bound Reference Layer in Azure Maps Visual for Power BI
Imagine managing a nationwide sales team and needing to understand how your sales align with factors like population density, competitor locat...
Enhance Azure Maps with Overture Maps Data using PMTiles!
Supercharge Azure Maps with Overture Maps Data using PMTiles! We’ve got some exciting news. Azure Maps now supports PMTiles! This me...
Where do I go if I have questions about Azure Maps?
As you might expect, just looking around on your own, or asking Co-pilot, you can find comprehensive help like Samples.AzureMaps.com, wit...
Tailor your Reference Layers in Azure Maps Visual for Power BI
We’re excited to share the latest enhancements to the Azure Maps visual in Power BI, designed to make your data visualization even mor...
Enhancing Logistics with Azure Maps and NVIDIA cuOpt for Multi-Itinerary Optimization
The logistics industry is always finding ways to optimize vehicle routing to enhance efficiency. The Vehicle Routing Problem (VRP) and Pickup ...
Introducing the Unified Azure Maps Experience
Microsoft has recently announced the unification of Bing Maps for Enterprise (BME) with Azure Maps, marking a remarkable advancement in their ...
Power BI Azure Maps Visual: Enhanced Reference Layer & Embedded Support
The Power BI Azure Maps visual has received a major update which includes an expansion of the reference layer and the addition of Power BI Emb...
Enhance your indoor maps with real-time map feature styling
The ability to dynamically update and visualize the state of rooms or areas within a building is critical to understanding the status of any b...
Dynamic Clustering Aggregation with Custom Styling in Bubble Layer
The Power BI Azure Maps visual allows you to create stunning geospatial visualizations with your data. Today, we are excited to announce a new...
HO HO HO Two Point OH!
You might notice some big changes have come to the North Pole experience at NORADSanta.ORG this year. Developer elves have implemented a...