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

feat(notifications): Add remote notifications (DO NOT MERGE) #3744

Open
wants to merge 25 commits into
base: develop
Choose a base branch
from

Conversation

michaeljscript
Copy link
Collaborator

@michaeljscript michaeljscript commented Nov 18, 2024

Description / Change(s) / Related issue(s)

Add Android and iOS push notifications

TODO

  • Add environment for dev/nightly/prod on android
  • Add/investigate environment config for nightly/prod on iOS
  • Ensure iOS does not ask for notification permission after booting the app regardless of feature flag
Ticket

YV-119

"react-native-pager-view": "^6.2.0",
"react-native-paper": "4.12.8",
"react-native-permissions": "^3.8.0",
"react-native-permissions": "^5.2.1",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated to latest version

@@ -316,5 +319,14 @@
"compilerOptions": {
"module": "commonjs"
}
}
},
"reactNativePermissionsIOS": [
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is not specified in Podfile anymore

Comment on lines +31 to +33
filePath = [[NSBundle mainBundle] pathForResource:@"GoogleService-Info-Nightly" ofType:@"plist"];
} else {
filePath = [[NSBundle mainBundle] pathForResource:@"GoogleService-Info-Production" ofType:@"plist"];
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Notifications on iOS may need to be tested on nightly as iOS notifications don't work in dev mode

const unsubscribeFromForegroundMessage = messaging().onMessage((remoteMessage) => {
const {notification} = remoteMessage
if (notification && notification.title && notification.body) {
sendNotification({
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This will be refactored / changed in the UI task, as local notifications are just a toast messages instead of real notifications.

@michaeljscript
Copy link
Collaborator Author

michaeljscript commented Dec 20, 2024

@stackchain this PR is pretty much ready, but let's leave the PR there until we release 5.2.0 to avoid any merge conflicts or unnecessary reverts

@michaeljscript michaeljscript marked this pull request as ready for review December 20, 2024 11:18
@michaeljscript michaeljscript changed the title feat(notifications): Add remote notifications (WIP) feat(notifications): Add remote notifications (DO NOT MERGE) Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant