Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: initialize messaging push module #178

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

mrehan27
Copy link
Contributor

part of: MBL-662

Changes

  • Updated pushMessaging to static property, allowing customers to access it without using instance
  • Initialized MessagingPush module in AppDelegate and NSE
  • Disabled push permission request on iOS app launch to align with Flutter Android and other platforms
  • Updated build sample apps workflow to configure CdpApiKey in iOS Env file and updated example iOS Env file

API Update

Before

CustomerIO.instance.pushMessaging.getRegisteredDeviceToken()

After

CustomerIO.pushMessaging.getRegisteredDeviceToken()

@mrehan27 mrehan27 self-assigned this Nov 21, 2024
@mrehan27 mrehan27 requested a review from Shahroz16 November 21, 2024 06:31
Copy link

github-actions bot commented Nov 21, 2024

Sample app builds 📱

Below you will find the list of the latest versions of the sample apps. It's recommended to always download the latest builds of the sample apps to accurately test the pull request.


  • amiapp_flutter: 178.1.0 (28869512)

requestAlertPermission: false,
requestBadgePermission: false,
requestSoundPermission: false,
);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated it to disable push permission on app launch

CustomerIOMessagingPushPlatform get pushMessaging => _pushMessaging;
static CustomerIOMessagingPushPlatform get pushMessaging {
if (_instance == null) {
throw StateError(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure we should be throwing here and crashing, probably just log maybe?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the same how we do for instance in feature branch. Since we need to return a non-null value, we unfortunately can't simply log and continue here.

@mrehan27 mrehan27 merged commit d66b25c into feature/data-pipelines-support Nov 25, 2024
6 checks passed
@mrehan27 mrehan27 deleted the rehan/mbl-662-push-init branch November 25, 2024 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants