feat(notification): migrate from expo-notifications to JPush push service
Some checks failed
Frontend CI / build-and-push-web (push) Has started running
Frontend CI / ota-android (push) Has been cancelled
Frontend CI / build-android-apk (push) Has been cancelled

Replace expo-notifications with JPush for push notifications across the app.
This includes adding JPush native module dependencies, configuring the JPush
plugin in app.json, implementing jpushService wrapper, and updating notification
services to use JPush APIs. Also adds device registration on token refresh for
both mobile and web platforms.

BREAKING CHANGE: expo-notifications removed in favor of JPush for push notifications
This commit is contained in:
lafay
2026-04-27 23:21:08 +08:00
parent 0e4306c3ac
commit ba89b3dc94
13 changed files with 690 additions and 163 deletions

59
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "with_you",
"version": "0.0.1",
"version": "0.0.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "with_you",
"version": "0.0.1",
"version": "0.0.2",
"dependencies": {
"@expo/vector-icons": "^15.1.1",
"@react-native-async-storage/async-storage": "^2.2.0",
@@ -31,7 +31,6 @@
"expo-intent-launcher": "~55.0.9",
"expo-linear-gradient": "^55.0.8",
"expo-media-library": "~55.0.9",
"expo-notifications": "^55.0.10",
"expo-router": "^55.0.4",
"expo-sqlite": "~55.0.10",
"expo-status-bar": "~55.0.4",
@@ -39,6 +38,8 @@
"expo-task-manager": "~55.0.9",
"expo-updates": "^55.0.12",
"expo-video": "^55.0.10",
"jcore-react-native": "^2.3.5",
"jpush-react-native": "^3.2.6",
"katex": "^0.16.42",
"markdown-it": "^14.1.1",
"prismjs": "^1.30.0",
@@ -4357,12 +4358,6 @@
"@babel/core": "^7.0.0"
}
},
"node_modules/badgin": {
"version": "1.2.3",
"resolved": "https://registry.npmmirror.com/badgin/-/badgin-1.2.3.tgz",
"integrity": "sha512-NQGA7LcfCpSzIbGRbkgjgdWkjy7HI+Th5VLxTJfW5EeaAf3fnS+xWQaQOCYiny+q6QSvxqoSO04vCx+4u++EJw==",
"license": "MIT"
},
"node_modules/balanced-match": {
"version": "4.0.4",
"resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-4.0.4.tgz",
@@ -5522,15 +5517,6 @@
}
}
},
"node_modules/expo-application": {
"version": "55.0.10",
"resolved": "https://registry.npmmirror.com/expo-application/-/expo-application-55.0.10.tgz",
"integrity": "sha512-5ccf+S6hsQz+doi907TOJxKzV5AKgAgw004z4FoDWSoGhfab0LUPg6uyvOspuU4cbNvqw8EAy08hZbVO8nKc9Q==",
"license": "MIT",
"peerDependencies": {
"expo": "*"
}
},
"node_modules/expo-asset": {
"version": "55.0.10",
"resolved": "https://registry.npmmirror.com/expo-asset/-/expo-asset-55.0.10.tgz",
@@ -5845,24 +5831,6 @@
"react-native": "*"
}
},
"node_modules/expo-notifications": {
"version": "55.0.13",
"resolved": "https://registry.npmmirror.com/expo-notifications/-/expo-notifications-55.0.13.tgz",
"integrity": "sha512-vbtSBcMkYtNTO+6WKdeOzysOqvtmiq/sQrUKJpYcB75m9hBFcAfI2klpXdUiGg5kMr/ygBmFENSolQt1B9QY8A==",
"license": "MIT",
"dependencies": {
"@expo/image-utils": "^0.8.12",
"abort-controller": "^3.0.0",
"badgin": "^1.1.5",
"expo-application": "~55.0.10",
"expo-constants": "~55.0.8"
},
"peerDependencies": {
"expo": "*",
"react": "*",
"react-native": "*"
}
},
"node_modules/expo-router": {
"version": "55.0.7",
"resolved": "https://registry.npmmirror.com/expo-router/-/expo-router-55.0.7.tgz",
@@ -7353,6 +7321,15 @@
"node": ">=8"
}
},
"node_modules/jcore-react-native": {
"version": "2.3.5",
"resolved": "https://registry.npmmirror.com/jcore-react-native/-/jcore-react-native-2.3.5.tgz",
"integrity": "sha512-rxkDPGiSyNVHjNibUGeqFaV07PbMqKZnoHJa0srt002QGUH4/9K4Ux2tK0EkqHLFvGFsJqGWwjaxEqQIPvoPTA==",
"license": "ISC",
"peerDependencies": {
"react-native": ">= 0.60"
}
},
"node_modules/jest-environment-node": {
"version": "29.7.0",
"resolved": "https://registry.npmmirror.com/jest-environment-node/-/jest-environment-node-29.7.0.tgz",
@@ -7558,6 +7535,16 @@
"@sideway/pinpoint": "^2.0.0"
}
},
"node_modules/jpush-react-native": {
"version": "3.2.6",
"resolved": "https://registry.npmmirror.com/jpush-react-native/-/jpush-react-native-3.2.6.tgz",
"integrity": "sha512-dnrdfwsZcAYsQLknVMRMFml/f5cDUFlVKaqpgN41au+g2lxYvPyY7v15XZbNiMdnAjzzVgPhmUW8kuptkLtDXw==",
"license": "ISC",
"peerDependencies": {
"jcore-react-native": ">= 1.9.3",
"react-native": ">= 0.50"
}
},
"node_modules/js-tokens": {
"version": "4.0.0",
"resolved": "https://registry.npmmirror.com/js-tokens/-/js-tokens-4.0.0.tgz",