Quickstart
Follow these steps to have a basic integration of the app's miles® SDK in your iOS application.
Last updated
Follow these steps to have a basic integration of the app's miles® SDK in your iOS application.
Last updated
iOS Quickstart
Estimated time: 20 minutes
This guide will go over:
Conditions and minimum requirements
Installation 📦
Configuration ⚙️
Initialization ⚡
Attaching 🔗
Minimum iOS version : 10.0 Minimum Xcode version : 10
Last version : 6.3.1
In your Xcode project, select your project then the tab Swift Packages, Click on + button
Add APM swift package
Git : https://gitlab.appsmiles.eu/appsmiles/APMSpecs.git
https://gitlab.appsmiles.eu is a private repository, you need a login and a password Contact us to get a login and password
Select exact version for more control
Select product and target
You can see 3 packages added to your project
The APM SDK for iOS provides many functionalities, UI components and countless customization options at a high performance, requiring somewhat more storage space than a simpler framework would. Nonetheless, the SDK contributes only 4 MB to the final size of your application, thanks to various optimization steps that occur during the compilation and App Store submission processes
You can initialize SDK APM in your :
SwiftUI App
UIKit App Delegate
In YourApp.swift, in the method init(), retrieve an instance of APM and init the SDK with your credentials environments
You can declare multiple environments using the bundle identifier or you can specifically declare environments with the appId variable.
In YourAppDelegate.swift, in the method application:didFinishLaunchingWithOptions, retrieve an instance of APM and init the SDK with your credentials environments
Environment | URL |
PRODUCTION | https://api-prod1.appsmiles.eu/ |
SANDBOX | https://api-sb.appsmiles.eu/ |
We host projects on multiple servers, double check with us or your team to verify the base URL
Add the following methods in your GlobalView
onAppear
onDisappear
You can extend your GlobalViewController with APMClientViewController or APMClientNavigationController or APMClientTabBarController
Add the following methods in your GlobalViewController
viewDidLoad:controller;
viewWillAppear:controller;
viewDidAppear:controller;
viewWillDisappear:controller;
viewDidDisappear:controller;
You're done with the installation !
Head to the next section to start integrating our SDK into your app's features.