iOS SDK Setup
To use FlareLane with other push solutions, you must follow some additional steps. Refer to iOS: Disable Swizzling for details.
Follow this guide below:
- 1.Make sure you have CocoaPods installed in your Xcode project
- 2.At the top of the Podfile, enter platform
:ios, '11.0'
or higher than version 11 - 3.Add the following code to your
Podfile
Podfile
target 'YOUR_PROJECT_NAME' do
// Add the code below
pod 'FlareLane'
end
- 4.Run
pod install
in the terminal - 5.Run the Xcode project by opening the <YOUR_PROJECT_NAME>.xcworkspace
- 1.Enter 11.0 or higher as
Deployment Target
of the PROJECT - 2.Enter 11.0 or higher as
Minimum Deployments
of the TARGET - 3.Go to
Signing & Capabilities
and click+ Capability
and addPush Notifications
Only accounts that have enrolled in the Apple Developer Program can add the Push Notification Capability.

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.
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
}
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"];
}
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.
To customize notification icons, see below:
Last modified 3mo ago