Comments (9)
I think I know what me the issue you reported, will check later today.
from flutter-apns.
Please check on latest prelease (1.5.0-dev.1). Note that this must be tested in release mode, otherwise app will just crash on start (known bug flutter/flutter#67624 (comment)).
from flutter-apns.
Please check on latest prelease (1.5.0-dev.1)
Hi, I'm testing this version right now. When app is in foreground payload.data.entries.first.key
and payload.data.entries.first.value
do work - I have access to the data, but when going from background to foreground with onResume
, these fields are empty: in logs actionIdentifier:com.apple.UNNotificationDefaultActionIdentifier
instead of real data.
BTW How can I access data in apns 1.5.0+ as in earlier versions: something like this: message['aps']['alert']['body']
?
from flutter-apns.
BTW How can I access data in apns 1.5.0+ as in earlier versions: something like this: message['aps']['alert']['body']?
That's not possible, because firebase_messaging on Android side has discarded Map<String, dynamic> in favor of RemoteMessage object. But you should be able to get body parameter with payload.notification.body
from flutter-apns.
That's not possible, because firebase_messaging on Android side has discarded Map<String, dynamic> in favor of RemoteMessage object. But you should be able to get body parameter with
payload.notification.body
Thanks, it works. Also for subtitle, sound, badge etc via payload.notification.apple
I'm quite new to all this firebase stuff, so it's not clear - I'm using iOS, so should I switch to flutter_apns_only
?
from flutter-apns.
For most use cases I recommend using flutter_apns. If you are not supporting Android, or want to have custom notification handling there, you can go with flutter_apns_only.
from flutter-apns.
Checked the issue, I think the problem is on your side. You are logging payload.data.entries.first
but there may be more entries, so just log entire payload.data
map.
Adding actionIdentifier to the data map was the easiest way to pass additional information inside RemoteMessage object, the downside is that you will see more data entries than expected.
from flutter-apns.
Checked the issue, I think the problem is on your side. You are logging
payload.data.entries.first
but there may be more entries, so just log entirepayload.data
map.
Double checked - I've looked at wrong output in console, so no issues :) Works fine in foreground, background, locked states.
Thanks!
from flutter-apns.
@moreirawebmaster you can of course re-open the issue if your report wasn't resolved with our update. Thank you.
from flutter-apns.
Related Issues (20)
- onMessage does not get called on iOS HOT 1
- firebase_messaging update to version 13.0.2 HOT 2
- [iOS] onResume callback get called when the app receiving the remote notification in background mode HOT 2
- onBackgroundMessage Is monitoring acceptable? HOT 4
- how to sv it
- Update dependencies
- firebase_messaging version HOT 2
- Support for Critical Alerts? HOT 1
- Please keep maintaining the apns-only package
- Taking over the package. HOT 7
- "No onBackgroundMessage handler has been registered" after upgrade to 1.5.1 HOT 1
- Can not get result of notification permission prompt on iOS HOT 1
- Gather this is dead now? HOT 1
- Version 1.5.2 on pub.dev seems to have a breaking change HOT 2
- InvalidToken and InvalidRegistration on iOS, token valid on Android HOT 4
- It's not triggered if app is terminated.. HOT 1
- reinstall there is cache HOT 2
- Are VOIP push notifications possible with this library? HOT 1
- firebase_messaging update to version 12.0.0 HOT 3
- flutter_apns will casue error when initializing Firebase HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter-apns.