Skip to content

notification feature#31

Merged
aryavenkatesan merged 1 commit into
mainfrom
naseerah/message-notifs
Jul 17, 2026
Merged

notification feature#31
aryavenkatesan merged 1 commit into
mainfrom
naseerah/message-notifs

Conversation

@naseerahkani

Copy link
Copy Markdown
Collaborator

#28

  • added notification feature
  • unable to test on simulator

Comment on lines +12 to +14
"engines": {
"node": "24"
},

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Node 24 is not a supported version for cloud functions as per Firebase docs https://firebase.google.com/docs/functions/manage-functions#set-node.js


// function to save the fcmtoken to firestore
// used by cloud function to send push notifications to the correct device
Future<void> _saveTokenToFirestore() async {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

FCM tokens never get cleared on signout, so a user will continue getting notifications for their account even after they've signed out

Comment on lines +110 to +112
// used by cloud function to send push notifications to the correct device
Future<void> _saveTokenToFirestore() async {
final uid = FirebaseAuth.instance.currentUser?.uid;

@naasanov naasanov Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Fails with the following logs. Likely due to missing push notifs capability in xcode configuration. Need to add in Xcode -> Runner -> Signing & Capabilities -> + Capability

flutter: FCM token attempt 1 failed: [firebase_messaging/apns-token-not-set] APNS token has not been received on the device yet. Please ensure the APNS token is available before calling `getAPNSToken()`.
flutter: FCM token attempt 2 failed: [firebase_messaging/apns-token-not-set] APNS token has not been received on the device yet. Please ensure the APNS token is available before calling `getAPNSToken()`.
flutter: FCM token attempt 3 failed: [firebase_messaging/apns-token-not-set] APNS token has not been received on the device yet. Please ensure the APNS token is available before calling `getAPNSToken()`.
flutter: FCM token attempt 4 failed: [firebase_messaging/apns-token-not-set] APNS token has not been received on the device yet. Please ensure the APNS token is available before calling `getAPNSToken()`.
flutter: FCM token attempt 5 failed: [firebase_messaging/apns-token-not-set] APNS token has not been received on the device yet. Please ensure the APNS token is available before calling `getAPNSToken()`.
flutter: Could not get FCM token after retries

@aryavenkatesan
aryavenkatesan merged commit 6c12661 into main Jul 17, 2026
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.

3 participants