braze-inc / braze-flutter-sdk

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

[Feature]: Add push notification code into sample app #42

Closed ghost closed 5 months ago

ghost commented 1 year ago

Hi, the sample codes on Github and the document codes on the website are different, which one should we refer to?

Github : AppDelegate.swift Document: AppDelegate.swift

mahmoud-habashy commented 1 year ago

i tried the sample code, the content card doesn't show up and when using documentation code app doesn't build.

hokstuff commented 1 year ago

Hi @furkan-vatandas,

Thanks for raising this! We have an internal task to update the Flutter documentation on our Braze website and will change that soon. For now, please reference the Runner sample app code in Github for an example integration to follow.

@mahmoud-habashy Have you added a content cards subscription like done in the sample app? This will pass any received Content card data models from the iOS host app -> iOS braze_plugin -> Dart braze_plugin.

ghost commented 1 year ago

Thanks, I will check that. So, how do we initialize notification definitions?

hokstuff commented 1 year ago

Push notifications will need to be integrated in the native layer. You can reference this for iOS push integration docs and here for more general links to our migration guides for the iOS Swift migration.

ghost commented 1 year ago

Can you add the implementation of the notification system in the native layer to the flutter sample project?

hokstuff commented 1 year ago

We are currently tracking this request internally and will note on this thread with any updates. Thanks!

followthemoney1 commented 1 year ago

@hokstuff could you notify in this thread when this will be done?

smn-snkl commented 10 months ago

Same here. Tried to follow native integration part but not receiving any push notifications at this point ... Don't know what's happening

spaluchiewicz commented 8 months ago

The issue can be related to different way of Braze initialisation:

PushNotifications documentation for Flutter redirects to iOS documentation and here issue can be introduced.

hokstuff commented 7 months ago

Hi all,

We just released Flutter version 7.0.0 which updates the sample app to integrate push notifications (iOS and Android) as well as support for deep links, universal links (iOS), and app links (Android). For the iOS push integration, it takes advantage of the Swift SDK's Push Automation feature (see sample code in this file), which allows the majority of the iOS push integration to be automated via setting a configuration.

Let us know if you have any further issues - thanks!