Comments (3)
I'm also wondering this. I think the Payload will need to be updated to support live activities https://github.com/edamov/pushok/blob/master/src/Payload.php#L33
{
"aps": {
"timestamp": 1168364460,
"event": "update",
"relevance-score": 75.0,
"stale-date": 1650998941,
"content-state": {
"driverName": "Anne Johnson",
"estimatedDeliveryTime": 1659416400
},
"alert": {
"title": "Delivery Update",
"body": "Your pizza order will arrive soon.",
"sound": "example.aiff"
}
}
}
You can see the payload keys have expanded to include support for live activities:
https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/generating_a_remote_notification#2943363
So I imagine the new Payload would look something like this:
Payload::create()
->setTimestamp(Carbon::now()->timestamp)
->setEvent('update')
->setRelevanceScore(75.0)
->setStaleDate(Carbon::now()->addMinutes(60)->timestamp)
->setContentState([
'driverName' => 'Anne Johnson',
'estimatedDeliveryTime' => Carbon::now()->addMinutes(5)->timestamp
])
->setAlert($alert);
from pushok.
Correct - I actually hacked this in myself, but mine is more primitive as I created a new class called ContentState - but manually added the field names as they align with my app. Im sure it can be written to be dynamic and definable in the script code, but I didn't go that far.
from pushok.
It was added in 0.15.3
from pushok.
Related Issues (20)
- Support PHP 8
- Uncaught Exception HOT 3
- Package spomky-labs/jose is abandoned, you should avoid using it. Use web-token/jwt-framework instead. HOT 1
- Deprecation notices with PHP 8.1 HOT 4
- Question: Push Notifications for PkPass Updates HOT 8
- send a notification on a chosen date HOT 1
- Updating a badge HOT 1
- Support for creating WeatherKit JWT tokens
- The `Alert` option is set in the code but there is no Alert on the phone
- Package fgrosse/phpasn1 is abandoned HOT 2
- Started getting InvalidArgumentException "Unable to load the key." HOT 4
- Laravel Vapor - HTTP/2 stream 15 was not closed cleanly before end of the underlying stream HOT 3
- 0.15.x is no longer compatible with PHP 8.0 HOT 4
- HTTP/2 stream was not closed cleanly: REFUSED STREAM HOT 9
- Sending `Alert` as `Background` due to `content-available` set HOT 1
- php 8.0 via command package not installed
- Random "Send failure: Broken pipe" error
- Need to add custome key/value to aps HOT 2
- curl error when pusing to apns HOT 8
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 pushok.