Links

iOS SDK Setup

1. Requirements

Can be used with other push solutions!

To use FlareLane with other push solutions, you must follow some additional steps. Refer to iOS: Disable Swizzling for details.
  • Sign up to FlareLane and create a project

2. Setup a Certificate

Follow this guide below:

3. Install SDK using CocoaPods

  1. 1.
    Make sure you have CocoaPods installed in your Xcode project
  2. 2.
    At the top of the Podfile, enter platform :ios, '11.0' or higher than version 11
  3. 3.
    Add the following code to your Podfile
Podfile
target 'YOUR_PROJECT_NAME' do
// Add the code below
pod 'FlareLane'
end
  1. 4.
    Run pod install in the terminal
  2. 5.
    Run the Xcode project by opening the <YOUR_PROJECT_NAME>.xcworkspace

4. Add Capability

  1. 1.
    Enter 11.0 or higher as Deployment Target of the PROJECT
  2. 2.
    Enter 11.0 or higher as Minimum Deployments of the TARGET
  3. 3.
    Go to Signing & Capabilities and click + Capability and add Push Notifications
Only accounts that have enrolled in the Apple Developer Program can add the Push Notification Capability.

5. Add Initialization Code

SwiftUI vs Storyboard: What is the User Interface of our project?
If set to SwiftUI, go to 4-1
If set to Storyboard, go to 4-2.
Add the following code. You can check your project ID at FlareLane console's Project.

5-1. SwiftUI

Since AppDelegate.swift is not created in the SwiftUI project, the file needs to be created first.
Create a new AppDelegate.swift file and add some code to <YOUR_PROJECT_NAME>App.swift file.
(new)AppDelegate.swift
<YOUR_PROJECT_NAME>App.swift
import FlareLane
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
FlareLane.initWithLaunchOptions(launchOptions, projectId: "<INPUT_YOUR_PROJECT_ID>")
return true
}
}
struct <YOUR_PROJECT_NAME>App: App {
// Add the code below
@UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
}

5-2. Storyboard

Switft(AppDelegate.swift)
Objective-C(AppDelegate.m)
import FlareLane
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Add the code below
FlareLane.initWithLaunchOptions(launchOptions, projectId: "<INPUT_YOUR_PROJECT_ID>")
}
}
@import FlareLane
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Add the code below
[FlareLane initWithLaunchOptions:launchOptions projectId:@"INPUT_YOUR_PROJECT_ID"];
}

6. Test

After completing all the steps, build and run your app. Devices that subscribe to push notifications will be automatically added to FlareLane console's All Devices.
Before actual deployment, be sure to verify that the push notifications are being received properly on the device and that the statistics are accurately recorded when the push notifications are clicked.

7. Advanced Settings

To customize notification icons, see below:
To use Journeys or Message Personalization, integrate custom data via SDK or API: