-
Notifications
You must be signed in to change notification settings - Fork 8.9k
[notifications] showcase image attachments in notification-tester #36202
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
[notifications] showcase image attachments in notification-tester #36202
Conversation
6a5eda6
to
123dbbc
Compare
38f4523
to
0d8a6fd
Compare
0d8a6fd
to
5cf9915
Compare
@vonovak let me check if I understand this.
And finally adding What @bacons/apple-targets is? Is it a node-module? Should I add it on package.json? I don't see it added on your package-json, but I see it exists on https://www.npmjs.com/package/@bacons/apple-targets |
btw, one of the file contents says: /** @type {import('@bacons/apple-targets/app.plugin').ConfigFunction} */
module.exports = config => ({
type: "notification-service",
entitlements: { /* Add entitlements */ },
}); Should we actually add something inside that JSON ( |
} | ||
] | ||
], | ||
"@bacons/apple-targets" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not added as dependency. Should I add it in package.json
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, @bacons/apple-targets
will be added to package.json when you run npx create-target
as documented in https://github.com/EvanBacon/expo-apple-targets#-how-to-use
apps/notification-tester/targets/notification-service/NotificationService.swift
Show resolved
Hide resolved
apps/notification-tester/targets/notification-service/expo-target.config.js
Show resolved
Hide resolved
apps/notification-tester/targets/notification-service/generated.entitlements
Show resolved
Hide resolved
"userInterfaceStyle": "automatic", | ||
"newArchEnabled": true, | ||
"ios": { | ||
"appleTeamId": "C8D8QTF339", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace this with your own apple team id
Please consider taking a look at my last comment in #36462, before implementing this PR. |
Thank you :D implementation working for me on testflight |
Why
Note: I ended up concluding that the extra dependencies this requires are not worth adding into the repo for everyone consuming it, so I won't be merging at this time - but the way it's done is correct and will continue to work down the line. You can follow the instructions in this PR to integrate image support (and more) into your apps. Note that
npx create-target
is experimental and is documented outside of the official Expo docs.Showcase support for rich push notifications with images in the notification-tester app by implementing a Notification Service Extension for iOS. Android works out of the box.
This is in line with recently added support for images in Expo Notification Service backend expo/expo-server-sdk-node#147
Steps to follow
This requires development build, not Expo Go.
npx create-target
and choose "Notification Service" target from the prompt. This generates several files that you should check in to vcs. In this PR, all of the files at pathapps/notification-tester/targets/notification-service
were generated by this step.Test Plan
Checklist
npx expo prebuild
& EAS Build (eg: updated a module plugin).