braze-inc / braze-flutter-sdk

Public repo for the Braze Flutter SDK
Other
15 stars 29 forks source link

Unused static in example app? #43

Closed RutgerVleuten closed 1 year ago

RutgerVleuten commented 1 year ago

In the AppDelegate of the example app static variable of type Braze (line 15) is never used.

hokstuff commented 1 year ago

Hi @RutgerVleuten,

The static variable braze in the sample app is intended to be an example to show how you can add customization in the iOS layer directly (e.g. by following these docs to add a delegate).

However, the braze instance is held in BrazePlugin.swift and the public APIs are already accessible via the braze_plugin.dart. If you do not want to do any customization in the iOS layer and wish to remove the static variable from your AppDelegate, that is up to you.

Thanks!

RutgerVleuten commented 1 year ago

Maybe I needed to add that the confusing part for me was that the same name was used for the let constant on line 34.

hokstuff commented 1 year ago

Ah, I see what you are referencing. The static braze instance isn't used or even set via

AppDelegate.braze = braze

and there is no example using BrazeInAppMessageUIDelegate, so it is confusing. I'll remove it from the sample app to avoid further confusion - thanks for pointing this out!

RutgerVleuten commented 1 year ago

@hokstuff, ticket has closed status while it's not implemented yet.

hokstuff commented 1 year ago

This change has been made internally and is scheduled in the next release, which will include a few other bugfixes (that are in progress) as well.