For the complete documentation index, see llms.txt. This page is also available as Markdown.

Firebase

The Firebase dispatcher automatically dispatches events to the Firebase SDK, including UTM tags when they are available.

https://github.com/BatchLabs/Batch-iOS-firebase-dispatcher.git
Podfile
pod 'BatchFirebaseDispatcher'
github "BatchLabs/Batch-iOS-firebase-dispatcher"

Don't forget to register the dispatcher:

@import BatchFirebaseDispatcher

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
    
    func application(_ application: UIApplication,
                     didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        BatchEventDispatcher.add(BatchFirebaseDispatcher.instance())
        
        [...]

        BatchSDK.start(withAPIKey: "YOUR_API_KEY")
        return true
    }
}

// MYAppDelegate.h

@interface MYAppDelegate : UIResponder <UIApplicationDelegate>

[...]

@end

// MYAppDelegate.m

@import BatchFirebaseDispatcher;

@implementation MYAppDelegate

- (BOOL)application:(UIApplication *)application 
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    [BatchEventDispatcher addDispatcher:[BatchFirebaseDispatcher instance]];

    [...]

    [BatchSDK startWithAPIKey:@"MY_API_KEY"];
    return YES;
}

@end

Last updated