Skip to content

AppsFlyer Destination not initializing properly #98

@ClaireDavis

Description

@ClaireDavis

Hello - I'm attempting to migrate my app to use the latest analytics_flutter package, but when I try to add the appsflyer plugin, it doesn't initialize properly.

This is how I'm setting up my analytics client:

    analyticsClient = createClient(
      Configuration(
        _segmentWriteKey ?? '',
      ),
    )
      ..addPlugin(AppsFlyerDestination())
      ..addPlugin(PluginAdvertisingId());

Then when update is called in AppsFlyerDestination, the settings map is null so it returns early on line 24 of plugin_appsflyer.dart. Later when identify is called, there is a userId, but then line 61 throws an error because it's force unwrapping appsFlyer which was never set in update because of the early return.

How can I get this to work properly?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions