Get Started with the iOS SDK Follow
The Meridian iOS SDK has all the tools you’ll need to build your own Meridian-powered app.
Once you’ve added maps, routes, and placemarks to the Meridian Editor, you can use the Meridian SDK to integrate that content into your Meridian-powered iOS app.
Go here to download the Meridian iOS SDK and Reference documentation.
Go here to download the latest version of the IOS SDK.
Once you’ve downloaded the SDK, be sure to open the
README.md
file. It explains how to get started.
The Meridian Samples App
The Meridian Samples app is included with the iOS SDK to demonstrate common Meridian features and workflows. The Samples app has the following Examples:
• General
◦How to show a basic unmodified map view controller
◦How to call MRMapViewDelegates
◦How to convert to and from the map coordinate system
◦How to programmatically change the visible map rect
◦How to show an embedded unmodified map view
• Apple Maps - How to switch between Apple Maps and Meridian Maps based on respective zoom level
• Map UI
◦ How to show/hide map loading indicator
◦ How to programmatically show/hide map placemarks & tags.
◦ How to show/hide map buttons
• Accessibility button (during directions only)
• Location button
• Overview button (Only if the current floor is not the default floor)
• Map picker button
◦ How to programmatically enable/disable the blue location annotation
• Triggers - how to start and stop triggers
• Annotations and Overlays
◦ How to add custom annotations
◦ How to programmatically select annotations
◦ How to customize placemark annotations
◦ How to customize annotations by returning an MRAnnotationView subclass
◦ How to add custom overlays
◦ How to use a custom MRAnnotationView Subclass
• Routes
◦ How to use various route API
◦ How to keep map view without frame and orientation change during direction mode
◦ How to customize the route path
◦ How to do manual routing
• Loading Placemarks
◦ How to make requests for placemarks from Meridian servers
◦ How to use the MRSearch API to search for Placemarks and Tags and display the results
◦ How to use the MRLocalSearch API to search for Placemarks based on the current location and display the results
• Friends - How to show friends on a map, as well as manage user-profiles and friend lists
• Asset Tracking
◦ Example usage of asset tracking subscriptions
◦ How to determine when Assets are close by via Bluetooth
• Bottom Sheet
◦ How to build a custom bottom sheet and show it in a custom MRMapViewController subclass
◦ How to display map view with the bottom sheet containing quick-search placemark icons.
◦ How to override the default quick-search icons by showing only defined facility type placemark icons
• Deep links - how to deeplink to a placemark
• Spotlight - how to show a placemark via spotlight search
Add the SDK to Xcode
In order to simplify using the Meridian SDK library with your Xcode iOS project, we’ve bundled the SDK into a universal iOS framework.
The Meridian SDK must be compiled with Xcode 11 or higher and iOS 11 or higher.
You can add the SDK to your project using CocoaPods, an Objective-C and Swift dependency manager.
Add the SDK with CocoaPods
Complete these steps to add the Meridian SDK to your iOS Xcode project with CocoaPods.
-
Install CocoaPods.
$ gem install cocoapods
-
CocoaPods uses a textfile named Podfile to list dependencies. In the Podfile, add:
pod 'MeridianSDK'
-
Install the dependencies.
$ pod install
-
CocoaPods creates an
.xcworkspace
file. Make sure you use this to access your Xcode project.
Add SDK without CocoaPods
Complete these steps to add the Meridian SDK to your iOS Xcode project without CocoaPods.
Don’t complete these steps if you’re using CocoaPods.
-
In your Xcode project, put the Meridian.framework folder into the Embedded Binaries section.
-
In Build Settings in the Other Linker Flags property, make sure the -ObjC flag has been added. If not, then add it.
Add Build Script
Add a new “Run Script Phase” in your app target’s “Build Phases” and paste the following in the Run Script text field:
bash "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/Meridian.framework/strip-frameworks.sh"
Configure the SDK
In order to access the Meridian classes, in the relevant source files, add the line:
#import <Meridian/Meridian.h>
The MeridianSamples project has an example of what your finished project structure should look like.
Before you start using the SDK’s features, you’ll need to configure the SDK for your project. To do this, create an instance of MRConfig and set it in your application:didFinishLaunchingWithOptions: method.
MRConfig \*config = [MRConfig new]; [Meridian configure:config];
Add a Meridian Token
Meridian uses token-based authentication. In order for your Meridian-powered app to communicate with the Editor, you’ll need to add a Meridian token to your didFinishLaunchingWithOptions
method:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) - Bool { // configure the Meridian SDK let config = MRConfig() config.applicationToken = "YOUR_EDITOR_TOKEN"
Comments
0 comments
Please sign in to leave a comment.