1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-11-22 23:46:10 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

Compare commits

...

8 Commits

13 changed files with 705 additions and 472 deletions

View File

@@ -20,7 +20,8 @@
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#ffffff"
}
},
"package": "com.anonymous.expoUsePushy"
},
"web": {
"favicon": "./assets/favicon.png"

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1 @@
import { registerRootComponent } from 'expo';
import App from './App';
// registerRootComponent calls AppRegistry.registerComponent('main', () => App);
// It also ensures that whether you load the app in Expo Go or in a native build,
// the environment is set up appropriately
registerRootComponent(App);
import 'expo-router/entry';

View File

@@ -1,27 +1,50 @@
{
"name": "expousepushy",
"version": "1.0.0",
"main": "index.js",
"version": "1.0.0",
"scripts": {
"start": "expo start",
"reset-project": "node ./scripts/reset-project.js",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web"
"web": "expo start --web",
"lint": "expo lint"
},
"dependencies": {
"@expo/metro-runtime": "~4.0.1",
"expo": "~52.0.46",
"expo-status-bar": "~2.0.1",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-native": "0.76.9",
"react-native-update": "^10.30.3",
"react-native-web": "~0.19.13"
"@expo/vector-icons": "^14.1.0",
"@react-navigation/bottom-tabs": "^7.3.10",
"@react-navigation/elements": "^2.3.8",
"@react-navigation/native": "^7.1.6",
"expo": "~53.0.22",
"expo-blur": "~14.1.5",
"expo-constants": "~17.1.7",
"expo-font": "~13.3.2",
"expo-haptics": "~14.1.4",
"expo-image": "~2.4.0",
"expo-linking": "~7.1.7",
"expo-router": "~5.1.5",
"expo-splash-screen": "~0.30.10",
"expo-status-bar": "~2.2.3",
"expo-symbols": "~0.4.5",
"expo-system-ui": "~5.0.11",
"expo-web-browser": "~14.2.0",
"react": "19.0.0",
"react-dom": "19.0.0",
"react-native": "0.79.6",
"react-native-gesture-handler": "~2.24.0",
"react-native-reanimated": "~3.17.4",
"react-native-safe-area-context": "5.4.0",
"react-native-screens": "~4.11.1",
"react-native-update": "^10.34.4",
"react-native-web": "~0.20.0",
"react-native-webview": "13.13.5"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@types/react": "~18.3.12",
"typescript": "^5.3.3"
"@types/react": "~19.0.10",
"typescript": "~5.8.3",
"eslint": "^9.25.0",
"eslint-config-expo": "~9.2.0"
},
"private": true
}

View File

@@ -12,7 +12,7 @@
"react-native-paper": "^5.14.5",
"react-native-safe-area-context": "^5.6.1",
"react-native-svg": "^15.13.0",
"react-native-update": "^10.31.2",
"react-native-update": "^10.34.4",
"react-native-vector-icons": "^10.3.0",
},
"devDependencies": {
@@ -1430,7 +1430,7 @@
"react-native-svg": ["react-native-svg@15.13.0", "", { "dependencies": { "css-select": "^5.1.0", "css-tree": "^1.1.3", "warn-once": "0.1.1" }, "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-/YPK+PAAXg4T0x2d2vYPvqqAhOYid2bRKxUVT7STIyd1p2JxWmsGQkfZxXCkEFN7TwLfIyVlT5RimT91Pj/qXw=="],
"react-native-update": ["react-native-update@10.31.2", "", { "dependencies": { "nanoid": "^3.3.3", "react-native-url-polyfill": "^2.0.0" }, "peerDependencies": { "react": ">=16.8.0", "react-native": ">=0.59.0" } }, "sha512-doKTDyU/+6eN1jDswSh1HxnM9/XuxYFM65dLadsYVR+JvdLJ0PtbceSauthv4HYI3QXoeGaStkrRCaQAVKvp+w=="],
"react-native-update": ["react-native-update@10.34.4", "", { "dependencies": { "nanoid": "^3.3.3", "react-native-url-polyfill": "^2.0.0" }, "peerDependencies": { "react": ">=16.8.0", "react-native": ">=0.59.0" } }, "sha512-yuXlff7EMUDyp1js2NylOw9jT0sVXoc5rpaRhzoYYcwfQTQq1Qp53qpyupDuUj43MEv5ikfJ6xBd/iRpXuanNg=="],
"react-native-url-polyfill": ["react-native-url-polyfill@2.0.0", "", { "dependencies": { "whatwg-url-without-unicode": "8.0.0-3" }, "peerDependencies": { "react-native": "*" } }, "sha512-My330Do7/DvKnEvwQc0WdcBnFPploYKp9CYlefDXzIdEaA+PAhDYllkvGeEroEzvc4Kzzj2O4yVdz8v6fjRvhA=="],

View File

@@ -403,6 +403,8 @@
"-DFOLLY_NO_CONFIG",
"-DFOLLY_MOBILE=1",
"-DFOLLY_USE_LIBCPP=1",
"-DFOLLY_CFG_NO_COROUTINES=1",
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
);
OTHER_LDFLAGS = "$(inherited)";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
@@ -475,6 +477,8 @@
"-DFOLLY_NO_CONFIG",
"-DFOLLY_MOBILE=1",
"-DFOLLY_USE_LIBCPP=1",
"-DFOLLY_CFG_NO_COROUTINES=1",
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
);
OTHER_LDFLAGS = "$(inherited)";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";

