Modules

public extension Modules
  • Returns a factory for creating the FirebaseDispatcher.

    Firebase Analytics only supports a single shared instance, so only one FirebaseDispatcher can be active at a time. Firebase is configured automatically on first use. If you need to configure Firebase manually (e.g., for Crashlytics), call FirebaseApp.configure() before starting Tealium. See the Example app for both initialization approaches.

    Example:

     Modules.firebaseDispatcher(forcingSettings: { builder in
         builder
             .setSessionTimeout(30.minutes)
             .setMappings { mappings in
                 mappings.mapCommand(.logEvent)
                 mappings.mapFrom("tealium_event", to: .eventName)
                 mappings.mapFrom("total", to: .eventParam(AnalyticsParameterValue))
             }
     })
    

    Declaration

    Swift

    static func firebaseDispatcher(
        forcingSettings block: EnforcingSettings<FirebaseSettingsBuilder>? = { $0 }
    ) -> some ModuleFactory

    Parameters

    block

    A block used to provide programmatic settings. See EnforcingSettings. Pass nil to initialize this module only when some Local or Remote settings are provided. Omitting this parameter will initialize the module with its default settings.

  • Declaration

    Swift

    public extension Modules.Types