View File

@@ -1835,7 +1835,7 @@ PODS:
- ReactCommon/turbomodule/core
- SocketRocket
- Yoga
- react-native-update (10.31.2):
- react-native-update (10.34.4):
- boost
- DoubleConversion
- fast_float
@@ -1854,7 +1854,7 @@ PODS:
- React-graphics
- React-ImageManager
- React-jsi
- react-native-update/RCTPushy (= 10.31.2)
- react-native-update/RCTPushy (= 10.34.4)
- React-NativeModulesApple
- React-RCTFabric
- React-renderercss
@@ -1866,7 +1866,7 @@ PODS:
- SocketRocket
- SSZipArchive
- Yoga
- react-native-update/RCTPushy (10.31.2):
- react-native-update/RCTPushy (10.34.4):
- boost
- DoubleConversion
- fast_float
@@ -2800,7 +2800,7 @@ SPEC CHECKSUMS:
React-Mapbuffer: 9d2434a42701d6144ca18f0ca1c4507808ca7696
React-microtasksnativemodule: 75b6604b667d297292345302cc5bfb6b6aeccc1b
react-native-safe-area-context: c6e2edd1c1da07bdce287fa9d9e60c5f7b514616
react-native-update: 7a05a78c6da651c1961b8407859f44bd0aa9b03a
react-native-update: 822780a6d3c8482d47ba50b5801ed295c0dfcaff
React-NativeModulesApple: 879fbdc5dcff7136abceb7880fe8a2022a1bd7c3
React-oscompat: 93b5535ea7f7dff46aaee4f78309a70979bdde9d
React-perflogger: 5536d2df3d18fe0920263466f7b46a56351c0510

View File

@@ -10,8 +10,7 @@
"test:e2e": "detox test --configuration android.emu.debug",
"lint": "eslint .",
"postinstall": "patch-package",
"apk": "cd android && ./gradlew assembleRelease",
"dev:harmony": "react-native bundle-harmony --dev"
"apk": "cd android && ./gradlew assembleRelease"
},
"dependencies": {
"form-data": "^4.0.4",
@@ -22,7 +21,7 @@
"react-native-paper": "^5.14.5",
"react-native-safe-area-context": "^5.6.1",
"react-native-svg": "^15.13.0",
"react-native-update": "^10.31.2",
"react-native-update": "^10.34.4",
"react-native-vector-icons": "^10.3.0"
},
"devDependencies": {

View File

@@ -1,6 +1,6 @@
{
"name": "react-native-update",
"version": "10.34.4",
"version": "10.34.7",
"description": "react-native hot update",
"main": "src/index",
"scripts": {

View File

@@ -105,18 +105,17 @@ Pod::Spec.new do |s|
# Conditionally add Expo dependency
if valid_expo_project
s.public_header_files = ['ios/ImportReact.h']
s.dependency 'ExpoModulesCore'
end
s.subspec 'RCTPushy' do |ss|
ss.source_files = ['ios/RCTPushy/**/*.{h,m,mm,c}',
ss.source_files = ['ios/**/*.{h,m,mm,c}',
'android/jni/hpatch.{h,c}',
'android/jni/HDiffPatch/libHDiffPatch/HPatch/*.{h,c}',
'android/jni/HDiffPatch/file_for_patch.{h,c}',
'android/jni/lzma/C/LzmaDec.{h,c}',
'android/jni/lzma/C/Lzma2Dec.{h,c}']
ss.public_header_files = ['ios/RCTPushy/**/*.h']
ss.public_header_files = ['ios/**/*.h']
end
# Conditionally add Expo subspec and check ExpoModulesCore version

1
react-native.config.js Normal file
View File

@@ -0,0 +1 @@
module.exports = {};

View File

@@ -110,8 +110,7 @@ export class Pushy {
this.clientType = clientType || 'Pushy';
this.options.server = SERVER_PRESETS[this.clientType];
// Initialize i18n based on clientType
i18n.setLocale(this.clientType === 'Pushy' ? 'zh' : 'en');
i18n.setLocale(options.locale ?? this.clientType === 'Pushy' ? 'zh' : 'en');
if (Platform.OS === 'ios' || Platform.OS === 'android') {
if (!options.appKey) {

View File

@@ -86,6 +86,7 @@ export interface ClientOptions {
appKey: string;
server?: UpdateServerConfig;
logger?: UpdateEventsLogger;
locale?: 'zh' | 'en';
updateStrategy?:
| 'alwaysAlert'
| 'alertUpdateAndIgnoreError'