mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-09-17 19:06:11 +08:00
Compare commits
41 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
49e585a561 | ||
![]() |
0e89b270cc | ||
![]() |
7c8e75587b | ||
![]() |
84fee71df6 | ||
![]() |
db548d03dd | ||
![]() |
fc82addd75 | ||
![]() |
90e7c00cf6 | ||
![]() |
eea7ff26f2 | ||
![]() |
684dc8267d | ||
![]() |
5786bf8132 | ||
![]() |
1bd5fbbc94 | ||
![]() |
cd2eb9417a | ||
![]() |
7d8730f590 | ||
![]() |
e3081a02db | ||
![]() |
ec8c475c54 | ||
![]() |
ac18785e50 | ||
![]() |
e80317415c | ||
![]() |
f5c307deca | ||
![]() |
b4feae292d | ||
![]() |
a1c2679427 | ||
![]() |
17ff366f51 | ||
![]() |
3c5792423e | ||
![]() |
d071fbfc2b | ||
![]() |
17dffa1eb5 | ||
![]() |
bcd61315e9 | ||
![]() |
f626cc1933 | ||
![]() |
4ba3f25972 | ||
![]() |
cd695b1ffb | ||
![]() |
37a1a5a18b | ||
![]() |
5a2ebf8df7 | ||
![]() |
95ba5f364b | ||
![]() |
841228c341 | ||
![]() |
93049f1e54 | ||
![]() |
a966655faf | ||
![]() |
a4052091e0 | ||
![]() |
ebb5defb10 | ||
![]() |
a509ff8e30 | ||
![]() |
59fcba15ee | ||
![]() |
c6f9bb20a1 | ||
![]() |
9e6c7ea769 | ||
![]() |
f461c8ddd2 |
10
.gitignore
vendored
10
.gitignore
vendored
@@ -1,7 +1,6 @@
|
|||||||
/.idea
|
.vscode
|
||||||
/node_modules
|
android/build
|
||||||
/android/build
|
android/obj
|
||||||
/android/obj
|
|
||||||
*.iml
|
*.iml
|
||||||
|
|
||||||
# OSX
|
# OSX
|
||||||
@@ -42,4 +41,5 @@ local.properties
|
|||||||
node_modules/
|
node_modules/
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
|
|
||||||
Example/**/update.json
|
Example/**/update.json
|
||||||
|
yarn-error.log
|
||||||
|
19
.npmignore
19
.npmignore
@@ -1,11 +1,11 @@
|
|||||||
/.idea
|
.babelrc
|
||||||
/.babelrc
|
.npmignore
|
||||||
/.npmignore
|
.eslintrc
|
||||||
/.eslintrc
|
.nvmrc
|
||||||
/.nvmrc
|
.travis.yml
|
||||||
/.travis.yml
|
Example
|
||||||
/Example
|
android/build
|
||||||
/android/build
|
.vscode
|
||||||
|
|
||||||
# OSX
|
# OSX
|
||||||
#
|
#
|
||||||
@@ -45,4 +45,5 @@ Example
|
|||||||
yarn.lock
|
yarn.lock
|
||||||
android/jni
|
android/jni
|
||||||
|
|
||||||
domains.json
|
domains.json
|
||||||
|
endpoints.json
|
@@ -1,75 +0,0 @@
|
|||||||
[ignore]
|
|
||||||
; We fork some components by platform
|
|
||||||
.*/*[.]android.js
|
|
||||||
|
|
||||||
; Ignore "BUCK" generated dirs
|
|
||||||
<PROJECT_ROOT>/\.buckd/
|
|
||||||
|
|
||||||
; Ignore polyfills
|
|
||||||
node_modules/react-native/Libraries/polyfills/.*
|
|
||||||
|
|
||||||
; These should not be required directly
|
|
||||||
; require from fbjs/lib instead: require('fbjs/lib/warning')
|
|
||||||
node_modules/warning/.*
|
|
||||||
|
|
||||||
; Flow doesn't support platforms
|
|
||||||
.*/Libraries/Utilities/LoadingView.js
|
|
||||||
|
|
||||||
[untyped]
|
|
||||||
.*/node_modules/@react-native-community/cli/.*/.*
|
|
||||||
|
|
||||||
[include]
|
|
||||||
|
|
||||||
[libs]
|
|
||||||
node_modules/react-native/Libraries/react-native/react-native-interface.js
|
|
||||||
node_modules/react-native/flow/
|
|
||||||
|
|
||||||
[options]
|
|
||||||
emoji=true
|
|
||||||
|
|
||||||
esproposal.optional_chaining=enable
|
|
||||||
esproposal.nullish_coalescing=enable
|
|
||||||
|
|
||||||
module.file_ext=.js
|
|
||||||
module.file_ext=.json
|
|
||||||
module.file_ext=.ios.js
|
|
||||||
|
|
||||||
munge_underscores=true
|
|
||||||
|
|
||||||
module.name_mapper='^react-native$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/react-native/react-native-implementation'
|
|
||||||
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/node_modules/react-native/\1'
|
|
||||||
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/Image/RelativeImageStub'
|
|
||||||
|
|
||||||
suppress_type=$FlowIssue
|
|
||||||
suppress_type=$FlowFixMe
|
|
||||||
suppress_type=$FlowFixMeProps
|
|
||||||
suppress_type=$FlowFixMeState
|
|
||||||
|
|
||||||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
|
|
||||||
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
|
|
||||||
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
|
|
||||||
|
|
||||||
[lints]
|
|
||||||
sketchy-null-number=warn
|
|
||||||
sketchy-null-mixed=warn
|
|
||||||
sketchy-number=warn
|
|
||||||
untyped-type-import=warn
|
|
||||||
nonstrict-import=warn
|
|
||||||
deprecated-type=warn
|
|
||||||
unsafe-getters-setters=warn
|
|
||||||
inexact-spread=warn
|
|
||||||
unnecessary-invariant=warn
|
|
||||||
signature-verification-failure=warn
|
|
||||||
deprecated-utility=error
|
|
||||||
|
|
||||||
[strict]
|
|
||||||
deprecated-type
|
|
||||||
nonstrict-import
|
|
||||||
sketchy-null
|
|
||||||
unclear-type
|
|
||||||
unsafe-getters-setters
|
|
||||||
untyped-import
|
|
||||||
untyped-type-import
|
|
||||||
|
|
||||||
[version]
|
|
||||||
^0.105.0
|
|
@@ -15,10 +15,12 @@ import com.android.build.OutputFile
|
|||||||
* // the name of the generated asset file containing your JS bundle
|
* // the name of the generated asset file containing your JS bundle
|
||||||
* bundleAssetName: "index.android.bundle",
|
* bundleAssetName: "index.android.bundle",
|
||||||
*
|
*
|
||||||
* // the entry file for bundle generation
|
* // the entry file for bundle generation. If none specified and
|
||||||
|
* // "index.android.js" exists, it will be used. Otherwise "index.js" is
|
||||||
|
* // default. Can be overridden with ENTRY_FILE environment variable.
|
||||||
* entryFile: "index.android.js",
|
* entryFile: "index.android.js",
|
||||||
*
|
*
|
||||||
* // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format
|
* // https://reactnative.dev/docs/performance#enable-the-ram-format
|
||||||
* bundleCommand: "ram-bundle",
|
* bundleCommand: "ram-bundle",
|
||||||
*
|
*
|
||||||
* // whether to bundle JS and assets in debug mode
|
* // whether to bundle JS and assets in debug mode
|
||||||
@@ -76,7 +78,6 @@ import com.android.build.OutputFile
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
project.ext.react = [
|
project.ext.react = [
|
||||||
entryFile: "index.js",
|
|
||||||
enableHermes: false, // clean and rebuild if changing
|
enableHermes: false, // clean and rebuild if changing
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -155,13 +156,15 @@ android {
|
|||||||
signingConfig signingConfigs.debug
|
signingConfig signingConfigs.debug
|
||||||
}
|
}
|
||||||
release {
|
release {
|
||||||
|
crunchPngs false
|
||||||
// Caution! In production, you need to generate your own keystore file.
|
// Caution! In production, you need to generate your own keystore file.
|
||||||
// see https://facebook.github.io/react-native/docs/signed-apk-android.
|
// see https://reactnative.dev/docs/signed-apk-android.
|
||||||
signingConfig signingConfigs.debug
|
signingConfig signingConfigs.debug
|
||||||
minifyEnabled enableProguardInReleaseBuilds
|
minifyEnabled enableProguardInReleaseBuilds
|
||||||
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
|
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// applicationVariants are e.g. debug, release
|
// applicationVariants are e.g. debug, release
|
||||||
applicationVariants.all { variant ->
|
applicationVariants.all { variant ->
|
||||||
variant.outputs.each { output ->
|
variant.outputs.each { output ->
|
||||||
@@ -180,8 +183,24 @@ android {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||||
|
//noinspection GradleDynamicVersion
|
||||||
implementation "com.facebook.react:react-native:+" // From node_modules
|
implementation "com.facebook.react:react-native:+" // From node_modules
|
||||||
|
|
||||||
|
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
|
||||||
|
|
||||||
|
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
|
||||||
|
exclude group:'com.facebook.fbjni'
|
||||||
|
}
|
||||||
|
|
||||||
|
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
|
||||||
|
exclude group:'com.facebook.flipper'
|
||||||
|
exclude group:'com.squareup.okhttp3', module:'okhttp'
|
||||||
|
}
|
||||||
|
|
||||||
|
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
|
||||||
|
exclude group:'com.facebook.flipper'
|
||||||
|
}
|
||||||
|
|
||||||
if (enableHermes) {
|
if (enableHermes) {
|
||||||
def hermesPath = "../../node_modules/hermes-engine/android/";
|
def hermesPath = "../../node_modules/hermes-engine/android/";
|
||||||
debugImplementation files(hermesPath + "hermes-debug.aar")
|
debugImplementation files(hermesPath + "hermes-debug.aar")
|
||||||
@@ -198,4 +217,4 @@ task copyDownloadableDepsToLibs(type: Copy) {
|
|||||||
into 'libs'
|
into 'libs'
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
|
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
|
@@ -0,0 +1,72 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
|
||||||
|
* directory of this source tree.
|
||||||
|
*/
|
||||||
|
package com.testhotupdate;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import com.facebook.flipper.android.AndroidFlipperClient;
|
||||||
|
import com.facebook.flipper.android.utils.FlipperUtils;
|
||||||
|
import com.facebook.flipper.core.FlipperClient;
|
||||||
|
import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
|
||||||
|
import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin;
|
||||||
|
import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin;
|
||||||
|
import com.facebook.flipper.plugins.inspector.DescriptorMapping;
|
||||||
|
import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
|
||||||
|
import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
|
||||||
|
import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
|
||||||
|
import com.facebook.flipper.plugins.react.ReactFlipperPlugin;
|
||||||
|
import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
|
||||||
|
import com.facebook.react.ReactInstanceManager;
|
||||||
|
import com.facebook.react.bridge.ReactContext;
|
||||||
|
import com.facebook.react.modules.network.NetworkingModule;
|
||||||
|
import okhttp3.OkHttpClient;
|
||||||
|
|
||||||
|
public class ReactNativeFlipper {
|
||||||
|
public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
|
||||||
|
if (FlipperUtils.shouldEnableFlipper(context)) {
|
||||||
|
final FlipperClient client = AndroidFlipperClient.getInstance(context);
|
||||||
|
|
||||||
|
client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
|
||||||
|
client.addPlugin(new ReactFlipperPlugin());
|
||||||
|
client.addPlugin(new DatabasesFlipperPlugin(context));
|
||||||
|
client.addPlugin(new SharedPreferencesFlipperPlugin(context));
|
||||||
|
client.addPlugin(CrashReporterPlugin.getInstance());
|
||||||
|
|
||||||
|
NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
|
||||||
|
NetworkingModule.setCustomClientBuilder(
|
||||||
|
new NetworkingModule.CustomClientBuilder() {
|
||||||
|
@Override
|
||||||
|
public void apply(OkHttpClient.Builder builder) {
|
||||||
|
builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
client.addPlugin(networkFlipperPlugin);
|
||||||
|
client.start();
|
||||||
|
|
||||||
|
// Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
|
||||||
|
// Hence we run if after all native modules have been initialized
|
||||||
|
ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
|
||||||
|
if (reactContext == null) {
|
||||||
|
reactInstanceManager.addReactInstanceEventListener(
|
||||||
|
new ReactInstanceManager.ReactInstanceEventListener() {
|
||||||
|
@Override
|
||||||
|
public void onReactContextInitialized(ReactContext reactContext) {
|
||||||
|
reactInstanceManager.removeReactInstanceEventListener(this);
|
||||||
|
reactContext.runOnNativeModulesQueueThread(
|
||||||
|
new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
client.addPlugin(new FrescoFlipperPlugin());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
client.addPlugin(new FrescoFlipperPlugin());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -14,7 +14,8 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
|
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
|
||||||
|
android:launchMode="singleTask"
|
||||||
android:windowSoftInputMode="adjustResize">
|
android:windowSoftInputMode="adjustResize">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
@@ -4,6 +4,7 @@ import android.app.Application;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import com.facebook.react.PackageList;
|
import com.facebook.react.PackageList;
|
||||||
import com.facebook.react.ReactApplication;
|
import com.facebook.react.ReactApplication;
|
||||||
|
import com.facebook.react.ReactInstanceManager;
|
||||||
import com.facebook.react.ReactNativeHost;
|
import com.facebook.react.ReactNativeHost;
|
||||||
import com.facebook.react.ReactPackage;
|
import com.facebook.react.ReactPackage;
|
||||||
import com.facebook.soloader.SoLoader;
|
import com.facebook.soloader.SoLoader;
|
||||||
@@ -50,23 +51,28 @@ public class MainApplication extends Application implements ReactApplication {
|
|||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
SoLoader.init(this, /* native exopackage */ false);
|
SoLoader.init(this, /* native exopackage */ false);
|
||||||
initializeFlipper(this); // Remove this line if you don't want Flipper enabled
|
initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads Flipper in React Native templates.
|
* Loads Flipper in React Native templates. Call this in the onCreate method with something like
|
||||||
|
* initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
|
||||||
*
|
*
|
||||||
* @param context
|
* @param context
|
||||||
|
* @param reactInstanceManager
|
||||||
*/
|
*/
|
||||||
private static void initializeFlipper(Context context) {
|
private static void initializeFlipper(
|
||||||
|
Context context, ReactInstanceManager reactInstanceManager) {
|
||||||
if (BuildConfig.DEBUG) {
|
if (BuildConfig.DEBUG) {
|
||||||
try {
|
try {
|
||||||
/*
|
/*
|
||||||
We use reflection here to pick up the class that initializes Flipper,
|
We use reflection here to pick up the class that initializes Flipper,
|
||||||
since Flipper library is not available in release mode
|
since Flipper library is not available in release mode
|
||||||
*/
|
*/
|
||||||
Class<?> aClass = Class.forName("com.facebook.flipper.ReactNativeFlipper");
|
Class<?> aClass = Class.forName("com.testhotupdate.ReactNativeFlipper");
|
||||||
aClass.getMethod("initializeFlipper", Context.class).invoke(null, context);
|
aClass
|
||||||
|
.getMethod("initializeFlipper", Context.class, ReactInstanceManager.class)
|
||||||
|
.invoke(null, context, reactInstanceManager);
|
||||||
} catch (ClassNotFoundException e) {
|
} catch (ClassNotFoundException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
} catch (NoSuchMethodException e) {
|
} catch (NoSuchMethodException e) {
|
||||||
|
@@ -2,17 +2,17 @@
|
|||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
ext {
|
ext {
|
||||||
buildToolsVersion = "28.0.3"
|
buildToolsVersion = "29.0.2"
|
||||||
minSdkVersion = 16
|
minSdkVersion = 21
|
||||||
compileSdkVersion = 28
|
compileSdkVersion = 29
|
||||||
targetSdkVersion = 28
|
targetSdkVersion = 29
|
||||||
}
|
}
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath('com.android.tools.build:gradle:3.5.1')
|
classpath('com.android.tools.build:gradle:3.5.3')
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
// in the individual module build.gradle files
|
// in the individual module build.gradle files
|
||||||
@@ -33,6 +33,6 @@ allprojects {
|
|||||||
|
|
||||||
google()
|
google()
|
||||||
jcenter()
|
jcenter()
|
||||||
maven { url 'https://jitpack.io' }
|
maven { url 'https://www.jitpack.io' }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -17,5 +17,12 @@
|
|||||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||||
# org.gradle.parallel=true
|
# org.gradle.parallel=true
|
||||||
|
|
||||||
|
# AndroidX package structure to make it clearer which packages are bundled with the
|
||||||
|
# Android operating system, and which are packaged with your app's APK
|
||||||
|
# https://developer.android.com/topic/libraries/support-library/androidx-rn
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
|
# Automatically convert third-party libraries to use AndroidX
|
||||||
android.enableJetifier=true
|
android.enableJetifier=true
|
||||||
|
|
||||||
|
# Version of flipper SDK to use with React Native
|
||||||
|
FLIPPER_VERSION=0.54.0
|
@@ -1,5 +1,5 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6-all.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
37
Example/testHotUpdate/android/gradlew
vendored
37
Example/testHotUpdate/android/gradlew
vendored
@@ -7,7 +7,7 @@
|
|||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
# You may obtain a copy of the License at
|
# You may obtain a copy of the License at
|
||||||
#
|
#
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
# https://www.apache.org/licenses/LICENSE-2.0
|
||||||
#
|
#
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
@@ -125,8 +125,8 @@ if $darwin; then
|
|||||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# For Cygwin, switch paths to Windows format before running java
|
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||||
if $cygwin ; then
|
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||||
@@ -154,19 +154,19 @@ if $cygwin ; then
|
|||||||
else
|
else
|
||||||
eval `echo args$i`="\"$arg\""
|
eval `echo args$i`="\"$arg\""
|
||||||
fi
|
fi
|
||||||
i=$((i+1))
|
i=`expr $i + 1`
|
||||||
done
|
done
|
||||||
case $i in
|
case $i in
|
||||||
(0) set -- ;;
|
0) set -- ;;
|
||||||
(1) set -- "$args0" ;;
|
1) set -- "$args0" ;;
|
||||||
(2) set -- "$args0" "$args1" ;;
|
2) set -- "$args0" "$args1" ;;
|
||||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
3) set -- "$args0" "$args1" "$args2" ;;
|
||||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -175,14 +175,9 @@ save () {
|
|||||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||||
echo " "
|
echo " "
|
||||||
}
|
}
|
||||||
APP_ARGS=$(save "$@")
|
APP_ARGS=`save "$@"`
|
||||||
|
|
||||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||||
|
|
||||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
exec "$JAVACMD" "$@"
|
||||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
|
||||||
cd "$(dirname "$0")"
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec "$JAVACMD" "$@"
|
|
7
Example/testHotUpdate/android/gradlew.bat
vendored
7
Example/testHotUpdate/android/gradlew.bat
vendored
@@ -5,7 +5,7 @@
|
|||||||
@rem you may not use this file except in compliance with the License.
|
@rem you may not use this file except in compliance with the License.
|
||||||
@rem You may obtain a copy of the License at
|
@rem You may obtain a copy of the License at
|
||||||
@rem
|
@rem
|
||||||
@rem http://www.apache.org/licenses/LICENSE-2.0
|
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||||
@rem
|
@rem
|
||||||
@rem Unless required by applicable law or agreed to in writing, software
|
@rem Unless required by applicable law or agreed to in writing, software
|
||||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
@@ -29,6 +29,9 @@ if "%DIRNAME%" == "" set DIRNAME=.
|
|||||||
set APP_BASE_NAME=%~n0
|
set APP_BASE_NAME=%~n0
|
||||||
set APP_HOME=%DIRNAME%
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
|
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||||
|
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||||
|
|
||||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||||
|
|
||||||
@@ -97,4 +100,4 @@ exit /b 1
|
|||||||
:mainEnd
|
:mainEnd
|
||||||
if "%OS%"=="Windows_NT" endlocal
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|
||||||
:omega
|
:omega
|
@@ -1,39 +1,20 @@
|
|||||||
platform :ios, '9.0'
|
require_relative '../node_modules/react-native/scripts/react_native_pods'
|
||||||
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
|
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
|
||||||
|
|
||||||
|
platform :ios, '10.0'
|
||||||
|
|
||||||
target 'testHotUpdate' do
|
target 'testHotUpdate' do
|
||||||
# Pods for testHotUpdate
|
config = use_native_modules!
|
||||||
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
|
|
||||||
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
|
|
||||||
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
|
|
||||||
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
|
|
||||||
pod 'React', :path => '../node_modules/react-native/'
|
|
||||||
pod 'React-Core', :path => '../node_modules/react-native/'
|
|
||||||
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
|
|
||||||
pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
|
|
||||||
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
|
|
||||||
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
|
|
||||||
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
|
|
||||||
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
|
|
||||||
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
|
|
||||||
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
|
|
||||||
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
|
|
||||||
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
|
|
||||||
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
|
|
||||||
pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
|
|
||||||
|
|
||||||
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
|
use_react_native!(:path => config["reactNativePath"])
|
||||||
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
|
|
||||||
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
|
|
||||||
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
|
|
||||||
pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"
|
|
||||||
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
|
|
||||||
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
|
|
||||||
|
|
||||||
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
|
# Enables Flipper.
|
||||||
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
|
#
|
||||||
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
|
# Note that if you have use_frameworks! enabled, Flipper will not work and
|
||||||
|
# you should disable these next few lines.
|
||||||
use_native_modules!
|
use_flipper!('Flipper' => '0.54.0')
|
||||||
|
post_install do |installer|
|
||||||
|
flipper_post_install(installer)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@@ -1,245 +1,348 @@
|
|||||||
PODS:
|
PODS:
|
||||||
- boost-for-react-native (1.63.0)
|
- boost-for-react-native (1.63.0)
|
||||||
|
- CocoaAsyncSocket (7.6.4)
|
||||||
|
- CocoaLibEvent (1.0.0)
|
||||||
- DoubleConversion (1.1.6)
|
- DoubleConversion (1.1.6)
|
||||||
- FBLazyVector (0.61.4)
|
- FBLazyVector (0.63.3)
|
||||||
- FBReactNativeSpec (0.61.4):
|
- FBReactNativeSpec (0.63.3):
|
||||||
- Folly (= 2018.10.22.00)
|
- Folly (= 2020.01.13.00)
|
||||||
- RCTRequired (= 0.61.4)
|
- RCTRequired (= 0.63.3)
|
||||||
- RCTTypeSafety (= 0.61.4)
|
- RCTTypeSafety (= 0.63.3)
|
||||||
- React-Core (= 0.61.4)
|
- React-Core (= 0.63.3)
|
||||||
- React-jsi (= 0.61.4)
|
- React-jsi (= 0.63.3)
|
||||||
- ReactCommon/turbomodule/core (= 0.61.4)
|
- ReactCommon/turbomodule/core (= 0.63.3)
|
||||||
- Folly (2018.10.22.00):
|
- Flipper (0.54.0):
|
||||||
|
- Flipper-Folly (~> 2.2)
|
||||||
|
- Flipper-RSocket (~> 1.1)
|
||||||
|
- Flipper-DoubleConversion (1.1.7)
|
||||||
|
- Flipper-Folly (2.2.0):
|
||||||
|
- boost-for-react-native
|
||||||
|
- CocoaLibEvent (~> 1.0)
|
||||||
|
- Flipper-DoubleConversion
|
||||||
|
- Flipper-Glog
|
||||||
|
- OpenSSL-Universal (= 1.0.2.19)
|
||||||
|
- Flipper-Glog (0.3.6)
|
||||||
|
- Flipper-PeerTalk (0.0.4)
|
||||||
|
- Flipper-RSocket (1.1.0):
|
||||||
|
- Flipper-Folly (~> 2.2)
|
||||||
|
- FlipperKit (0.54.0):
|
||||||
|
- FlipperKit/Core (= 0.54.0)
|
||||||
|
- FlipperKit/Core (0.54.0):
|
||||||
|
- Flipper (~> 0.54.0)
|
||||||
|
- FlipperKit/CppBridge
|
||||||
|
- FlipperKit/FBCxxFollyDynamicConvert
|
||||||
|
- FlipperKit/FBDefines
|
||||||
|
- FlipperKit/FKPortForwarding
|
||||||
|
- FlipperKit/CppBridge (0.54.0):
|
||||||
|
- Flipper (~> 0.54.0)
|
||||||
|
- FlipperKit/FBCxxFollyDynamicConvert (0.54.0):
|
||||||
|
- Flipper-Folly (~> 2.2)
|
||||||
|
- FlipperKit/FBDefines (0.54.0)
|
||||||
|
- FlipperKit/FKPortForwarding (0.54.0):
|
||||||
|
- CocoaAsyncSocket (~> 7.6)
|
||||||
|
- Flipper-PeerTalk (~> 0.0.4)
|
||||||
|
- FlipperKit/FlipperKitHighlightOverlay (0.54.0)
|
||||||
|
- FlipperKit/FlipperKitLayoutPlugin (0.54.0):
|
||||||
|
- FlipperKit/Core
|
||||||
|
- FlipperKit/FlipperKitHighlightOverlay
|
||||||
|
- FlipperKit/FlipperKitLayoutTextSearchable
|
||||||
|
- YogaKit (~> 1.18)
|
||||||
|
- FlipperKit/FlipperKitLayoutTextSearchable (0.54.0)
|
||||||
|
- FlipperKit/FlipperKitNetworkPlugin (0.54.0):
|
||||||
|
- FlipperKit/Core
|
||||||
|
- FlipperKit/FlipperKitReactPlugin (0.54.0):
|
||||||
|
- FlipperKit/Core
|
||||||
|
- FlipperKit/FlipperKitUserDefaultsPlugin (0.54.0):
|
||||||
|
- FlipperKit/Core
|
||||||
|
- FlipperKit/SKIOSNetworkPlugin (0.54.0):
|
||||||
|
- FlipperKit/Core
|
||||||
|
- FlipperKit/FlipperKitNetworkPlugin
|
||||||
|
- Folly (2020.01.13.00):
|
||||||
- boost-for-react-native
|
- boost-for-react-native
|
||||||
- DoubleConversion
|
- DoubleConversion
|
||||||
- Folly/Default (= 2018.10.22.00)
|
- Folly/Default (= 2020.01.13.00)
|
||||||
- glog
|
- glog
|
||||||
- Folly/Default (2018.10.22.00):
|
- Folly/Default (2020.01.13.00):
|
||||||
- boost-for-react-native
|
- boost-for-react-native
|
||||||
- DoubleConversion
|
- DoubleConversion
|
||||||
- glog
|
- glog
|
||||||
- glog (0.3.5)
|
- glog (0.3.5)
|
||||||
- RCTRequired (0.61.4)
|
- OpenSSL-Universal (1.0.2.19):
|
||||||
- RCTTypeSafety (0.61.4):
|
- OpenSSL-Universal/Static (= 1.0.2.19)
|
||||||
- FBLazyVector (= 0.61.4)
|
- OpenSSL-Universal/Static (1.0.2.19)
|
||||||
- Folly (= 2018.10.22.00)
|
- RCTRequired (0.63.3)
|
||||||
- RCTRequired (= 0.61.4)
|
- RCTTypeSafety (0.63.3):
|
||||||
- React-Core (= 0.61.4)
|
- FBLazyVector (= 0.63.3)
|
||||||
- React (0.61.4):
|
- Folly (= 2020.01.13.00)
|
||||||
- React-Core (= 0.61.4)
|
- RCTRequired (= 0.63.3)
|
||||||
- React-Core/DevSupport (= 0.61.4)
|
- React-Core (= 0.63.3)
|
||||||
- React-Core/RCTWebSocket (= 0.61.4)
|
- React (0.63.3):
|
||||||
- React-RCTActionSheet (= 0.61.4)
|
- React-Core (= 0.63.3)
|
||||||
- React-RCTAnimation (= 0.61.4)
|
- React-Core/DevSupport (= 0.63.3)
|
||||||
- React-RCTBlob (= 0.61.4)
|
- React-Core/RCTWebSocket (= 0.63.3)
|
||||||
- React-RCTImage (= 0.61.4)
|
- React-RCTActionSheet (= 0.63.3)
|
||||||
- React-RCTLinking (= 0.61.4)
|
- React-RCTAnimation (= 0.63.3)
|
||||||
- React-RCTNetwork (= 0.61.4)
|
- React-RCTBlob (= 0.63.3)
|
||||||
- React-RCTSettings (= 0.61.4)
|
- React-RCTImage (= 0.63.3)
|
||||||
- React-RCTText (= 0.61.4)
|
- React-RCTLinking (= 0.63.3)
|
||||||
- React-RCTVibration (= 0.61.4)
|
- React-RCTNetwork (= 0.63.3)
|
||||||
- React-Core (0.61.4):
|
- React-RCTSettings (= 0.63.3)
|
||||||
- Folly (= 2018.10.22.00)
|
- React-RCTText (= 0.63.3)
|
||||||
|
- React-RCTVibration (= 0.63.3)
|
||||||
|
- React-callinvoker (0.63.3)
|
||||||
|
- React-Core (0.63.3):
|
||||||
|
- Folly (= 2020.01.13.00)
|
||||||
- glog
|
- glog
|
||||||
- React-Core/Default (= 0.61.4)
|
- React-Core/Default (= 0.63.3)
|
||||||
- React-cxxreact (= 0.61.4)
|
- React-cxxreact (= 0.63.3)
|
||||||
- React-jsi (= 0.61.4)
|
- React-jsi (= 0.63.3)
|
||||||
- React-jsiexecutor (= 0.61.4)
|
- React-jsiexecutor (= 0.63.3)
|
||||||
- Yoga
|
- Yoga
|
||||||
- React-Core/CoreModulesHeaders (0.61.4):
|
- React-Core/CoreModulesHeaders (0.63.3):
|
||||||
- Folly (= 2018.10.22.00)
|
- Folly (= 2020.01.13.00)
|
||||||
- glog
|
- glog
|
||||||
- React-Core/Default
|
- React-Core/Default
|
||||||
- React-cxxreact (= 0.61.4)
|
- React-cxxreact (= 0.63.3)
|
||||||
- React-jsi (= 0.61.4)
|
- React-jsi (= 0.63.3)
|
||||||
- React-jsiexecutor (= 0.61.4)
|
- React-jsiexecutor (= 0.63.3)
|
||||||
- Yoga
|
- Yoga
|
||||||
- React-Core/Default (0.61.4):
|
- React-Core/Default (0.63.3):
|
||||||
- Folly (= 2018.10.22.00)
|
- Folly (= 2020.01.13.00)
|
||||||
- glog
|
- glog
|
||||||
- React-cxxreact (= 0.61.4)
|
- React-cxxreact (= 0.63.3)
|
||||||
- React-jsi (= 0.61.4)
|
- React-jsi (= 0.63.3)
|
||||||
- React-jsiexecutor (= 0.61.4)
|
- React-jsiexecutor (= 0.63.3)
|
||||||
- Yoga
|
- Yoga
|
||||||
- React-Core/DevSupport (0.61.4):
|
- React-Core/DevSupport (0.63.3):
|
||||||
- Folly (= 2018.10.22.00)
|
- Folly (= 2020.01.13.00)
|
||||||
- glog
|
- glog
|
||||||
- React-Core/Default (= 0.61.4)
|
- React-Core/Default (= 0.63.3)
|
||||||
- React-Core/RCTWebSocket (= 0.61.4)
|
- React-Core/RCTWebSocket (= 0.63.3)
|
||||||
- React-cxxreact (= 0.61.4)
|
- React-cxxreact (= 0.63.3)
|
||||||
- React-jsi (= 0.61.4)
|
- React-jsi (= 0.63.3)
|
||||||
- React-jsiexecutor (= 0.61.4)
|
- React-jsiexecutor (= 0.63.3)
|
||||||
- React-jsinspector (= 0.61.4)
|
- React-jsinspector (= 0.63.3)
|
||||||
- Yoga
|
- Yoga
|
||||||
- React-Core/RCTActionSheetHeaders (0.61.4):
|
- React-Core/RCTActionSheetHeaders (0.63.3):
|
||||||
- Folly (= 2018.10.22.00)
|
- Folly (= 2020.01.13.00)
|
||||||
- glog
|
- glog
|
||||||
- React-Core/Default
|
- React-Core/Default
|
||||||
- React-cxxreact (= 0.61.4)
|
- React-cxxreact (= 0.63.3)
|
||||||
- React-jsi (= 0.61.4)
|
- React-jsi (= 0.63.3)
|
||||||
- React-jsiexecutor (= 0.61.4)
|
- React-jsiexecutor (= 0.63.3)
|
||||||
- Yoga
|
- Yoga
|
||||||
- React-Core/RCTAnimationHeaders (0.61.4):
|
- React-Core/RCTAnimationHeaders (0.63.3):
|
||||||
- Folly (= 2018.10.22.00)
|
- Folly (= 2020.01.13.00)
|
||||||
- glog
|
- glog
|
||||||
- React-Core/Default
|
- React-Core/Default
|
||||||
- React-cxxreact (= 0.61.4)
|
- React-cxxreact (= 0.63.3)
|
||||||
- React-jsi (= 0.61.4)
|
- React-jsi (= 0.63.3)
|
||||||
- React-jsiexecutor (= 0.61.4)
|
- React-jsiexecutor (= 0.63.3)
|
||||||
- Yoga
|
- Yoga
|
||||||
- React-Core/RCTBlobHeaders (0.61.4):
|
- React-Core/RCTBlobHeaders (0.63.3):
|
||||||
- Folly (= 2018.10.22.00)
|
- Folly (= 2020.01.13.00)
|
||||||
- glog
|
- glog
|
||||||
- React-Core/Default
|
- React-Core/Default
|
||||||
- React-cxxreact (= 0.61.4)
|
- React-cxxreact (= 0.63.3)
|
||||||
- React-jsi (= 0.61.4)
|
- React-jsi (= 0.63.3)
|
||||||
- React-jsiexecutor (= 0.61.4)
|
- React-jsiexecutor (= 0.63.3)
|
||||||
- Yoga
|
- Yoga
|
||||||
- React-Core/RCTImageHeaders (0.61.4):
|
- React-Core/RCTImageHeaders (0.63.3):
|
||||||
- Folly (= 2018.10.22.00)
|
- Folly (= 2020.01.13.00)
|
||||||
- glog
|
- glog
|
||||||
- React-Core/Default
|
- React-Core/Default
|
||||||
- React-cxxreact (= 0.61.4)
|
- React-cxxreact (= 0.63.3)
|
||||||
- React-jsi (= 0.61.4)
|
- React-jsi (= 0.63.3)
|
||||||
- React-jsiexecutor (= 0.61.4)
|
- React-jsiexecutor (= 0.63.3)
|
||||||
- Yoga
|
- Yoga
|
||||||
- React-Core/RCTLinkingHeaders (0.61.4):
|
- React-Core/RCTLinkingHeaders (0.63.3):
|
||||||
- Folly (= 2018.10.22.00)
|
- Folly (= 2020.01.13.00)
|
||||||
- glog
|
- glog
|
||||||
- React-Core/Default
|
- React-Core/Default
|
||||||
- React-cxxreact (= 0.61.4)
|
- React-cxxreact (= 0.63.3)
|
||||||
- React-jsi (= 0.61.4)
|
- React-jsi (= 0.63.3)
|
||||||
- React-jsiexecutor (= 0.61.4)
|
- React-jsiexecutor (= 0.63.3)
|
||||||
- Yoga
|
- Yoga
|
||||||
- React-Core/RCTNetworkHeaders (0.61.4):
|
- React-Core/RCTNetworkHeaders (0.63.3):
|
||||||
- Folly (= 2018.10.22.00)
|
- Folly (= 2020.01.13.00)
|
||||||
- glog
|
- glog
|
||||||
- React-Core/Default
|
- React-Core/Default
|
||||||
- React-cxxreact (= 0.61.4)
|
- React-cxxreact (= 0.63.3)
|
||||||
- React-jsi (= 0.61.4)
|
- React-jsi (= 0.63.3)
|
||||||
- React-jsiexecutor (= 0.61.4)
|
- React-jsiexecutor (= 0.63.3)
|
||||||
- Yoga
|
- Yoga
|
||||||
- React-Core/RCTSettingsHeaders (0.61.4):
|
- React-Core/RCTSettingsHeaders (0.63.3):
|
||||||
- Folly (= 2018.10.22.00)
|
- Folly (= 2020.01.13.00)
|
||||||
- glog
|
- glog
|
||||||
- React-Core/Default
|
- React-Core/Default
|
||||||
- React-cxxreact (= 0.61.4)
|
- React-cxxreact (= 0.63.3)
|
||||||
- React-jsi (= 0.61.4)
|
- React-jsi (= 0.63.3)
|
||||||
- React-jsiexecutor (= 0.61.4)
|
- React-jsiexecutor (= 0.63.3)
|
||||||
- Yoga
|
- Yoga
|
||||||
- React-Core/RCTTextHeaders (0.61.4):
|
- React-Core/RCTTextHeaders (0.63.3):
|
||||||
- Folly (= 2018.10.22.00)
|
- Folly (= 2020.01.13.00)
|
||||||
- glog
|
- glog
|
||||||
- React-Core/Default
|
- React-Core/Default
|
||||||
- React-cxxreact (= 0.61.4)
|
- React-cxxreact (= 0.63.3)
|
||||||
- React-jsi (= 0.61.4)
|
- React-jsi (= 0.63.3)
|
||||||
- React-jsiexecutor (= 0.61.4)
|
- React-jsiexecutor (= 0.63.3)
|
||||||
- Yoga
|
- Yoga
|
||||||
- React-Core/RCTVibrationHeaders (0.61.4):
|
- React-Core/RCTVibrationHeaders (0.63.3):
|
||||||
- Folly (= 2018.10.22.00)
|
- Folly (= 2020.01.13.00)
|
||||||
- glog
|
- glog
|
||||||
- React-Core/Default
|
- React-Core/Default
|
||||||
- React-cxxreact (= 0.61.4)
|
- React-cxxreact (= 0.63.3)
|
||||||
- React-jsi (= 0.61.4)
|
- React-jsi (= 0.63.3)
|
||||||
- React-jsiexecutor (= 0.61.4)
|
- React-jsiexecutor (= 0.63.3)
|
||||||
- Yoga
|
- Yoga
|
||||||
- React-Core/RCTWebSocket (0.61.4):
|
- React-Core/RCTWebSocket (0.63.3):
|
||||||
- Folly (= 2018.10.22.00)
|
- Folly (= 2020.01.13.00)
|
||||||
- glog
|
- glog
|
||||||
- React-Core/Default (= 0.61.4)
|
- React-Core/Default (= 0.63.3)
|
||||||
- React-cxxreact (= 0.61.4)
|
- React-cxxreact (= 0.63.3)
|
||||||
- React-jsi (= 0.61.4)
|
- React-jsi (= 0.63.3)
|
||||||
- React-jsiexecutor (= 0.61.4)
|
- React-jsiexecutor (= 0.63.3)
|
||||||
- Yoga
|
- Yoga
|
||||||
- React-CoreModules (0.61.4):
|
- React-CoreModules (0.63.3):
|
||||||
- FBReactNativeSpec (= 0.61.4)
|
- FBReactNativeSpec (= 0.63.3)
|
||||||
- Folly (= 2018.10.22.00)
|
- Folly (= 2020.01.13.00)
|
||||||
- RCTTypeSafety (= 0.61.4)
|
- RCTTypeSafety (= 0.63.3)
|
||||||
- React-Core/CoreModulesHeaders (= 0.61.4)
|
- React-Core/CoreModulesHeaders (= 0.63.3)
|
||||||
- React-RCTImage (= 0.61.4)
|
- React-jsi (= 0.63.3)
|
||||||
- ReactCommon/turbomodule/core (= 0.61.4)
|
- React-RCTImage (= 0.63.3)
|
||||||
- React-cxxreact (0.61.4):
|
- ReactCommon/turbomodule/core (= 0.63.3)
|
||||||
|
- React-cxxreact (0.63.3):
|
||||||
- boost-for-react-native (= 1.63.0)
|
- boost-for-react-native (= 1.63.0)
|
||||||
- DoubleConversion
|
- DoubleConversion
|
||||||
- Folly (= 2018.10.22.00)
|
- Folly (= 2020.01.13.00)
|
||||||
- glog
|
- glog
|
||||||
- React-jsinspector (= 0.61.4)
|
- React-callinvoker (= 0.63.3)
|
||||||
- React-jsi (0.61.4):
|
- React-jsinspector (= 0.63.3)
|
||||||
|
- React-jsi (0.63.3):
|
||||||
- boost-for-react-native (= 1.63.0)
|
- boost-for-react-native (= 1.63.0)
|
||||||
- DoubleConversion
|
- DoubleConversion
|
||||||
- Folly (= 2018.10.22.00)
|
- Folly (= 2020.01.13.00)
|
||||||
- glog
|
- glog
|
||||||
- React-jsi/Default (= 0.61.4)
|
- React-jsi/Default (= 0.63.3)
|
||||||
- React-jsi/Default (0.61.4):
|
- React-jsi/Default (0.63.3):
|
||||||
- boost-for-react-native (= 1.63.0)
|
- boost-for-react-native (= 1.63.0)
|
||||||
- DoubleConversion
|
- DoubleConversion
|
||||||
- Folly (= 2018.10.22.00)
|
- Folly (= 2020.01.13.00)
|
||||||
- glog
|
- glog
|
||||||
- React-jsiexecutor (0.61.4):
|
- React-jsiexecutor (0.63.3):
|
||||||
- DoubleConversion
|
- DoubleConversion
|
||||||
- Folly (= 2018.10.22.00)
|
- Folly (= 2020.01.13.00)
|
||||||
- glog
|
- glog
|
||||||
- React-cxxreact (= 0.61.4)
|
- React-cxxreact (= 0.63.3)
|
||||||
- React-jsi (= 0.61.4)
|
- React-jsi (= 0.63.3)
|
||||||
- React-jsinspector (0.61.4)
|
- React-jsinspector (0.63.3)
|
||||||
- react-native-update (5.5.8):
|
- react-native-update (5.9.1):
|
||||||
- React
|
- React
|
||||||
- react-native-update/BSDiff (= 5.5.8)
|
- react-native-update/BSDiff (= 5.9.1)
|
||||||
- react-native-update/RCTPushy (= 5.5.8)
|
- react-native-update/RCTPushy (= 5.9.1)
|
||||||
- SSZipArchive
|
- SSZipArchive
|
||||||
- react-native-update/BSDiff (5.5.8):
|
- react-native-update/BSDiff (5.9.1):
|
||||||
- React
|
- React
|
||||||
- SSZipArchive
|
- SSZipArchive
|
||||||
- react-native-update/RCTPushy (5.5.8):
|
- react-native-update/RCTPushy (5.9.1):
|
||||||
- React
|
- React
|
||||||
- SSZipArchive
|
- SSZipArchive
|
||||||
- React-RCTActionSheet (0.61.4):
|
- react-native-webview (10.9.2):
|
||||||
- React-Core/RCTActionSheetHeaders (= 0.61.4)
|
- React-Core
|
||||||
- React-RCTAnimation (0.61.4):
|
- React-RCTActionSheet (0.63.3):
|
||||||
- React-Core/RCTAnimationHeaders (= 0.61.4)
|
- React-Core/RCTActionSheetHeaders (= 0.63.3)
|
||||||
- React-RCTBlob (0.61.4):
|
- React-RCTAnimation (0.63.3):
|
||||||
- React-Core/RCTBlobHeaders (= 0.61.4)
|
- FBReactNativeSpec (= 0.63.3)
|
||||||
- React-Core/RCTWebSocket (= 0.61.4)
|
- Folly (= 2020.01.13.00)
|
||||||
- React-jsi (= 0.61.4)
|
- RCTTypeSafety (= 0.63.3)
|
||||||
- React-RCTNetwork (= 0.61.4)
|
- React-Core/RCTAnimationHeaders (= 0.63.3)
|
||||||
- React-RCTImage (0.61.4):
|
- React-jsi (= 0.63.3)
|
||||||
- React-Core/RCTImageHeaders (= 0.61.4)
|
- ReactCommon/turbomodule/core (= 0.63.3)
|
||||||
- React-RCTNetwork (= 0.61.4)
|
- React-RCTBlob (0.63.3):
|
||||||
- React-RCTLinking (0.61.4):
|
- FBReactNativeSpec (= 0.63.3)
|
||||||
- React-Core/RCTLinkingHeaders (= 0.61.4)
|
- Folly (= 2020.01.13.00)
|
||||||
- React-RCTNetwork (0.61.4):
|
- React-Core/RCTBlobHeaders (= 0.63.3)
|
||||||
- React-Core/RCTNetworkHeaders (= 0.61.4)
|
- React-Core/RCTWebSocket (= 0.63.3)
|
||||||
- React-RCTSettings (0.61.4):
|
- React-jsi (= 0.63.3)
|
||||||
- React-Core/RCTSettingsHeaders (= 0.61.4)
|
- React-RCTNetwork (= 0.63.3)
|
||||||
- React-RCTText (0.61.4):
|
- ReactCommon/turbomodule/core (= 0.63.3)
|
||||||
- React-Core/RCTTextHeaders (= 0.61.4)
|
- React-RCTImage (0.63.3):
|
||||||
- React-RCTVibration (0.61.4):
|
- FBReactNativeSpec (= 0.63.3)
|
||||||
- React-Core/RCTVibrationHeaders (= 0.61.4)
|
- Folly (= 2020.01.13.00)
|
||||||
- ReactCommon/jscallinvoker (0.61.4):
|
- RCTTypeSafety (= 0.63.3)
|
||||||
|
- React-Core/RCTImageHeaders (= 0.63.3)
|
||||||
|
- React-jsi (= 0.63.3)
|
||||||
|
- React-RCTNetwork (= 0.63.3)
|
||||||
|
- ReactCommon/turbomodule/core (= 0.63.3)
|
||||||
|
- React-RCTLinking (0.63.3):
|
||||||
|
- FBReactNativeSpec (= 0.63.3)
|
||||||
|
- React-Core/RCTLinkingHeaders (= 0.63.3)
|
||||||
|
- React-jsi (= 0.63.3)
|
||||||
|
- ReactCommon/turbomodule/core (= 0.63.3)
|
||||||
|
- React-RCTNetwork (0.63.3):
|
||||||
|
- FBReactNativeSpec (= 0.63.3)
|
||||||
|
- Folly (= 2020.01.13.00)
|
||||||
|
- RCTTypeSafety (= 0.63.3)
|
||||||
|
- React-Core/RCTNetworkHeaders (= 0.63.3)
|
||||||
|
- React-jsi (= 0.63.3)
|
||||||
|
- ReactCommon/turbomodule/core (= 0.63.3)
|
||||||
|
- React-RCTSettings (0.63.3):
|
||||||
|
- FBReactNativeSpec (= 0.63.3)
|
||||||
|
- Folly (= 2020.01.13.00)
|
||||||
|
- RCTTypeSafety (= 0.63.3)
|
||||||
|
- React-Core/RCTSettingsHeaders (= 0.63.3)
|
||||||
|
- React-jsi (= 0.63.3)
|
||||||
|
- ReactCommon/turbomodule/core (= 0.63.3)
|
||||||
|
- React-RCTText (0.63.3):
|
||||||
|
- React-Core/RCTTextHeaders (= 0.63.3)
|
||||||
|
- React-RCTVibration (0.63.3):
|
||||||
|
- FBReactNativeSpec (= 0.63.3)
|
||||||
|
- Folly (= 2020.01.13.00)
|
||||||
|
- React-Core/RCTVibrationHeaders (= 0.63.3)
|
||||||
|
- React-jsi (= 0.63.3)
|
||||||
|
- ReactCommon/turbomodule/core (= 0.63.3)
|
||||||
|
- ReactCommon/turbomodule/core (0.63.3):
|
||||||
- DoubleConversion
|
- DoubleConversion
|
||||||
- Folly (= 2018.10.22.00)
|
- Folly (= 2020.01.13.00)
|
||||||
- glog
|
- glog
|
||||||
- React-cxxreact (= 0.61.4)
|
- React-callinvoker (= 0.63.3)
|
||||||
- ReactCommon/turbomodule/core (0.61.4):
|
- React-Core (= 0.63.3)
|
||||||
- DoubleConversion
|
- React-cxxreact (= 0.63.3)
|
||||||
- Folly (= 2018.10.22.00)
|
- React-jsi (= 0.63.3)
|
||||||
- glog
|
- SSZipArchive (2.2.3)
|
||||||
- React-Core (= 0.61.4)
|
|
||||||
- React-cxxreact (= 0.61.4)
|
|
||||||
- React-jsi (= 0.61.4)
|
|
||||||
- ReactCommon/jscallinvoker (= 0.61.4)
|
|
||||||
- SSZipArchive (2.2.2)
|
|
||||||
- Yoga (1.14.0)
|
- Yoga (1.14.0)
|
||||||
|
- YogaKit (1.18.1):
|
||||||
|
- Yoga (~> 1.14)
|
||||||
|
|
||||||
DEPENDENCIES:
|
DEPENDENCIES:
|
||||||
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
|
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
|
||||||
- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
|
- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
|
||||||
- FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`)
|
- FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`)
|
||||||
|
- Flipper (= 0.54.0)
|
||||||
|
- Flipper-DoubleConversion (= 1.1.7)
|
||||||
|
- Flipper-Folly (~> 2.2)
|
||||||
|
- Flipper-Glog (= 0.3.6)
|
||||||
|
- Flipper-PeerTalk (~> 0.0.4)
|
||||||
|
- Flipper-RSocket (~> 1.1)
|
||||||
|
- FlipperKit (= 0.54.0)
|
||||||
|
- FlipperKit/Core (= 0.54.0)
|
||||||
|
- FlipperKit/CppBridge (= 0.54.0)
|
||||||
|
- FlipperKit/FBCxxFollyDynamicConvert (= 0.54.0)
|
||||||
|
- FlipperKit/FBDefines (= 0.54.0)
|
||||||
|
- FlipperKit/FKPortForwarding (= 0.54.0)
|
||||||
|
- FlipperKit/FlipperKitHighlightOverlay (= 0.54.0)
|
||||||
|
- FlipperKit/FlipperKitLayoutPlugin (= 0.54.0)
|
||||||
|
- FlipperKit/FlipperKitLayoutTextSearchable (= 0.54.0)
|
||||||
|
- FlipperKit/FlipperKitNetworkPlugin (= 0.54.0)
|
||||||
|
- FlipperKit/FlipperKitReactPlugin (= 0.54.0)
|
||||||
|
- FlipperKit/FlipperKitUserDefaultsPlugin (= 0.54.0)
|
||||||
|
- FlipperKit/SKIOSNetworkPlugin (= 0.54.0)
|
||||||
- Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`)
|
- Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`)
|
||||||
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
|
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
|
||||||
- RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
|
- RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
|
||||||
- RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`)
|
- RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`)
|
||||||
- React (from `../node_modules/react-native/`)
|
- React (from `../node_modules/react-native/`)
|
||||||
|
- React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`)
|
||||||
- React-Core (from `../node_modules/react-native/`)
|
- React-Core (from `../node_modules/react-native/`)
|
||||||
- React-Core/DevSupport (from `../node_modules/react-native/`)
|
- React-Core/DevSupport (from `../node_modules/react-native/`)
|
||||||
- React-Core/RCTWebSocket (from `../node_modules/react-native/`)
|
- React-Core/RCTWebSocket (from `../node_modules/react-native/`)
|
||||||
@@ -249,6 +352,7 @@ DEPENDENCIES:
|
|||||||
- React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`)
|
- React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`)
|
||||||
- React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
|
- React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
|
||||||
- react-native-update (from `../../..`)
|
- react-native-update (from `../../..`)
|
||||||
|
- react-native-webview (from `../node_modules/react-native-webview`)
|
||||||
- React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
|
- React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
|
||||||
- React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`)
|
- React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`)
|
||||||
- React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`)
|
- React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`)
|
||||||
@@ -258,14 +362,24 @@ DEPENDENCIES:
|
|||||||
- React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`)
|
- React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`)
|
||||||
- React-RCTText (from `../node_modules/react-native/Libraries/Text`)
|
- React-RCTText (from `../node_modules/react-native/Libraries/Text`)
|
||||||
- React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`)
|
- React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`)
|
||||||
- ReactCommon/jscallinvoker (from `../node_modules/react-native/ReactCommon`)
|
|
||||||
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
|
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
|
||||||
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
|
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
|
||||||
|
|
||||||
SPEC REPOS:
|
SPEC REPOS:
|
||||||
trunk:
|
trunk:
|
||||||
- boost-for-react-native
|
- boost-for-react-native
|
||||||
|
- CocoaAsyncSocket
|
||||||
|
- CocoaLibEvent
|
||||||
|
- Flipper
|
||||||
|
- Flipper-DoubleConversion
|
||||||
|
- Flipper-Folly
|
||||||
|
- Flipper-Glog
|
||||||
|
- Flipper-PeerTalk
|
||||||
|
- Flipper-RSocket
|
||||||
|
- FlipperKit
|
||||||
|
- OpenSSL-Universal
|
||||||
- SSZipArchive
|
- SSZipArchive
|
||||||
|
- YogaKit
|
||||||
|
|
||||||
EXTERNAL SOURCES:
|
EXTERNAL SOURCES:
|
||||||
DoubleConversion:
|
DoubleConversion:
|
||||||
@@ -284,6 +398,8 @@ EXTERNAL SOURCES:
|
|||||||
:path: "../node_modules/react-native/Libraries/TypeSafety"
|
:path: "../node_modules/react-native/Libraries/TypeSafety"
|
||||||
React:
|
React:
|
||||||
:path: "../node_modules/react-native/"
|
:path: "../node_modules/react-native/"
|
||||||
|
React-callinvoker:
|
||||||
|
:path: "../node_modules/react-native/ReactCommon/callinvoker"
|
||||||
React-Core:
|
React-Core:
|
||||||
:path: "../node_modules/react-native/"
|
:path: "../node_modules/react-native/"
|
||||||
React-CoreModules:
|
React-CoreModules:
|
||||||
@@ -298,6 +414,8 @@ EXTERNAL SOURCES:
|
|||||||
:path: "../node_modules/react-native/ReactCommon/jsinspector"
|
:path: "../node_modules/react-native/ReactCommon/jsinspector"
|
||||||
react-native-update:
|
react-native-update:
|
||||||
:path: "../../.."
|
:path: "../../.."
|
||||||
|
react-native-webview:
|
||||||
|
:path: "../node_modules/react-native-webview"
|
||||||
React-RCTActionSheet:
|
React-RCTActionSheet:
|
||||||
:path: "../node_modules/react-native/Libraries/ActionSheetIOS"
|
:path: "../node_modules/react-native/Libraries/ActionSheetIOS"
|
||||||
React-RCTAnimation:
|
React-RCTAnimation:
|
||||||
@@ -323,34 +441,47 @@ EXTERNAL SOURCES:
|
|||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
|
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
|
||||||
DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2
|
CocoaAsyncSocket: 694058e7c0ed05a9e217d1b3c7ded962f4180845
|
||||||
FBLazyVector: feb35a6b7f7b50f367be07f34012f34a79282fa3
|
CocoaLibEvent: 2fab71b8bd46dd33ddb959f7928ec5909f838e3f
|
||||||
FBReactNativeSpec: 51477b84b1bf7ab6f9ef307c24e3dd675391be44
|
DoubleConversion: cde416483dac037923206447da6e1454df403714
|
||||||
Folly: 30e7936e1c45c08d884aa59369ed951a8e68cf51
|
FBLazyVector: 878b59e31113e289e275165efbe4b54fa614d43d
|
||||||
glog: 1f3da668190260b06b429bb211bfbee5cd790c28
|
FBReactNativeSpec: 7da9338acfb98d4ef9e5536805a0704572d33c2f
|
||||||
RCTRequired: f3b3fb6f4723e8e52facb229d0c75fdc76773849
|
Flipper: be611d4b742d8c87fbae2ca5f44603a02539e365
|
||||||
RCTTypeSafety: 2ec60de6abb1db050b56ecc4b60188026078fd10
|
Flipper-DoubleConversion: 38631e41ef4f9b12861c67d17cb5518d06badc41
|
||||||
React: 10e0130b57e55a7cd8c3dee37c1261102ce295f4
|
Flipper-Folly: c12092ea368353b58e992843a990a3225d4533c3
|
||||||
React-Core: 636212410772d05f3a1eb79d965df2962ca1c70b
|
Flipper-Glog: 1dfd6abf1e922806c52ceb8701a3599a79a200a6
|
||||||
React-CoreModules: 6f70d5e41919289c582f88c9ad9923fe5c87400a
|
Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9
|
||||||
React-cxxreact: ddecbe9157ec1743f52ea17bf8d95debc0d6e846
|
Flipper-RSocket: 64e7431a55835eb953b0bf984ef3b90ae9fdddd7
|
||||||
React-jsi: ca921f4041505f9d5197139b2d09eeb020bb12e8
|
FlipperKit: ab353d41aea8aae2ea6daaf813e67496642f3d7d
|
||||||
React-jsiexecutor: 8dfb73b987afa9324e4009bdce62a18ce23d983c
|
Folly: b73c3869541e86821df3c387eb0af5f65addfab4
|
||||||
React-jsinspector: d15478d0a8ada19864aa4d1cc1c697b41b3fa92f
|
glog: 40a13f7840415b9a77023fbcae0f1e6f43192af3
|
||||||
react-native-update: 491cb5902a18f1ebeeb903f1a619df94662fc52a
|
OpenSSL-Universal: 8b48cc0d10c1b2923617dfe5c178aa9ed2689355
|
||||||
React-RCTActionSheet: 7369b7c85f99b6299491333affd9f01f5a130c22
|
RCTRequired: 48884c74035a0b5b76dbb7a998bd93bcfc5f2047
|
||||||
React-RCTAnimation: d07be15b2bd1d06d89417eb0343f98ffd2b099a7
|
RCTTypeSafety: edf4b618033c2f1c5b7bc3d90d8e085ed95ba2ab
|
||||||
React-RCTBlob: 8e0b23d95c9baa98f6b0e127e07666aaafd96c34
|
React: f36e90f3ceb976546e97df3403e37d226f79d0e3
|
||||||
React-RCTImage: 443050d14a66e8c2332e9c055f45689d23e15cc7
|
React-callinvoker: 18874f621eb96625df7a24a7dc8d6e07391affcd
|
||||||
React-RCTLinking: ce9a90ba155aec41be49e75ec721bbae2d48a47e
|
React-Core: ac3d816b8e3493970153f4aaf0cff18af0bb95e6
|
||||||
React-RCTNetwork: 41fe54bacc67dd00e6e4c4d30dd98a13e4beabc8
|
React-CoreModules: 4016d3a4e518bcfc4f5a51252b5a05692ca6f0e1
|
||||||
React-RCTSettings: 45e3e0a6470310b2dab2ccc6d1d73121ba3ea936
|
React-cxxreact: ffc9129013b87cb36cf3f30a86695a3c397b0f99
|
||||||
React-RCTText: 21934e0a51d522abcd0a275407e80af45d6fd9ec
|
React-jsi: df07aa95b39c5be3e41199921509bfa929ed2b9d
|
||||||
React-RCTVibration: 0f76400ee3cec6edb9c125da49fed279340d145a
|
React-jsiexecutor: b56c03e61c0dd5f5801255f2160a815f4a53d451
|
||||||
ReactCommon: a6a294e7028ed67b926d29551aa9394fd989c24c
|
React-jsinspector: 8e68ffbfe23880d3ee9bafa8be2777f60b25cbe2
|
||||||
SSZipArchive: fa16b8cc4cdeceb698e5e5d9f67e9558532fbf23
|
react-native-update: 74ae0ad726a7cd5194b377361b7a3e921a65201c
|
||||||
Yoga: ba3d99dbee6c15ea6bbe3783d1f0cb1ffb79af0f
|
react-native-webview: 4e96d493f9f90ba4f03b28933f30b2964df07e39
|
||||||
|
React-RCTActionSheet: 53ea72699698b0b47a6421cb1c8b4ab215a774aa
|
||||||
|
React-RCTAnimation: 1befece0b5183c22ae01b966f5583f42e69a83c2
|
||||||
|
React-RCTBlob: 0b284339cbe4b15705a05e2313a51c6d8b51fa40
|
||||||
|
React-RCTImage: d1756599ebd4dc2cb19d1682fe67c6b976658387
|
||||||
|
React-RCTLinking: 9af0a51c6d6a4dd1674daadafffc6d03033a6d18
|
||||||
|
React-RCTNetwork: 332c83929cc5eae0b3bbca4add1d668e1fc18bda
|
||||||
|
React-RCTSettings: d6953772cfd55f2c68ad72b7ef29efc7ec49f773
|
||||||
|
React-RCTText: 65a6de06a7389098ce24340d1d3556015c38f746
|
||||||
|
React-RCTVibration: 8e9fb25724a0805107fc1acc9075e26f814df454
|
||||||
|
ReactCommon: 4167844018c9ed375cc01a843e9ee564399e53c3
|
||||||
|
SSZipArchive: 62d4947b08730e4cda640473b0066d209ff033c9
|
||||||
|
Yoga: 7d13633d129fd179e01b8953d38d47be90db185a
|
||||||
|
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
|
||||||
|
|
||||||
PODFILE CHECKSUM: 244ba888c650d3945bf72a8d01516fb0f1b3b097
|
PODFILE CHECKSUM: 449e295f5242b426c8459fd24a8812cc985916d0
|
||||||
|
|
||||||
COCOAPODS: 1.9.1
|
COCOAPODS: 1.9.3
|
||||||
|
9
Example/testHotUpdate/ios/dummy.swift
Normal file
9
Example/testHotUpdate/ios/dummy.swift
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
//
|
||||||
|
// dummy.swift
|
||||||
|
// testHotUpdate
|
||||||
|
//
|
||||||
|
// Created by Qingming, Sunny Luo on 9/1/20.
|
||||||
|
// Copyright © 2020 Facebook. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
@@ -0,0 +1,4 @@
|
|||||||
|
//
|
||||||
|
// Use this file to import your target's public headers that you would like to expose to Swift.
|
||||||
|
//
|
||||||
|
|
@@ -12,6 +12,7 @@
|
|||||||
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
|
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
|
||||||
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
|
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
|
||||||
7610A16EF1CB8A7644EAFA55 /* libPods-testHotUpdate.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 28C264AEBE1E206870F9D871 /* libPods-testHotUpdate.a */; };
|
7610A16EF1CB8A7644EAFA55 /* libPods-testHotUpdate.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 28C264AEBE1E206870F9D871 /* libPods-testHotUpdate.a */; };
|
||||||
|
F1CBCFD724FE1CF80019170D /* dummy.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1CBCFD624FE1CF80019170D /* dummy.swift */; };
|
||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
@@ -37,6 +38,8 @@
|
|||||||
ED1DB2CEADC1A82A43867C0E /* Pods-testHotUpdateTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-testHotUpdateTests.release.xcconfig"; path = "Target Support Files/Pods-testHotUpdateTests/Pods-testHotUpdateTests.release.xcconfig"; sourceTree = "<group>"; };
|
ED1DB2CEADC1A82A43867C0E /* Pods-testHotUpdateTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-testHotUpdateTests.release.xcconfig"; path = "Target Support Files/Pods-testHotUpdateTests/Pods-testHotUpdateTests.release.xcconfig"; sourceTree = "<group>"; };
|
||||||
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
|
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
|
||||||
ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; };
|
ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; };
|
||||||
|
F1CBCFD524FE1CF80019170D /* testHotUpdate-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "testHotUpdate-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||||
|
F1CBCFD624FE1CF80019170D /* dummy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = dummy.swift; sourceTree = "<group>"; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
@@ -76,6 +79,8 @@
|
|||||||
13B07FB61A68108700A75B9A /* Info.plist */,
|
13B07FB61A68108700A75B9A /* Info.plist */,
|
||||||
13B07FB11A68108700A75B9A /* LaunchScreen.xib */,
|
13B07FB11A68108700A75B9A /* LaunchScreen.xib */,
|
||||||
13B07FB71A68108700A75B9A /* main.m */,
|
13B07FB71A68108700A75B9A /* main.m */,
|
||||||
|
F1CBCFD624FE1CF80019170D /* dummy.swift */,
|
||||||
|
F1CBCFD524FE1CF80019170D /* testHotUpdate-Bridging-Header.h */,
|
||||||
);
|
);
|
||||||
name = testHotUpdate;
|
name = testHotUpdate;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -154,6 +159,12 @@
|
|||||||
attributes = {
|
attributes = {
|
||||||
LastUpgradeCheck = 0940;
|
LastUpgradeCheck = 0940;
|
||||||
ORGANIZATIONNAME = Facebook;
|
ORGANIZATIONNAME = Facebook;
|
||||||
|
TargetAttributes = {
|
||||||
|
13B07F861A680F5B00A75B9A = {
|
||||||
|
DevelopmentTeam = JD75Q9JJL2;
|
||||||
|
LastSwiftMigration = 1160;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "testHotUpdate" */;
|
buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "testHotUpdate" */;
|
||||||
compatibilityVersion = "Xcode 3.2";
|
compatibilityVersion = "Xcode 3.2";
|
||||||
@@ -199,7 +210,7 @@
|
|||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
|
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh\n";
|
||||||
};
|
};
|
||||||
1CD78CE8A2E7B88FAE48FCEE /* [CP] Copy Pods Resources */ = {
|
1CD78CE8A2E7B88FAE48FCEE /* [CP] Copy Pods Resources */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
@@ -208,10 +219,12 @@
|
|||||||
);
|
);
|
||||||
inputPaths = (
|
inputPaths = (
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-testHotUpdate/Pods-testHotUpdate-resources.sh",
|
"${PODS_ROOT}/Target Support Files/Pods-testHotUpdate/Pods-testHotUpdate-resources.sh",
|
||||||
|
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle",
|
||||||
"${PODS_ROOT}/../../../../ios/pushy_build_time.txt",
|
"${PODS_ROOT}/../../../../ios/pushy_build_time.txt",
|
||||||
);
|
);
|
||||||
name = "[CP] Copy Pods Resources";
|
name = "[CP] Copy Pods Resources";
|
||||||
outputPaths = (
|
outputPaths = (
|
||||||
|
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle",
|
||||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/pushy_build_time.txt",
|
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/pushy_build_time.txt",
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
@@ -268,6 +281,7 @@
|
|||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */,
|
13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */,
|
||||||
|
F1CBCFD724FE1CF80019170D /* dummy.swift in Sources */,
|
||||||
13B07FC11A68108700A75B9A /* main.m in Sources */,
|
13B07FC11A68108700A75B9A /* main.m in Sources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
@@ -292,8 +306,10 @@
|
|||||||
baseConfigurationReference = 84EBA9C1A760F4136B306391 /* Pods-testHotUpdate.debug.xcconfig */;
|
baseConfigurationReference = 84EBA9C1A760F4136B306391 /* Pods-testHotUpdate.debug.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
DEAD_CODE_STRIPPING = NO;
|
DEAD_CODE_STRIPPING = NO;
|
||||||
|
DEVELOPMENT_TEAM = JD75Q9JJL2;
|
||||||
INFOPLIST_FILE = testHotUpdate/Info.plist;
|
INFOPLIST_FILE = testHotUpdate/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||||
OTHER_LDFLAGS = (
|
OTHER_LDFLAGS = (
|
||||||
@@ -303,6 +319,9 @@
|
|||||||
);
|
);
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
|
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
|
||||||
PRODUCT_NAME = testHotUpdate;
|
PRODUCT_NAME = testHotUpdate;
|
||||||
|
SWIFT_OBJC_BRIDGING_HEADER = "testHotUpdate-Bridging-Header.h";
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
@@ -312,7 +331,9 @@
|
|||||||
baseConfigurationReference = 1A3E77317B15A5C3816ACE3A /* Pods-testHotUpdate.release.xcconfig */;
|
baseConfigurationReference = 1A3E77317B15A5C3816ACE3A /* Pods-testHotUpdate.release.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
DEVELOPMENT_TEAM = JD75Q9JJL2;
|
||||||
INFOPLIST_FILE = testHotUpdate/Info.plist;
|
INFOPLIST_FILE = testHotUpdate/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||||
OTHER_LDFLAGS = (
|
OTHER_LDFLAGS = (
|
||||||
@@ -322,6 +343,8 @@
|
|||||||
);
|
);
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
|
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
|
||||||
PRODUCT_NAME = testHotUpdate;
|
PRODUCT_NAME = testHotUpdate;
|
||||||
|
SWIFT_OBJC_BRIDGING_HEADER = "testHotUpdate-Bridging-Header.h";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
|
@@ -55,6 +55,15 @@
|
|||||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||||
|
<MacroExpansion>
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||||
|
BuildableName = "testHotUpdate.app"
|
||||||
|
BlueprintName = "testHotUpdate"
|
||||||
|
ReferencedContainer = "container:testHotUpdate.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</MacroExpansion>
|
||||||
<Testables>
|
<Testables>
|
||||||
<TestableReference
|
<TestableReference
|
||||||
skipped = "NO">
|
skipped = "NO">
|
||||||
@@ -67,17 +76,6 @@
|
|||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</TestableReference>
|
</TestableReference>
|
||||||
</Testables>
|
</Testables>
|
||||||
<MacroExpansion>
|
|
||||||
<BuildableReference
|
|
||||||
BuildableIdentifier = "primary"
|
|
||||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
|
||||||
BuildableName = "testHotUpdate.app"
|
|
||||||
BlueprintName = "testHotUpdate"
|
|
||||||
ReferencedContainer = "container:testHotUpdate.xcodeproj">
|
|
||||||
</BuildableReference>
|
|
||||||
</MacroExpansion>
|
|
||||||
<AdditionalOptions>
|
|
||||||
</AdditionalOptions>
|
|
||||||
</TestAction>
|
</TestAction>
|
||||||
<LaunchAction
|
<LaunchAction
|
||||||
buildConfiguration = "Debug"
|
buildConfiguration = "Debug"
|
||||||
@@ -99,8 +97,6 @@
|
|||||||
ReferencedContainer = "container:testHotUpdate.xcodeproj">
|
ReferencedContainer = "container:testHotUpdate.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</BuildableProductRunnable>
|
</BuildableProductRunnable>
|
||||||
<AdditionalOptions>
|
|
||||||
</AdditionalOptions>
|
|
||||||
</LaunchAction>
|
</LaunchAction>
|
||||||
<ProfileAction
|
<ProfileAction
|
||||||
buildConfiguration = "Release"
|
buildConfiguration = "Release"
|
||||||
|
@@ -12,10 +12,32 @@
|
|||||||
#import <React/RCTRootView.h>
|
#import <React/RCTRootView.h>
|
||||||
#import "RCTPushy.h"
|
#import "RCTPushy.h"
|
||||||
|
|
||||||
|
#ifdef FB_SONARKIT_ENABLED
|
||||||
|
#import <FlipperKit/FlipperClient.h>
|
||||||
|
#import <FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h>
|
||||||
|
#import <FlipperKitUserDefaultsPlugin/FKUserDefaultsPlugin.h>
|
||||||
|
#import <FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.h>
|
||||||
|
#import <SKIOSNetworkPlugin/SKIOSNetworkAdapter.h>
|
||||||
|
#import <FlipperKitReactPlugin/FlipperKitReactPlugin.h>
|
||||||
|
static void InitializeFlipper(UIApplication *application) {
|
||||||
|
FlipperClient *client = [FlipperClient sharedClient];
|
||||||
|
SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults];
|
||||||
|
[client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]];
|
||||||
|
[client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]];
|
||||||
|
[client addPlugin:[FlipperKitReactPlugin new]];
|
||||||
|
[client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];
|
||||||
|
[client start];
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
@implementation AppDelegate
|
@implementation AppDelegate
|
||||||
|
|
||||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
||||||
{
|
{
|
||||||
|
#ifdef FB_SONARKIT_ENABLED
|
||||||
|
InitializeFlipper(application);
|
||||||
|
#endif
|
||||||
|
|
||||||
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
|
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
|
||||||
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
|
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
|
||||||
moduleName:@"testHotUpdate"
|
moduleName:@"testHotUpdate"
|
||||||
|
@@ -7,22 +7,24 @@
|
|||||||
"ios": "react-native run-ios",
|
"ios": "react-native run-ios",
|
||||||
"start": "react-native start",
|
"start": "react-native start",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"lint": "eslint ."
|
"lint": "eslint .",
|
||||||
|
"apk": "(cd android && ./gradlew aR)"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"react": "16.9.0",
|
"react": "16.13.1",
|
||||||
"react-native": "0.61.4",
|
"react-native": "0.63.3",
|
||||||
"react-native-update": "link:../.."
|
"react-native-update": "link:../..",
|
||||||
|
"react-native-webview": "^10.9.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.6.2",
|
"@babel/core": "^7.8.4",
|
||||||
"@babel/runtime": "^7.6.2",
|
"@babel/runtime": "^7.8.4",
|
||||||
"@react-native-community/eslint-config": "^0.0.5",
|
"@react-native-community/eslint-config": "^1.1.0",
|
||||||
"babel-jest": "^24.9.0",
|
"babel-jest": "^25.1.0",
|
||||||
"eslint": "^6.5.1",
|
"eslint": "^6.5.1",
|
||||||
"jest": "^24.9.0",
|
"jest": "^25.1.0",
|
||||||
"metro-react-native-babel-preset": "^0.56.0",
|
"metro-react-native-babel-preset": "^0.59.0",
|
||||||
"react-test-renderer": "16.9.0"
|
"react-test-renderer": "16.13.1"
|
||||||
},
|
},
|
||||||
"jest": {
|
"jest": {
|
||||||
"preset": "react-native"
|
"preset": "react-native"
|
||||||
|
@@ -8,7 +8,6 @@ import {
|
|||||||
TouchableOpacity,
|
TouchableOpacity,
|
||||||
Linking,
|
Linking,
|
||||||
Image,
|
Image,
|
||||||
NativeModules,
|
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -21,12 +20,17 @@ import {
|
|||||||
switchVersion,
|
switchVersion,
|
||||||
switchVersionLater,
|
switchVersionLater,
|
||||||
markSuccess,
|
markSuccess,
|
||||||
|
downloadAndInstallApk,
|
||||||
} from 'react-native-update';
|
} from 'react-native-update';
|
||||||
|
|
||||||
import _updateConfig from '../update.json';
|
import _updateConfig from '../update.json';
|
||||||
const {appKey} = _updateConfig[Platform.OS];
|
const {appKey} = _updateConfig[Platform.OS];
|
||||||
|
|
||||||
export default class App extends Component {
|
export default class App extends Component {
|
||||||
|
state = {
|
||||||
|
received: 0,
|
||||||
|
total: 0,
|
||||||
|
};
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
if (isRolledBack) {
|
if (isRolledBack) {
|
||||||
Alert.alert('提示', '刚刚更新失败了,版本被回滚.');
|
Alert.alert('提示', '刚刚更新失败了,版本被回滚.');
|
||||||
@@ -51,45 +55,68 @@ export default class App extends Component {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
doUpdate = async info => {
|
doUpdate = async (info) => {
|
||||||
const hash = await downloadUpdate(info);
|
try {
|
||||||
Alert.alert('提示', '下载完毕,是否重启应用?', [
|
const hash = await downloadUpdate(info, {
|
||||||
{
|
onDownloadProgress: ({received, total}) => {
|
||||||
text: '是',
|
this.setState({
|
||||||
onPress: () => {
|
received,
|
||||||
switchVersion(hash);
|
total,
|
||||||
|
});
|
||||||
},
|
},
|
||||||
},
|
});
|
||||||
{text: '否'},
|
Alert.alert('提示', '下载完毕,是否重启应用?', [
|
||||||
{
|
{
|
||||||
text: '下次启动时',
|
text: '是',
|
||||||
onPress: () => {
|
onPress: () => {
|
||||||
switchVersionLater(hash);
|
switchVersion(hash);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
{text: '否'},
|
||||||
]);
|
{
|
||||||
|
text: '下次启动时',
|
||||||
|
onPress: () => {
|
||||||
|
switchVersionLater(hash);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
} catch (err) {
|
||||||
|
Alert.alert('更新失败', err.message);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
checkUpdate = async () => {
|
checkUpdate = async () => {
|
||||||
return await this.doUpdate({
|
|
||||||
update: true,
|
|
||||||
pdiffUrl: 'http://localhost:8888/1.pdiff',
|
|
||||||
hash: 'test',
|
|
||||||
});
|
|
||||||
|
|
||||||
let info;
|
let info;
|
||||||
try {
|
try {
|
||||||
info = await checkUpdate(appKey);
|
info = await checkUpdate(appKey);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.warn(err);
|
Alert.alert('更新检查失败', err.message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (info.expired) {
|
if (info.expired) {
|
||||||
Alert.alert('提示', '您的应用版本已更新,请前往应用商店下载新的版本', [
|
Alert.alert('提示', '您的应用版本已更新,点击确定下载安装新版本', [
|
||||||
{
|
{
|
||||||
text: '确定',
|
text: '确定',
|
||||||
onPress: () => {
|
onPress: () => {
|
||||||
info.downloadUrl && Linking.openURL(info.downloadUrl);
|
if (info.downloadUrl) {
|
||||||
|
// apk可直接下载安装
|
||||||
|
if (
|
||||||
|
Platform.OS === 'android' &&
|
||||||
|
info.downloadUrl.endsWith('.apk')
|
||||||
|
) {
|
||||||
|
downloadAndInstallApk({
|
||||||
|
url: info.downloadUrl,
|
||||||
|
onDownloadProgress: ({received, total}) => {
|
||||||
|
this.setState({
|
||||||
|
received,
|
||||||
|
total,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
Linking.openURL(info.downloadUrl);
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
@@ -113,9 +140,10 @@ export default class App extends Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
const { received, total } = this.state;
|
||||||
return (
|
return (
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
<Text style={styles.welcome}>443欢迎使用热更新服务</Text>
|
<Text style={styles.welcome}>欢迎使用热更新服务</Text>
|
||||||
<Image
|
<Image
|
||||||
resizeMode={'contain'}
|
resizeMode={'contain'}
|
||||||
source={require('./assets/shezhi.png')}
|
source={require('./assets/shezhi.png')}
|
||||||
@@ -128,9 +156,13 @@ export default class App extends Component {
|
|||||||
当前热更新版本Hash: {currentVersion || '(空)'}
|
当前热更新版本Hash: {currentVersion || '(空)'}
|
||||||
{'\n'}
|
{'\n'}
|
||||||
</Text>
|
</Text>
|
||||||
|
<Text>
|
||||||
|
下载进度:{received} / {total}
|
||||||
|
</Text>
|
||||||
<TouchableOpacity onPress={this.checkUpdate}>
|
<TouchableOpacity onPress={this.checkUpdate}>
|
||||||
<Text style={styles.instructions}>点击这里检查更新</Text>
|
<Text style={styles.instructions}>点击这里检查更新</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
{/* <WebView style={{flex:1}} source={{uri: require('../www/index.html')}}/> */}
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
22
Example/testHotUpdate/src/www/echarts.min.js
vendored
Executable file
22
Example/testHotUpdate/src/www/echarts.min.js
vendored
Executable file
File diff suppressed because one or more lines are too long
39
Example/testHotUpdate/src/www/index.html
Normal file
39
Example/testHotUpdate/src/www/index.html
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<!-- 引入 ECharts 文件 -->
|
||||||
|
<script src="echarts.min.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!-- 为 ECharts 准备一个具备大小(宽高)的 DOM -->
|
||||||
|
<div id="main" style="width: 600px;height:400px;"></div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
// 基于准备好的dom,初始化echarts实例
|
||||||
|
var myChart = echarts.init(document.getElementById('main'));
|
||||||
|
|
||||||
|
// 指定图表的配置项和数据
|
||||||
|
var option = {
|
||||||
|
title: {
|
||||||
|
text: 'ECharts 入门示例'
|
||||||
|
},
|
||||||
|
tooltip: {},
|
||||||
|
legend: {
|
||||||
|
data:['销量']
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
data: ["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"]
|
||||||
|
},
|
||||||
|
yAxis: {},
|
||||||
|
series: [{
|
||||||
|
name: '销量',
|
||||||
|
type: 'bar',
|
||||||
|
data: [5, 20, 36, 10, 10, 20]
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
|
||||||
|
// 使用刚指定的配置项和数据显示图表。
|
||||||
|
myChart.setOption(option);
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,17 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="cn.reactnative.modules.update">
|
package="cn.reactnative.modules.update">
|
||||||
|
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
||||||
<application>
|
<application>
|
||||||
<meta-data android:name="pushy_build_time" android:value="@string/pushy_build_time" />
|
<meta-data android:name="pushy_build_time" android:value="@string/pushy_build_time" />
|
||||||
|
<provider
|
||||||
|
android:name=".PushyFileProvider"
|
||||||
|
android:authorities="${applicationId}.pushy.fileprovider"
|
||||||
|
android:exported="false"
|
||||||
|
android:grantUriPermissions="true">
|
||||||
|
<meta-data
|
||||||
|
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||||
|
android:resource="@xml/pushy_file_paths" />
|
||||||
|
</provider>
|
||||||
</application>
|
</application>
|
||||||
</manifest>
|
</manifest>
|
||||||
|
@@ -72,7 +72,7 @@ class DownloadTask extends AsyncTask<DownloadTaskParams, long[], Void> {
|
|||||||
|
|
||||||
private void downloadFile(DownloadTaskParams param) throws IOException {
|
private void downloadFile(DownloadTaskParams param) throws IOException {
|
||||||
String url = param.url;
|
String url = param.url;
|
||||||
File writePath = param.zipFilePath;
|
File writePath = param.targetFile;
|
||||||
this.hash = param.hash;
|
this.hash = param.hash;
|
||||||
OkHttpClient client = new OkHttpClient();
|
OkHttpClient client = new OkHttpClient();
|
||||||
Request request = new Request.Builder().url(url)
|
Request request = new Request.Builder().url(url)
|
||||||
@@ -97,6 +97,7 @@ class DownloadTask extends AsyncTask<DownloadTaskParams, long[], Void> {
|
|||||||
|
|
||||||
long bytesRead = 0;
|
long bytesRead = 0;
|
||||||
long received = 0;
|
long received = 0;
|
||||||
|
int currentPercentage = 0;
|
||||||
while ((bytesRead = source.read(sink.buffer(), DOWNLOAD_CHUNK_SIZE)) != -1) {
|
while ((bytesRead = source.read(sink.buffer(), DOWNLOAD_CHUNK_SIZE)) != -1) {
|
||||||
received += bytesRead;
|
received += bytesRead;
|
||||||
sink.emit();
|
sink.emit();
|
||||||
@@ -104,11 +105,16 @@ class DownloadTask extends AsyncTask<DownloadTaskParams, long[], Void> {
|
|||||||
Log.d("RNUpdate", "Progress " + received + "/" + contentLength);
|
Log.d("RNUpdate", "Progress " + received + "/" + contentLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
publishProgress(new long[]{received, contentLength});
|
int percentage = (int)(received * 100.0 / contentLength + 0.5);
|
||||||
|
if (percentage > currentPercentage) {
|
||||||
|
currentPercentage = percentage;
|
||||||
|
publishProgress(new long[]{received, contentLength});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (received != contentLength) {
|
if (received != contentLength) {
|
||||||
throw new Error("Unexpected eof while reading ppk");
|
throw new Error("Unexpected eof while reading downloaded update");
|
||||||
}
|
}
|
||||||
|
publishProgress(new long[]{received, contentLength});
|
||||||
sink.writeAll(source);
|
sink.writeAll(source);
|
||||||
sink.close();
|
sink.close();
|
||||||
|
|
||||||
@@ -123,7 +129,7 @@ class DownloadTask extends AsyncTask<DownloadTaskParams, long[], Void> {
|
|||||||
WritableMap params = Arguments.createMap();
|
WritableMap params = Arguments.createMap();
|
||||||
params.putDouble("received", (values[0][0]));
|
params.putDouble("received", (values[0][0]));
|
||||||
params.putDouble("total", (values[0][1]));
|
params.putDouble("total", (values[0][1]));
|
||||||
params.putString("hashname", this.hash);
|
params.putString("hash", this.hash);
|
||||||
sendEvent("RCTPushyDownloadProgress", params);
|
sendEvent("RCTPushyDownloadProgress", params);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -237,10 +243,10 @@ class DownloadTask extends AsyncTask<DownloadTaskParams, long[], Void> {
|
|||||||
copyFilesWithBlacklist("", from, to, blackList);
|
copyFilesWithBlacklist("", from, to, blackList);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void doDownload(DownloadTaskParams param) throws IOException {
|
private void doFullPatch(DownloadTaskParams param) throws IOException {
|
||||||
downloadFile(param);
|
downloadFile(param);
|
||||||
|
|
||||||
ZipInputStream zis = new ZipInputStream(new BufferedInputStream(new FileInputStream(param.zipFilePath)));
|
ZipInputStream zis = new ZipInputStream(new BufferedInputStream(new FileInputStream(param.targetFile)));
|
||||||
ZipEntry ze;
|
ZipEntry ze;
|
||||||
String filename;
|
String filename;
|
||||||
|
|
||||||
@@ -271,12 +277,12 @@ class DownloadTask extends AsyncTask<DownloadTaskParams, long[], Void> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void copyFromResource(HashMap<String, ArrayList<File> > map) throws IOException {
|
private void copyFromResource(HashMap<String, ArrayList<File> > resToCopy) throws IOException {
|
||||||
ZipInputStream zis = new ZipInputStream(new BufferedInputStream(new FileInputStream(context.getPackageResourcePath())));
|
ZipInputStream zis = new ZipInputStream(new BufferedInputStream(new FileInputStream(context.getPackageResourcePath())));
|
||||||
ZipEntry ze;
|
ZipEntry ze;
|
||||||
while ((ze = zis.getNextEntry()) != null) {
|
while ((ze = zis.getNextEntry()) != null) {
|
||||||
String fn = ze.getName();
|
String fn = ze.getName();
|
||||||
ArrayList<File> targets = map.get(fn);
|
ArrayList<File> targets = resToCopy.get(fn);
|
||||||
if (targets != null) {
|
if (targets != null) {
|
||||||
File lastTarget = null;
|
File lastTarget = null;
|
||||||
for (File target: targets) {
|
for (File target: targets) {
|
||||||
@@ -297,10 +303,12 @@ class DownloadTask extends AsyncTask<DownloadTaskParams, long[], Void> {
|
|||||||
private void doPatchFromApk(DownloadTaskParams param) throws IOException, JSONException {
|
private void doPatchFromApk(DownloadTaskParams param) throws IOException, JSONException {
|
||||||
downloadFile(param);
|
downloadFile(param);
|
||||||
|
|
||||||
ZipInputStream zis = new ZipInputStream(new BufferedInputStream(new FileInputStream(param.zipFilePath)));
|
ZipInputStream zis = new ZipInputStream(new BufferedInputStream(new FileInputStream(param.targetFile)));
|
||||||
ZipEntry ze;
|
ZipEntry ze;
|
||||||
int count;
|
int count;
|
||||||
String filename;
|
String filename;
|
||||||
|
boolean foundDiff = false;
|
||||||
|
boolean foundBundlePatch = false;
|
||||||
|
|
||||||
removeDirectory(param.unzipDirectory);
|
removeDirectory(param.unzipDirectory);
|
||||||
param.unzipDirectory.mkdirs();
|
param.unzipDirectory.mkdirs();
|
||||||
@@ -312,6 +320,7 @@ class DownloadTask extends AsyncTask<DownloadTaskParams, long[], Void> {
|
|||||||
String fn = ze.getName();
|
String fn = ze.getName();
|
||||||
|
|
||||||
if (fn.equals("__diff.json")) {
|
if (fn.equals("__diff.json")) {
|
||||||
|
foundDiff = true;
|
||||||
// copy files from assets
|
// copy files from assets
|
||||||
byte[] bytes = readBytes(zis);
|
byte[] bytes = readBytes(zis);
|
||||||
String json = new String(bytes, "UTF-8");
|
String json = new String(bytes, "UTF-8");
|
||||||
@@ -338,6 +347,7 @@ class DownloadTask extends AsyncTask<DownloadTaskParams, long[], Void> {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (fn.equals("index.bundlejs.patch")) {
|
if (fn.equals("index.bundlejs.patch")) {
|
||||||
|
foundBundlePatch = true;
|
||||||
// do bsdiff patch
|
// do bsdiff patch
|
||||||
byte[] patched = bsdiffPatch(readOriginBundle(), readBytes(zis));
|
byte[] patched = bsdiffPatch(readOriginBundle(), readBytes(zis));
|
||||||
|
|
||||||
@@ -361,6 +371,12 @@ class DownloadTask extends AsyncTask<DownloadTaskParams, long[], Void> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
zis.close();
|
zis.close();
|
||||||
|
if (!foundDiff) {
|
||||||
|
throw new Error("diff.json not found");
|
||||||
|
}
|
||||||
|
if (!foundBundlePatch) {
|
||||||
|
throw new Error("bundle patch not found");
|
||||||
|
}
|
||||||
|
|
||||||
copyFromResource(copyList);
|
copyFromResource(copyList);
|
||||||
|
|
||||||
@@ -373,10 +389,12 @@ class DownloadTask extends AsyncTask<DownloadTaskParams, long[], Void> {
|
|||||||
private void doPatchFromPpk(DownloadTaskParams param) throws IOException, JSONException {
|
private void doPatchFromPpk(DownloadTaskParams param) throws IOException, JSONException {
|
||||||
downloadFile(param);
|
downloadFile(param);
|
||||||
|
|
||||||
ZipInputStream zis = new ZipInputStream(new BufferedInputStream(new FileInputStream(param.zipFilePath)));
|
ZipInputStream zis = new ZipInputStream(new BufferedInputStream(new FileInputStream(param.targetFile)));
|
||||||
ZipEntry ze;
|
ZipEntry ze;
|
||||||
int count;
|
int count;
|
||||||
String filename;
|
String filename;
|
||||||
|
boolean foundDiff = false;
|
||||||
|
boolean foundBundlePatch = false;
|
||||||
|
|
||||||
removeDirectory(param.unzipDirectory);
|
removeDirectory(param.unzipDirectory);
|
||||||
param.unzipDirectory.mkdirs();
|
param.unzipDirectory.mkdirs();
|
||||||
@@ -386,6 +404,7 @@ class DownloadTask extends AsyncTask<DownloadTaskParams, long[], Void> {
|
|||||||
String fn = ze.getName();
|
String fn = ze.getName();
|
||||||
|
|
||||||
if (fn.equals("__diff.json")) {
|
if (fn.equals("__diff.json")) {
|
||||||
|
foundDiff = true;
|
||||||
// copy files from assets
|
// copy files from assets
|
||||||
byte[] bytes = readBytes(zis);
|
byte[] bytes = readBytes(zis);
|
||||||
String json = new String(bytes, "UTF-8");
|
String json = new String(bytes, "UTF-8");
|
||||||
@@ -406,6 +425,7 @@ class DownloadTask extends AsyncTask<DownloadTaskParams, long[], Void> {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (fn.equals("index.bundlejs.patch")) {
|
if (fn.equals("index.bundlejs.patch")) {
|
||||||
|
foundBundlePatch = true;
|
||||||
// do bsdiff patch
|
// do bsdiff patch
|
||||||
byte[] patched = bsdiffPatch(readFile(new File(param.originDirectory, "index.bundlejs")), readBytes(zis));
|
byte[] patched = bsdiffPatch(readFile(new File(param.originDirectory, "index.bundlejs")), readBytes(zis));
|
||||||
|
|
||||||
@@ -430,6 +450,12 @@ class DownloadTask extends AsyncTask<DownloadTaskParams, long[], Void> {
|
|||||||
|
|
||||||
zis.close();
|
zis.close();
|
||||||
|
|
||||||
|
if (!foundDiff) {
|
||||||
|
throw new Error("diff.json not found");
|
||||||
|
}
|
||||||
|
if (!foundBundlePatch) {
|
||||||
|
throw new Error("bundle patch not found");
|
||||||
|
}
|
||||||
if (UpdateContext.DEBUG) {
|
if (UpdateContext.DEBUG) {
|
||||||
Log.d("RNUpdate", "Unzip finished");
|
Log.d("RNUpdate", "Unzip finished");
|
||||||
}
|
}
|
||||||
@@ -456,10 +482,11 @@ class DownloadTask extends AsyncTask<DownloadTaskParams, long[], Void> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Void doInBackground(DownloadTaskParams... params) {
|
protected Void doInBackground(DownloadTaskParams... params) {
|
||||||
|
int taskType = params[0].type;
|
||||||
try {
|
try {
|
||||||
switch (params[0].type) {
|
switch (taskType) {
|
||||||
case DownloadTaskParams.TASK_TYPE_FULL_DOWNLOAD:
|
case DownloadTaskParams.TASK_TYPE_PATCH_FULL:
|
||||||
doDownload(params[0]);
|
doFullPatch(params[0]);
|
||||||
break;
|
break;
|
||||||
case DownloadTaskParams.TASK_TYPE_PATCH_FROM_APK:
|
case DownloadTaskParams.TASK_TYPE_PATCH_FROM_APK:
|
||||||
doPatchFromApk(params[0]);
|
doPatchFromApk(params[0]);
|
||||||
@@ -467,16 +494,45 @@ class DownloadTask extends AsyncTask<DownloadTaskParams, long[], Void> {
|
|||||||
case DownloadTaskParams.TASK_TYPE_PATCH_FROM_PPK:
|
case DownloadTaskParams.TASK_TYPE_PATCH_FROM_PPK:
|
||||||
doPatchFromPpk(params[0]);
|
doPatchFromPpk(params[0]);
|
||||||
break;
|
break;
|
||||||
case DownloadTaskParams.TASK_TYPE_CLEARUP:
|
case DownloadTaskParams.TASK_TYPE_CLEANUP:
|
||||||
doCleanUp(params[0]);
|
doCleanUp(params[0]);
|
||||||
break;
|
break;
|
||||||
|
case DownloadTaskParams.TASK_TYPE_PLAIN_DOWNLOAD:
|
||||||
|
downloadFile(params[0]);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (params[0].listener != null) {
|
||||||
|
params[0].listener.onDownloadCompleted(params[0]);
|
||||||
}
|
}
|
||||||
params[0].listener.onDownloadCompleted();
|
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
if (UpdateContext.DEBUG) {
|
if (UpdateContext.DEBUG) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
params[0].listener.onDownloadFailed(e);
|
switch (taskType) {
|
||||||
|
case DownloadTaskParams.TASK_TYPE_PATCH_FULL:
|
||||||
|
case DownloadTaskParams.TASK_TYPE_PATCH_FROM_APK:
|
||||||
|
case DownloadTaskParams.TASK_TYPE_PATCH_FROM_PPK:
|
||||||
|
try {
|
||||||
|
removeDirectory(params[0].unzipDirectory);
|
||||||
|
} catch (IOException ioException) {
|
||||||
|
ioException.printStackTrace();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case DownloadTaskParams.TASK_TYPE_PLAIN_DOWNLOAD:
|
||||||
|
// if (targetToClean.exists()) {
|
||||||
|
params[0].targetFile.delete();
|
||||||
|
// }
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
Log.e("pushy", "download task failed", e);
|
||||||
|
|
||||||
|
if (params[0].listener != null) {
|
||||||
|
params[0].listener.onDownloadFailed(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@@ -8,17 +8,18 @@ import java.io.File;
|
|||||||
* Created by tdzl2003 on 3/31/16.
|
* Created by tdzl2003 on 3/31/16.
|
||||||
*/
|
*/
|
||||||
class DownloadTaskParams {
|
class DownloadTaskParams {
|
||||||
static final int TASK_TYPE_FULL_DOWNLOAD = 1;
|
static final int TASK_TYPE_PATCH_FULL = 1;
|
||||||
static final int TASK_TYPE_PATCH_FROM_APK = 2;
|
static final int TASK_TYPE_PATCH_FROM_APK = 2;
|
||||||
static final int TASK_TYPE_PATCH_FROM_PPK = 3;
|
static final int TASK_TYPE_PATCH_FROM_PPK = 3;
|
||||||
|
static final int TASK_TYPE_PLAIN_DOWNLOAD = 4;
|
||||||
|
|
||||||
static final int TASK_TYPE_CLEARUP = 0; //Keep hash & originHash
|
static final int TASK_TYPE_CLEANUP = 0; //Keep hash & originHash
|
||||||
|
|
||||||
int type;
|
int type;
|
||||||
String url;
|
String url;
|
||||||
String hash;
|
String hash;
|
||||||
String originHash;
|
String originHash;
|
||||||
File zipFilePath;
|
File targetFile;
|
||||||
File unzipDirectory;
|
File unzipDirectory;
|
||||||
File originDirectory;
|
File originDirectory;
|
||||||
UpdateContext.DownloadFileListener listener;
|
UpdateContext.DownloadFileListener listener;
|
||||||
|
@@ -0,0 +1,14 @@
|
|||||||
|
package cn.reactnative.modules.update;
|
||||||
|
|
||||||
|
import android.support.v4.content.FileProvider;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Providing a custom {@code FileProvider} prevents manifest {@code <provider>} name collisions.
|
||||||
|
*
|
||||||
|
* See https://developer.android.com/guide/topics/manifest/provider-element.html for details.
|
||||||
|
*/
|
||||||
|
public class PushyFileProvider extends FileProvider {
|
||||||
|
|
||||||
|
// This class intentionally left blank.
|
||||||
|
|
||||||
|
}
|
@@ -7,6 +7,8 @@ import android.content.pm.PackageManager;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import com.facebook.react.ReactInstanceManager;
|
import com.facebook.react.ReactInstanceManager;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.concurrent.Executor;
|
import java.util.concurrent.Executor;
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.Executors;
|
||||||
|
|
||||||
@@ -44,7 +46,7 @@ public class UpdateContext {
|
|||||||
editor.putString("packageVersion", packageVersion);
|
editor.putString("packageVersion", packageVersion);
|
||||||
editor.apply();
|
editor.apply();
|
||||||
|
|
||||||
this.clearUp();
|
this.cleanUp();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -68,59 +70,81 @@ public class UpdateContext {
|
|||||||
return context.getString(R.string.pushy_build_time);
|
return context.getString(R.string.pushy_build_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getUuid() {
|
||||||
|
return sp.getString("uuid", null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map getBlockUpdate() {
|
||||||
|
return new HashMap<String, Object>() {{
|
||||||
|
put("until", sp.getInt("blockUntil", 0));
|
||||||
|
put("reason", sp.getString("blockReason", null));
|
||||||
|
}};
|
||||||
|
}
|
||||||
|
|
||||||
public boolean getIsUsingBundleUrl() {
|
public boolean getIsUsingBundleUrl() {
|
||||||
return isUsingBundleUrl;
|
return isUsingBundleUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface DownloadFileListener {
|
public interface DownloadFileListener {
|
||||||
void onDownloadCompleted();
|
void onDownloadCompleted(DownloadTaskParams params);
|
||||||
void onDownloadFailed(Throwable error);
|
void onDownloadFailed(Throwable error);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void downloadFile(String url, String hashName, DownloadFileListener listener) {
|
public void downloadFullUpdate(String url, String hash, DownloadFileListener listener) {
|
||||||
DownloadTaskParams params = new DownloadTaskParams();
|
DownloadTaskParams params = new DownloadTaskParams();
|
||||||
params.type = DownloadTaskParams.TASK_TYPE_FULL_DOWNLOAD;
|
params.type = DownloadTaskParams.TASK_TYPE_PATCH_FULL;
|
||||||
params.url = url;
|
params.url = url;
|
||||||
params.hash = hashName;
|
params.hash = hash;
|
||||||
params.listener = listener;
|
params.listener = listener;
|
||||||
params.zipFilePath = new File(rootDir, hashName + ".ppk");
|
params.targetFile = new File(rootDir, hash + ".ppk");
|
||||||
params.unzipDirectory = new File(rootDir, hashName);
|
params.unzipDirectory = new File(rootDir, hash);
|
||||||
new DownloadTask(context).executeOnExecutor(this.executor, params);
|
new DownloadTask(context).executeOnExecutor(this.executor, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void downloadPatchFromApk(String url, String hashName, DownloadFileListener listener) {
|
public void downloadFile(String url, String hash, String fileName, DownloadFileListener listener) {
|
||||||
|
DownloadTaskParams params = new DownloadTaskParams();
|
||||||
|
params.type = DownloadTaskParams.TASK_TYPE_PLAIN_DOWNLOAD;
|
||||||
|
params.url = url;
|
||||||
|
params.hash = hash;
|
||||||
|
params.listener = listener;
|
||||||
|
params.targetFile = new File(rootDir, fileName);
|
||||||
|
// params.unzipDirectory = new File(rootDir, hash);
|
||||||
|
new DownloadTask(context).executeOnExecutor(this.executor, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void downloadPatchFromApk(String url, String hash, DownloadFileListener listener) {
|
||||||
DownloadTaskParams params = new DownloadTaskParams();
|
DownloadTaskParams params = new DownloadTaskParams();
|
||||||
params.type = DownloadTaskParams.TASK_TYPE_PATCH_FROM_APK;
|
params.type = DownloadTaskParams.TASK_TYPE_PATCH_FROM_APK;
|
||||||
params.url = url;
|
params.url = url;
|
||||||
params.hash = hashName;
|
params.hash = hash;
|
||||||
params.listener = listener;
|
params.listener = listener;
|
||||||
params.zipFilePath = new File(rootDir, hashName + ".apk.patch");
|
params.targetFile = new File(rootDir, hash + ".apk.patch");
|
||||||
params.unzipDirectory = new File(rootDir, hashName);
|
params.unzipDirectory = new File(rootDir, hash);
|
||||||
new DownloadTask(context).executeOnExecutor(this.executor, params);
|
new DownloadTask(context).executeOnExecutor(this.executor, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void downloadPatchFromPpk(String url, String hashName, String originHashName, DownloadFileListener listener) {
|
public void downloadPatchFromPpk(String url, String hash, String originHash, DownloadFileListener listener) {
|
||||||
DownloadTaskParams params = new DownloadTaskParams();
|
DownloadTaskParams params = new DownloadTaskParams();
|
||||||
params.type = DownloadTaskParams.TASK_TYPE_PATCH_FROM_PPK;
|
params.type = DownloadTaskParams.TASK_TYPE_PATCH_FROM_PPK;
|
||||||
params.url = url;
|
params.url = url;
|
||||||
params.hash = hashName;
|
params.hash = hash;
|
||||||
params.originHash = originHashName;
|
params.originHash = originHash;
|
||||||
params.listener = listener;
|
params.listener = listener;
|
||||||
params.zipFilePath = new File(rootDir, originHashName + "-" + hashName + ".ppk.patch");
|
params.targetFile = new File(rootDir, originHash + "-" + hash + ".ppk.patch");
|
||||||
params.unzipDirectory = new File(rootDir, hashName);
|
params.unzipDirectory = new File(rootDir, hash);
|
||||||
params.originDirectory = new File(rootDir, originHashName);
|
params.originDirectory = new File(rootDir, originHash);
|
||||||
new DownloadTask(context).executeOnExecutor(this.executor, params);
|
new DownloadTask(context).executeOnExecutor(this.executor, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
private SharedPreferences sp;
|
private SharedPreferences sp;
|
||||||
|
|
||||||
public void switchVersion(String hashName) {
|
public void switchVersion(String hash) {
|
||||||
if (!new File(rootDir, hashName+"/index.bundlejs").exists()) {
|
if (!new File(rootDir, hash+"/index.bundlejs").exists()) {
|
||||||
throw new Error("Bundle version " + hashName + " not found.");
|
throw new Error("Bundle version " + hash + " not found.");
|
||||||
}
|
}
|
||||||
String lastVersion = getCurrentVersion();
|
String lastVersion = getCurrentVersion();
|
||||||
SharedPreferences.Editor editor = sp.edit();
|
SharedPreferences.Editor editor = sp.edit();
|
||||||
editor.putString("currentVersion", hashName);
|
editor.putString("currentVersion", hash);
|
||||||
if (lastVersion != null) {
|
if (lastVersion != null) {
|
||||||
editor.putString("lastVersion", lastVersion);
|
editor.putString("lastVersion", lastVersion);
|
||||||
}
|
}
|
||||||
@@ -130,6 +154,19 @@ public class UpdateContext {
|
|||||||
editor.apply();
|
editor.apply();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setUuid(String uuid) {
|
||||||
|
SharedPreferences.Editor editor = sp.edit();
|
||||||
|
editor.putString("uuid", uuid);
|
||||||
|
editor.apply();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBlockUpdate(int until, String reason) {
|
||||||
|
SharedPreferences.Editor editor = sp.edit();
|
||||||
|
editor.putInt("blockUntil", until);
|
||||||
|
editor.putString("blockReason", reason);
|
||||||
|
editor.apply();
|
||||||
|
}
|
||||||
|
|
||||||
public String getCurrentVersion() {
|
public String getCurrentVersion() {
|
||||||
return sp.getString("currentVersion", null);
|
return sp.getString("currentVersion", null);
|
||||||
}
|
}
|
||||||
@@ -148,7 +185,7 @@ public class UpdateContext {
|
|||||||
editor.remove("lastVersion");
|
editor.remove("lastVersion");
|
||||||
editor.apply();
|
editor.apply();
|
||||||
|
|
||||||
this.clearUp();
|
this.cleanUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void clearFirstTime() {
|
public void clearFirstTime() {
|
||||||
@@ -156,7 +193,7 @@ public class UpdateContext {
|
|||||||
editor.putBoolean("firstTime", false);
|
editor.putBoolean("firstTime", false);
|
||||||
editor.apply();
|
editor.apply();
|
||||||
|
|
||||||
this.clearUp();
|
this.cleanUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void clearRollbackMark() {
|
public void clearRollbackMark() {
|
||||||
@@ -164,7 +201,7 @@ public class UpdateContext {
|
|||||||
editor.putBoolean("rolledBack", false);
|
editor.putBoolean("rolledBack", false);
|
||||||
editor.apply();
|
editor.apply();
|
||||||
|
|
||||||
this.clearUp();
|
this.cleanUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -230,21 +267,12 @@ public class UpdateContext {
|
|||||||
return lastVersion;
|
return lastVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void clearUp() {
|
private void cleanUp() {
|
||||||
DownloadTaskParams params = new DownloadTaskParams();
|
DownloadTaskParams params = new DownloadTaskParams();
|
||||||
params.type = DownloadTaskParams.TASK_TYPE_CLEARUP;
|
params.type = DownloadTaskParams.TASK_TYPE_CLEANUP;
|
||||||
params.hash = sp.getString("currentVersion", null);
|
params.hash = sp.getString("currentVersion", null);
|
||||||
params.originHash = sp.getString("lastVersion", null);
|
params.originHash = sp.getString("lastVersion", null);
|
||||||
params.unzipDirectory = rootDir;
|
params.unzipDirectory = rootDir;
|
||||||
params.listener = new DownloadFileListener() {
|
|
||||||
@Override
|
|
||||||
public void onDownloadCompleted() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onDownloadFailed(Throwable error) {
|
|
||||||
}
|
|
||||||
};
|
|
||||||
new DownloadTask(context).executeOnExecutor(this.executor, params);
|
new DownloadTask(context).executeOnExecutor(this.executor, params);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -3,6 +3,8 @@ package cn.reactnative.modules.update;
|
|||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.Application;
|
import android.app.Application;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.net.Uri;
|
||||||
|
import android.os.Build;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.facebook.react.ReactApplication;
|
import com.facebook.react.ReactApplication;
|
||||||
@@ -18,21 +20,25 @@ import com.facebook.react.bridge.JSBundleLoader;
|
|||||||
import com.facebook.react.bridge.WritableMap;
|
import com.facebook.react.bridge.WritableMap;
|
||||||
import com.facebook.react.modules.core.DeviceEventManagerModule;
|
import com.facebook.react.modules.core.DeviceEventManagerModule;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import static android.support.v4.content.FileProvider.getUriForFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by tdzl2003 on 3/31/16.
|
* Created by tdzl2003 on 3/31/16.
|
||||||
*/
|
*/
|
||||||
public class UpdateModule extends ReactContextBaseJavaModule{
|
public class UpdateModule extends ReactContextBaseJavaModule {
|
||||||
UpdateContext updateContext;
|
UpdateContext updateContext;
|
||||||
public static ReactApplicationContext mContext;
|
public static ReactApplicationContext mContext;
|
||||||
|
|
||||||
public UpdateModule(ReactApplicationContext reactContext, UpdateContext updateContext) {
|
public UpdateModule(ReactApplicationContext reactContext, UpdateContext updateContext) {
|
||||||
super(reactContext);
|
super(reactContext);
|
||||||
this.updateContext = updateContext;
|
this.updateContext = updateContext;
|
||||||
mContext=reactContext;
|
mContext = reactContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
public UpdateModule(ReactApplicationContext reactContext) {
|
public UpdateModule(ReactApplicationContext reactContext) {
|
||||||
@@ -57,6 +63,8 @@ public class UpdateModule extends ReactContextBaseJavaModule{
|
|||||||
if (isRolledBack) {
|
if (isRolledBack) {
|
||||||
updateContext.clearRollbackMark();
|
updateContext.clearRollbackMark();
|
||||||
}
|
}
|
||||||
|
constants.put("blockUpdate", updateContext.getBlockUpdate());
|
||||||
|
constants.put("uuid", updateContext.getUuid());
|
||||||
return constants;
|
return constants;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,12 +74,12 @@ public class UpdateModule extends ReactContextBaseJavaModule{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ReactMethod
|
@ReactMethod
|
||||||
public void downloadUpdate(ReadableMap options, final Promise promise){
|
public void downloadUpdate(ReadableMap options, final Promise promise) {
|
||||||
String url = options.getString("updateUrl");
|
String url = options.getString("updateUrl");
|
||||||
String hash = options.getString("hashName");
|
String hash = options.getString("hash");
|
||||||
updateContext.downloadFile(url, hash, new UpdateContext.DownloadFileListener() {
|
updateContext.downloadFullUpdate(url, hash, new UpdateContext.DownloadFileListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onDownloadCompleted() {
|
public void onDownloadCompleted(DownloadTaskParams params) {
|
||||||
promise.resolve(null);
|
promise.resolve(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,12 +91,61 @@ public class UpdateModule extends ReactContextBaseJavaModule{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ReactMethod
|
@ReactMethod
|
||||||
public void downloadPatchFromPackage(ReadableMap options, final Promise promise){
|
public void downloadAndInstallApk(ReadableMap options, final Promise promise) {
|
||||||
|
String url = options.getString("url");
|
||||||
|
String hash = options.getString("hash");
|
||||||
|
String target = options.getString("target");
|
||||||
|
updateContext.downloadFile(url, hash, target, new UpdateContext.DownloadFileListener() {
|
||||||
|
@Override
|
||||||
|
public void onDownloadCompleted(DownloadTaskParams params) {
|
||||||
|
installApk(params.targetFile);
|
||||||
|
promise.resolve(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDownloadFailed(Throwable error) {
|
||||||
|
promise.reject(error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// install downloaded apk
|
||||||
|
@ReactMethod
|
||||||
|
public static void installApk(String url) {
|
||||||
|
File toInstall = new File(url);
|
||||||
|
installApk(toInstall);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void installApk(File toInstall) {
|
||||||
|
Uri apkUri;
|
||||||
|
Intent intent;
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||||
|
apkUri = getUriForFile(mContext, mContext.getPackageName() + ".pushy.fileprovider", toInstall);
|
||||||
|
intent = new Intent(Intent.ACTION_INSTALL_PACKAGE);
|
||||||
|
intent.setData(apkUri);
|
||||||
|
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||||
|
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
|
mContext.startActivity(intent);
|
||||||
|
} else {
|
||||||
|
apkUri = Uri.fromFile(toInstall);
|
||||||
|
intent = new Intent(Intent.ACTION_VIEW);
|
||||||
|
intent.setDataAndType(apkUri, "application/vnd.android.package-archive");
|
||||||
|
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
|
mContext.startActivity(intent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ReactMethod
|
||||||
|
public void downloadPatchFromPackage(ReadableMap options, final Promise promise) {
|
||||||
String url = options.getString("updateUrl");
|
String url = options.getString("updateUrl");
|
||||||
String hash = options.getString("hashName");
|
String hash = options.getString("hash");
|
||||||
|
if (hash == null) {
|
||||||
|
hash = options.getString("hashName");
|
||||||
|
}
|
||||||
updateContext.downloadPatchFromApk(url, hash, new UpdateContext.DownloadFileListener() {
|
updateContext.downloadPatchFromApk(url, hash, new UpdateContext.DownloadFileListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onDownloadCompleted() {
|
public void onDownloadCompleted(DownloadTaskParams params) {
|
||||||
promise.resolve(null);
|
promise.resolve(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,13 +157,19 @@ public class UpdateModule extends ReactContextBaseJavaModule{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ReactMethod
|
@ReactMethod
|
||||||
public void downloadPatchFromPpk(ReadableMap options, final Promise promise){
|
public void downloadPatchFromPpk(ReadableMap options, final Promise promise) {
|
||||||
String url = options.getString("updateUrl");
|
String url = options.getString("updateUrl");
|
||||||
String hash = options.getString("hashName");
|
String hash = options.getString("hash");
|
||||||
String originHash = options.getString("originHashName");
|
if (hash == null) {
|
||||||
|
hash = options.getString("hashName");
|
||||||
|
}
|
||||||
|
String originHash = options.getString("originHash");
|
||||||
|
if (originHash == null) {
|
||||||
|
originHash = options.getString(("originHashName"));
|
||||||
|
}
|
||||||
updateContext.downloadPatchFromPpk(url, hash, originHash, new UpdateContext.DownloadFileListener() {
|
updateContext.downloadPatchFromPpk(url, hash, originHash, new UpdateContext.DownloadFileListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onDownloadCompleted() {
|
public void onDownloadCompleted(DownloadTaskParams params) {
|
||||||
promise.resolve(null);
|
promise.resolve(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -119,7 +182,8 @@ public class UpdateModule extends ReactContextBaseJavaModule{
|
|||||||
|
|
||||||
@ReactMethod
|
@ReactMethod
|
||||||
public void reloadUpdate(ReadableMap options) {
|
public void reloadUpdate(ReadableMap options) {
|
||||||
final String hash = options.getString("hashName");
|
final String hash = options.getString("hash") == null ?
|
||||||
|
options.getString("hashName") : options.getString("hash");
|
||||||
|
|
||||||
UiThreadUtil.runOnUiThread(new Runnable() {
|
UiThreadUtil.runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
@@ -147,7 +211,7 @@ public class UpdateModule extends ReactContextBaseJavaModule{
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
instanceManager.recreateReactContextInBackground();
|
instanceManager.recreateReactContextInBackground();
|
||||||
} catch(Throwable err) {
|
} catch (Throwable err) {
|
||||||
activity.recreate();
|
activity.recreate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -160,7 +224,8 @@ public class UpdateModule extends ReactContextBaseJavaModule{
|
|||||||
|
|
||||||
@ReactMethod
|
@ReactMethod
|
||||||
public void setNeedUpdate(ReadableMap options) {
|
public void setNeedUpdate(ReadableMap options) {
|
||||||
final String hash = options.getString("hashName");
|
final String hash = options.getString("hash") == null ?
|
||||||
|
options.getString("hashName") : options.getString("hash");
|
||||||
|
|
||||||
UiThreadUtil.runOnUiThread(new Runnable() {
|
UiThreadUtil.runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
@@ -184,8 +249,30 @@ public class UpdateModule extends ReactContextBaseJavaModule{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ReactMethod
|
||||||
|
public void setBlockUpdate(ReadableMap options) {
|
||||||
|
final int until = options.getInt("until");
|
||||||
|
final String reason = options.getString("reason");
|
||||||
|
UiThreadUtil.runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
updateContext.setBlockUpdate(until, reason);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@ReactMethod
|
||||||
|
public void setUuid(final String uuid) {
|
||||||
|
UiThreadUtil.runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
updateContext.setUuid(uuid);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/* 发送事件*/
|
/* 发送事件*/
|
||||||
public static void sendEvent(String eventName, WritableMap params) {
|
public static void sendEvent(String eventName, WritableMap params) {
|
||||||
((ReactContext) mContext).getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class).emit(eventName,
|
((ReactContext) mContext).getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class).emit(eventName,
|
||||||
params);
|
params);
|
||||||
}
|
}
|
||||||
|
5
android/src/main/res/xml/pushy_file_paths.xml
Normal file
5
android/src/main/res/xml/pushy_file_paths.xml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<paths xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<files-path
|
||||||
|
name="pushy"
|
||||||
|
path="." />
|
||||||
|
</paths>
|
@@ -6,13 +6,11 @@
|
|||||||
// Copyright © 2016 erica. All rights reserved.
|
// Copyright © 2016 erica. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
#if __has_include(<React/RCTBridge.h>)
|
|
||||||
#import <React/RCTBridgeModule.h>
|
#import <React/RCTBridgeModule.h>
|
||||||
#else
|
#import <React/RCTEventEmitter.h>
|
||||||
#import "RCTBridgeModule.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
@interface RCTPushy : NSObject<RCTBridgeModule>
|
|
||||||
|
@interface RCTPushy : RCTEventEmitter<RCTBridgeModule>
|
||||||
|
|
||||||
+ (NSURL *)bundleURL;
|
+ (NSURL *)bundleURL;
|
||||||
|
|
||||||
|
@@ -10,23 +10,19 @@
|
|||||||
#import "RCTPushyDownloader.h"
|
#import "RCTPushyDownloader.h"
|
||||||
#import "RCTPushyManager.h"
|
#import "RCTPushyManager.h"
|
||||||
|
|
||||||
#if __has_include(<React/RCTBridge.h>)
|
|
||||||
#import "React/RCTEventDispatcher.h"
|
|
||||||
#import <React/RCTConvert.h>
|
#import <React/RCTConvert.h>
|
||||||
#import <React/RCTLog.h>
|
#import <React/RCTLog.h>
|
||||||
#else
|
// #import <React/RCTReloadCommand.h>
|
||||||
#import "RCTEventDispatcher.h"
|
|
||||||
#import "RCTConvert.h"
|
|
||||||
#import "RCTLog.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
|
||||||
static NSString *const keyPushyInfo = @"REACTNATIVECN_PUSHY_INFO_KEY";
|
static NSString *const keyPushyInfo = @"REACTNATIVECN_PUSHY_INFO_KEY";
|
||||||
static NSString *const paramPackageVersion = @"packageVersion";
|
static NSString *const paramPackageVersion = @"packageVersion";
|
||||||
static NSString *const paramLastVersion = @"lastVersion";
|
static NSString *const paramLastVersion = @"lastVersion";
|
||||||
static NSString *const paramCurrentVersion = @"currentVersion";
|
static NSString *const paramCurrentVersion = @"currentVersion";
|
||||||
static NSString *const paramIsFirstTime = @"isFirstTime";
|
static NSString *const paramIsFirstTime = @"isFirstTime";
|
||||||
static NSString *const paramIsFirstLoadOk = @"isFirstLoadOK";
|
static NSString *const paramIsFirstLoadOk = @"isFirstLoadOK";
|
||||||
|
static NSString *const keyBlockUpdate = @"REACTNATIVECN_PUSHY_BLOCKUPDATE";
|
||||||
|
static NSString *const keyUuid = @"REACTNATIVECN_PUSHY_UUID";
|
||||||
static NSString *const keyFirstLoadMarked = @"REACTNATIVECN_PUSHY_FIRSTLOADMARKED_KEY";
|
static NSString *const keyFirstLoadMarked = @"REACTNATIVECN_PUSHY_FIRSTLOADMARKED_KEY";
|
||||||
static NSString *const keyRolledBackMarked = @"REACTNATIVECN_PUSHY_ROLLEDBACKMARKED_KEY";
|
static NSString *const keyRolledBackMarked = @"REACTNATIVECN_PUSHY_ROLLEDBACKMARKED_KEY";
|
||||||
static NSString *const KeyPackageUpdatedMarked = @"REACTNATIVECN_PUSHY_ISPACKAGEUPDATEDMARKED_KEY";
|
static NSString *const KeyPackageUpdatedMarked = @"REACTNATIVECN_PUSHY_ISPACKAGEUPDATEDMARKED_KEY";
|
||||||
@@ -47,8 +43,8 @@ static NSString * const ERROR_FILE_OPERATION = @"file operation error";
|
|||||||
|
|
||||||
// event def
|
// event def
|
||||||
static NSString * const EVENT_PROGRESS_DOWNLOAD = @"RCTPushyDownloadProgress";
|
static NSString * const EVENT_PROGRESS_DOWNLOAD = @"RCTPushyDownloadProgress";
|
||||||
static NSString * const EVENT_PROGRESS_UNZIP = @"RCTPushyUnzipProgress";
|
// static NSString * const EVENT_PROGRESS_UNZIP = @"RCTPushyUnzipProgress";
|
||||||
static NSString * const PARAM_PROGRESS_HASHNAME = @"hashname";
|
static NSString * const PARAM_PROGRESS_HASH = @"hash";
|
||||||
static NSString * const PARAM_PROGRESS_RECEIVED = @"received";
|
static NSString * const PARAM_PROGRESS_RECEIVED = @"received";
|
||||||
static NSString * const PARAM_PROGRESS_TOTAL = @"total";
|
static NSString * const PARAM_PROGRESS_TOTAL = @"total";
|
||||||
|
|
||||||
@@ -63,9 +59,9 @@ static BOOL ignoreRollback = false;
|
|||||||
|
|
||||||
@implementation RCTPushy {
|
@implementation RCTPushy {
|
||||||
RCTPushyManager *_fileManager;
|
RCTPushyManager *_fileManager;
|
||||||
|
bool hasListeners;
|
||||||
}
|
}
|
||||||
|
|
||||||
@synthesize bridge = _bridge;
|
|
||||||
@synthesize methodQueue = _methodQueue;
|
@synthesize methodQueue = _methodQueue;
|
||||||
|
|
||||||
RCT_EXPORT_MODULE(RCTPushy);
|
RCT_EXPORT_MODULE(RCTPushy);
|
||||||
@@ -88,7 +84,6 @@ RCT_EXPORT_MODULE(RCTPushy);
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
NSString *curVersion = pushyInfo[paramCurrentVersion];
|
NSString *curVersion = pushyInfo[paramCurrentVersion];
|
||||||
NSString *lastVersion = pushyInfo[paramLastVersion];
|
|
||||||
|
|
||||||
BOOL isFirstTime = [pushyInfo[paramIsFirstTime] boolValue];
|
BOOL isFirstTime = [pushyInfo[paramIsFirstTime] boolValue];
|
||||||
BOOL isFirstLoadOK = [pushyInfo[paramIsFirstLoadOk] boolValue];
|
BOOL isFirstLoadOK = [pushyInfo[paramIsFirstLoadOk] boolValue];
|
||||||
@@ -96,23 +91,7 @@ RCT_EXPORT_MODULE(RCTPushy);
|
|||||||
NSString *loadVersion = curVersion;
|
NSString *loadVersion = curVersion;
|
||||||
BOOL needRollback = (!ignoreRollback && isFirstTime == NO && isFirstLoadOK == NO) || loadVersion.length<=0;
|
BOOL needRollback = (!ignoreRollback && isFirstTime == NO && isFirstLoadOK == NO) || loadVersion.length<=0;
|
||||||
if (needRollback) {
|
if (needRollback) {
|
||||||
loadVersion = lastVersion;
|
loadVersion = [self rollback];
|
||||||
|
|
||||||
if (lastVersion.length) {
|
|
||||||
// roll back to last version
|
|
||||||
[defaults setObject:@{paramCurrentVersion:lastVersion,
|
|
||||||
paramIsFirstTime:@(NO),
|
|
||||||
paramIsFirstLoadOk:@(YES),
|
|
||||||
paramPackageVersion:curPackageVersion}
|
|
||||||
forKey:keyPushyInfo];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// roll back to bundle
|
|
||||||
[defaults setObject:nil forKey:keyPushyInfo];
|
|
||||||
}
|
|
||||||
[defaults setObject:@(YES) forKey:keyRolledBackMarked];
|
|
||||||
[defaults synchronize];
|
|
||||||
// ...need clear files later
|
|
||||||
}
|
}
|
||||||
else if (isFirstTime && !ignoreRollback){
|
else if (isFirstTime && !ignoreRollback){
|
||||||
// bundleURL may be called many times, ignore rollbacks before process restarted again.
|
// bundleURL may be called many times, ignore rollbacks before process restarted again.
|
||||||
@@ -125,13 +104,15 @@ RCT_EXPORT_MODULE(RCTPushy);
|
|||||||
[defaults synchronize];
|
[defaults synchronize];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (loadVersion.length) {
|
NSString *downloadDir = [RCTPushy downloadDir];
|
||||||
NSString *downloadDir = [RCTPushy downloadDir];
|
while (loadVersion.length) {
|
||||||
|
|
||||||
NSString *bundlePath = [[downloadDir stringByAppendingPathComponent:loadVersion] stringByAppendingPathComponent:BUNDLE_FILE_NAME];
|
NSString *bundlePath = [[downloadDir stringByAppendingPathComponent:loadVersion] stringByAppendingPathComponent:BUNDLE_FILE_NAME];
|
||||||
if ([[NSFileManager defaultManager] fileExistsAtPath:bundlePath isDirectory:NULL]) {
|
if ([[NSFileManager defaultManager] fileExistsAtPath:bundlePath isDirectory:NULL]) {
|
||||||
NSURL *bundleURL = [NSURL fileURLWithPath:bundlePath];
|
NSURL *bundleURL = [NSURL fileURLWithPath:bundlePath];
|
||||||
return bundleURL;
|
return bundleURL;
|
||||||
|
} else {
|
||||||
|
RCTLogError(@"RCTPushy -- bundle version %@ not found", loadVersion);
|
||||||
|
loadVersion = [self rollback];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -140,6 +121,29 @@ RCT_EXPORT_MODULE(RCTPushy);
|
|||||||
return [RCTPushy binaryBundleURL];
|
return [RCTPushy binaryBundleURL];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
+ (NSString *) rollback {
|
||||||
|
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||||
|
|
||||||
|
NSDictionary *pushyInfo = [defaults dictionaryForKey:keyPushyInfo];
|
||||||
|
NSString *lastVersion = pushyInfo[paramLastVersion];
|
||||||
|
NSString *curPackageVersion = [RCTPushy packageVersion];
|
||||||
|
if (lastVersion.length) {
|
||||||
|
// roll back to last version
|
||||||
|
[defaults setObject:@{paramCurrentVersion:lastVersion,
|
||||||
|
paramIsFirstTime:@(NO),
|
||||||
|
paramIsFirstLoadOk:@(YES),
|
||||||
|
paramPackageVersion:curPackageVersion}
|
||||||
|
forKey:keyPushyInfo];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// roll back to bundle
|
||||||
|
[defaults setObject:nil forKey:keyPushyInfo];
|
||||||
|
}
|
||||||
|
[defaults setObject:@(YES) forKey:keyRolledBackMarked];
|
||||||
|
[defaults synchronize];
|
||||||
|
return lastVersion;
|
||||||
|
}
|
||||||
|
|
||||||
+ (BOOL)requiresMainQueueSetup {
|
+ (BOOL)requiresMainQueueSetup {
|
||||||
// only set to YES if your module initialization relies on calling UIKit!
|
// only set to YES if your module initialization relies on calling UIKit!
|
||||||
return NO;
|
return NO;
|
||||||
@@ -155,6 +159,8 @@ RCT_EXPORT_MODULE(RCTPushy);
|
|||||||
ret[@"buildTime"] = [RCTPushy buildTime];
|
ret[@"buildTime"] = [RCTPushy buildTime];
|
||||||
ret[@"isRolledBack"] = [defaults objectForKey:keyRolledBackMarked];
|
ret[@"isRolledBack"] = [defaults objectForKey:keyRolledBackMarked];
|
||||||
ret[@"isFirstTime"] = [defaults objectForKey:keyFirstLoadMarked];
|
ret[@"isFirstTime"] = [defaults objectForKey:keyFirstLoadMarked];
|
||||||
|
ret[@"blockUpdate"] = [defaults objectForKey:keyBlockUpdate];
|
||||||
|
ret[@"uuid"] = [defaults objectForKey:keyUuid];
|
||||||
NSDictionary *pushyInfo = [defaults dictionaryForKey:keyPushyInfo];
|
NSDictionary *pushyInfo = [defaults dictionaryForKey:keyPushyInfo];
|
||||||
ret[@"currentVersion"] = [pushyInfo objectForKey:paramCurrentVersion];
|
ret[@"currentVersion"] = [pushyInfo objectForKey:paramCurrentVersion];
|
||||||
|
|
||||||
@@ -188,6 +194,23 @@ RCT_EXPORT_MODULE(RCTPushy);
|
|||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RCT_EXPORT_METHOD(setBlockUpdate:(NSDictionary *)options)
|
||||||
|
{
|
||||||
|
// NSMutableDictionary *blockUpdateInfo = [NSMutableDictionary new];
|
||||||
|
// blockUpdateInfo[@"reason"] = options[@"reason"];
|
||||||
|
// blockUpdateInfo[@"until"] = options[@"until"];
|
||||||
|
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||||
|
[defaults setObject:options forKey:keyBlockUpdate];
|
||||||
|
[defaults synchronize];
|
||||||
|
}
|
||||||
|
|
||||||
|
RCT_EXPORT_METHOD(setUuid:(NSString *)uuid)
|
||||||
|
{
|
||||||
|
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||||
|
[defaults setObject:uuid forKey:keyUuid];
|
||||||
|
[defaults synchronize];
|
||||||
|
}
|
||||||
|
|
||||||
RCT_EXPORT_METHOD(downloadUpdate:(NSDictionary *)options
|
RCT_EXPORT_METHOD(downloadUpdate:(NSDictionary *)options
|
||||||
resolver:(RCTPromiseResolveBlock)resolve
|
resolver:(RCTPromiseResolveBlock)resolve
|
||||||
rejecter:(RCTPromiseRejectBlock)reject)
|
rejecter:(RCTPromiseRejectBlock)reject)
|
||||||
@@ -232,8 +255,11 @@ RCT_EXPORT_METHOD(downloadPatchFromPpk:(NSDictionary *)options
|
|||||||
|
|
||||||
RCT_EXPORT_METHOD(setNeedUpdate:(NSDictionary *)options)
|
RCT_EXPORT_METHOD(setNeedUpdate:(NSDictionary *)options)
|
||||||
{
|
{
|
||||||
NSString *hashName = options[@"hashName"];
|
NSString *hash = options[@"hash"];
|
||||||
if (hashName.length) {
|
if (hash.length <= 0) {
|
||||||
|
hash = options[@"hashName"];
|
||||||
|
}
|
||||||
|
if (hash.length) {
|
||||||
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||||
NSString *lastVersion = nil;
|
NSString *lastVersion = nil;
|
||||||
if ([defaults objectForKey:keyPushyInfo]) {
|
if ([defaults objectForKey:keyPushyInfo]) {
|
||||||
@@ -242,7 +268,7 @@ RCT_EXPORT_METHOD(setNeedUpdate:(NSDictionary *)options)
|
|||||||
}
|
}
|
||||||
|
|
||||||
NSMutableDictionary *newInfo = [[NSMutableDictionary alloc] init];
|
NSMutableDictionary *newInfo = [[NSMutableDictionary alloc] init];
|
||||||
newInfo[paramCurrentVersion] = hashName;
|
newInfo[paramCurrentVersion] = hash;
|
||||||
newInfo[paramLastVersion] = lastVersion;
|
newInfo[paramLastVersion] = lastVersion;
|
||||||
newInfo[paramIsFirstTime] = @(YES);
|
newInfo[paramIsFirstTime] = @(YES);
|
||||||
newInfo[paramIsFirstLoadOk] = @(NO);
|
newInfo[paramIsFirstLoadOk] = @(NO);
|
||||||
@@ -255,15 +281,21 @@ RCT_EXPORT_METHOD(setNeedUpdate:(NSDictionary *)options)
|
|||||||
|
|
||||||
RCT_EXPORT_METHOD(reloadUpdate:(NSDictionary *)options)
|
RCT_EXPORT_METHOD(reloadUpdate:(NSDictionary *)options)
|
||||||
{
|
{
|
||||||
NSString *hashName = options[@"hashName"];
|
NSString *hash = options[@"hash"];
|
||||||
if (hashName.length) {
|
if (hash.length <= 0) {
|
||||||
|
hash = options[@"hashName"];
|
||||||
|
}
|
||||||
|
if (hash.length) {
|
||||||
[self setNeedUpdate:options];
|
[self setNeedUpdate:options];
|
||||||
|
|
||||||
// reload
|
// reload 0.62+
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
// RCTReloadCommandSetBundleURL([[self class] bundleURL]);
|
||||||
[_bridge setValue:[[self class] bundleURL] forKey:@"bundleURL"];
|
// RCTTriggerReloadCommandListeners(@"pushy reload");
|
||||||
[_bridge reload];
|
|
||||||
});
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
|
[self.bridge setValue:[[self class] bundleURL] forKey:@"bundleURL"];
|
||||||
|
[self.bridge reload];
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -281,17 +313,43 @@ RCT_EXPORT_METHOD(markSuccess)
|
|||||||
[self clearInvalidFiles];
|
[self clearInvalidFiles];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#pragma mark - private
|
#pragma mark - private
|
||||||
|
- (NSArray<NSString *> *)supportedEvents
|
||||||
|
{
|
||||||
|
return @[
|
||||||
|
EVENT_PROGRESS_DOWNLOAD,
|
||||||
|
// EVENT_PROGRESS_UNZIP
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Will be called when this module's first listener is added.
|
||||||
|
-(void)startObserving {
|
||||||
|
hasListeners = YES;
|
||||||
|
// Set up any upstream listeners or background tasks as necessary
|
||||||
|
}
|
||||||
|
|
||||||
|
// Will be called when this module's last listener is removed, or on dealloc.
|
||||||
|
-(void)stopObserving {
|
||||||
|
hasListeners = NO;
|
||||||
|
// Remove upstream listeners, stop unnecessary background tasks
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
- (void)doPushy:(PushyType)type options:(NSDictionary *)options callback:(void (^)(NSError *error))callback
|
- (void)doPushy:(PushyType)type options:(NSDictionary *)options callback:(void (^)(NSError *error))callback
|
||||||
{
|
{
|
||||||
NSString *updateUrl = [RCTConvert NSString:options[@"updateUrl"]];
|
NSString *updateUrl = [RCTConvert NSString:options[@"updateUrl"]];
|
||||||
NSString *hashName = [RCTConvert NSString:options[@"hashName"]];
|
NSString *hash = [RCTConvert NSString:options[@"hash"]];
|
||||||
if (updateUrl.length<=0 || hashName.length<=0) {
|
if (hash.length <= 0) {
|
||||||
|
hash = [RCTConvert NSString:options[@"hashName"]];;
|
||||||
|
}
|
||||||
|
if (updateUrl.length <= 0 || hash.length <= 0) {
|
||||||
callback([self errorWithMessage:ERROR_OPTIONS]);
|
callback([self errorWithMessage:ERROR_OPTIONS]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
NSString *originHashName = [RCTConvert NSString:options[@"originHashName"]];
|
NSString *originHash = [RCTConvert NSString:options[@"originHash"]];
|
||||||
if (type == PushyTypePatchFromPpk && originHashName<=0) {
|
if (type == PushyTypePatchFromPpk && originHash <= 0) {
|
||||||
callback([self errorWithMessage:ERROR_OPTIONS]);
|
callback([self errorWithMessage:ERROR_OPTIONS]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -303,34 +361,37 @@ RCT_EXPORT_METHOD(markSuccess)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
NSString *zipFilePath = [dir stringByAppendingPathComponent:[NSString stringWithFormat:@"%@%@",hashName, [self zipExtension:type]]];
|
NSString *zipFilePath = [dir stringByAppendingPathComponent:[NSString stringWithFormat:@"%@%@",hash, [self zipExtension:type]]];
|
||||||
NSString *unzipDir = [dir stringByAppendingPathComponent:hashName];
|
// NSString *unzipDir = [dir stringByAppendingPathComponent:hash];
|
||||||
|
|
||||||
RCTLogInfo(@"RCTPushy -- download file %@", updateUrl);
|
RCTLogInfo(@"RCTPushy -- download file %@", updateUrl);
|
||||||
[RCTPushyDownloader download:updateUrl savePath:zipFilePath progressHandler:^(long long receivedBytes, long long totalBytes) {
|
[RCTPushyDownloader download:updateUrl savePath:zipFilePath progressHandler:^(long long receivedBytes, long long totalBytes) {
|
||||||
[self.bridge.eventDispatcher sendAppEventWithName:EVENT_PROGRESS_DOWNLOAD
|
if (self->hasListeners) {
|
||||||
body:@{
|
[self sendEventWithName:EVENT_PROGRESS_DOWNLOAD body:@{
|
||||||
PARAM_PROGRESS_HASHNAME:hashName,
|
PARAM_PROGRESS_HASH:hash,
|
||||||
PARAM_PROGRESS_RECEIVED:[NSNumber numberWithLongLong:receivedBytes],
|
PARAM_PROGRESS_RECEIVED:[NSNumber numberWithLongLong:receivedBytes],
|
||||||
PARAM_PROGRESS_TOTAL:[NSNumber numberWithLongLong:totalBytes]
|
PARAM_PROGRESS_TOTAL:[NSNumber numberWithLongLong:totalBytes]
|
||||||
}];
|
}];
|
||||||
|
}
|
||||||
} completionHandler:^(NSString *path, NSError *error) {
|
} completionHandler:^(NSString *path, NSError *error) {
|
||||||
if (error) {
|
if (error) {
|
||||||
callback(error);
|
callback(error);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
RCTLogInfo(@"RCTPushy -- unzip file %@", zipFilePath);
|
RCTLogInfo(@"RCTPushy -- unzip file %@", zipFilePath);
|
||||||
NSString *unzipFilePath = [dir stringByAppendingPathComponent:hashName];
|
NSString *unzipFilePath = [dir stringByAppendingPathComponent:hash];
|
||||||
[_fileManager unzipFileAtPath:zipFilePath toDestination:unzipFilePath progressHandler:^(NSString *entry,long entryNumber, long total) {
|
[self->_fileManager unzipFileAtPath:zipFilePath toDestination:unzipFilePath progressHandler:^(NSString *entry,long entryNumber, long total) {
|
||||||
[self.bridge.eventDispatcher sendAppEventWithName:EVENT_PROGRESS_UNZIP
|
// if (self->hasListeners) {
|
||||||
body:@{
|
// [self sendEventWithName:EVENT_PROGRESS_UNZIP
|
||||||
PARAM_PROGRESS_HASHNAME:hashName,
|
// body:@{
|
||||||
PARAM_PROGRESS_RECEIVED:[NSNumber numberWithLong:entryNumber],
|
// PARAM_PROGRESS_HASH:hash,
|
||||||
PARAM_PROGRESS_TOTAL:[NSNumber numberWithLong:total]
|
// PARAM_PROGRESS_RECEIVED:[NSNumber numberWithLong:entryNumber],
|
||||||
}];
|
// PARAM_PROGRESS_TOTAL:[NSNumber numberWithLong:total]
|
||||||
|
// }];
|
||||||
|
// }
|
||||||
|
|
||||||
} completionHandler:^(NSString *path, BOOL succeeded, NSError *error) {
|
} completionHandler:^(NSString *path, BOOL succeeded, NSError *error) {
|
||||||
dispatch_async(_methodQueue, ^{
|
dispatch_async(self->_methodQueue, ^{
|
||||||
if (error) {
|
if (error) {
|
||||||
callback(error);
|
callback(error);
|
||||||
}
|
}
|
||||||
@@ -340,16 +401,16 @@ RCT_EXPORT_METHOD(markSuccess)
|
|||||||
{
|
{
|
||||||
NSString *sourceOrigin = [[NSBundle mainBundle] resourcePath];
|
NSString *sourceOrigin = [[NSBundle mainBundle] resourcePath];
|
||||||
NSString *bundleOrigin = [[RCTPushy binaryBundleURL] path];
|
NSString *bundleOrigin = [[RCTPushy binaryBundleURL] path];
|
||||||
[self patch:hashName fromBundle:bundleOrigin source:sourceOrigin callback:callback];
|
[self patch:hash fromBundle:bundleOrigin source:sourceOrigin callback:callback];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PushyTypePatchFromPpk:
|
case PushyTypePatchFromPpk:
|
||||||
{
|
{
|
||||||
NSString *lastVersionDir = [dir stringByAppendingPathComponent:originHashName];
|
NSString *lastVersionDir = [dir stringByAppendingPathComponent:originHash];
|
||||||
|
|
||||||
NSString *sourceOrigin = lastVersionDir;
|
NSString *sourceOrigin = lastVersionDir;
|
||||||
NSString *bundleOrigin = [lastVersionDir stringByAppendingPathComponent:BUNDLE_FILE_NAME];
|
NSString *bundleOrigin = [lastVersionDir stringByAppendingPathComponent:BUNDLE_FILE_NAME];
|
||||||
[self patch:hashName fromBundle:bundleOrigin source:sourceOrigin callback:callback];
|
[self patch:hash fromBundle:bundleOrigin source:sourceOrigin callback:callback];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -363,9 +424,9 @@ RCT_EXPORT_METHOD(markSuccess)
|
|||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)patch:(NSString *)hashName fromBundle:(NSString *)bundleOrigin source:(NSString *)sourceOrigin callback:(void (^)(NSError *error))callback
|
- (void)patch:(NSString *)hash fromBundle:(NSString *)bundleOrigin source:(NSString *)sourceOrigin callback:(void (^)(NSError *error))callback
|
||||||
{
|
{
|
||||||
NSString *unzipDir = [[RCTPushy downloadDir] stringByAppendingPathComponent:hashName];
|
NSString *unzipDir = [[RCTPushy downloadDir] stringByAppendingPathComponent:hash];
|
||||||
NSString *sourcePatch = [unzipDir stringByAppendingPathComponent:SOURCE_PATCH_NAME];
|
NSString *sourcePatch = [unzipDir stringByAppendingPathComponent:SOURCE_PATCH_NAME];
|
||||||
NSString *bundlePatch = [unzipDir stringByAppendingPathComponent:BUNDLE_PATCH_NAME];
|
NSString *bundlePatch = [unzipDir stringByAppendingPathComponent:BUNDLE_PATCH_NAME];
|
||||||
|
|
||||||
@@ -383,7 +444,7 @@ RCT_EXPORT_METHOD(markSuccess)
|
|||||||
NSDictionary *copies = json[@"copies"];
|
NSDictionary *copies = json[@"copies"];
|
||||||
NSDictionary *deletes = json[@"deletes"];
|
NSDictionary *deletes = json[@"deletes"];
|
||||||
|
|
||||||
[_fileManager copyFiles:copies fromDir:sourceOrigin toDir:unzipDir deletes:deletes completionHandler:^(NSError *error) {
|
[self->_fileManager copyFiles:copies fromDir:sourceOrigin toDir:unzipDir deletes:deletes completionHandler:^(NSError *error) {
|
||||||
if (error) {
|
if (error) {
|
||||||
callback(error);
|
callback(error);
|
||||||
}
|
}
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
let currentEndpoint = 'https://update.reactnative.cn/api';
|
let currentEndpoint = 'https://update.react-native.cn/api';
|
||||||
|
|
||||||
function ping(url, rejectImmediate) {
|
function ping(url, rejectImmediate) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
23
lib/index.d.ts
vendored
23
lib/index.d.ts
vendored
@@ -5,15 +5,19 @@ export const isFirstTime: boolean;
|
|||||||
export const isRolledBack: boolean;
|
export const isRolledBack: boolean;
|
||||||
|
|
||||||
export interface ExpiredResult {
|
export interface ExpiredResult {
|
||||||
|
upToDate?: false;
|
||||||
expired: true;
|
expired: true;
|
||||||
downloadUrl: string;
|
downloadUrl: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface UpTodateResult {
|
export interface UpTodateResult {
|
||||||
|
expired?: false;
|
||||||
upToDate: true;
|
upToDate: true;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface UpdateAvailableResult {
|
export interface UpdateAvailableResult {
|
||||||
|
expired?: false;
|
||||||
|
upToDate?: false;
|
||||||
update: true;
|
update: true;
|
||||||
name: string; // version name
|
name: string; // version name
|
||||||
hash: string;
|
hash: string;
|
||||||
@@ -31,7 +35,10 @@ export type CheckResult =
|
|||||||
export function checkUpdate(appkey: string): Promise<CheckResult>;
|
export function checkUpdate(appkey: string): Promise<CheckResult>;
|
||||||
|
|
||||||
export function downloadUpdate(
|
export function downloadUpdate(
|
||||||
options: UpdateAvailableResult,
|
info: UpdateAvailableResult,
|
||||||
|
eventListeners?: {
|
||||||
|
onDownloadProgress?: (data: ProgressData) => void;
|
||||||
|
},
|
||||||
): Promise<undefined | string>;
|
): Promise<undefined | string>;
|
||||||
|
|
||||||
export function switchVersion(hash: string): void;
|
export function switchVersion(hash: string): void;
|
||||||
@@ -40,6 +47,14 @@ export function switchVersionLater(hash: string): void;
|
|||||||
|
|
||||||
export function markSuccess(): void;
|
export function markSuccess(): void;
|
||||||
|
|
||||||
|
export function downloadAndInstallApk({
|
||||||
|
url,
|
||||||
|
onDownloadProgress,
|
||||||
|
}: {
|
||||||
|
url: string;
|
||||||
|
onDownloadProgress?: (data: ProgressData) => void;
|
||||||
|
}): Promise<void>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} main - The main api endpoint
|
* @param {string} main - The main api endpoint
|
||||||
* @param {string[]} [backups] - The back up endpoints.
|
* @param {string[]} [backups] - The back up endpoints.
|
||||||
@@ -52,12 +67,12 @@ export function setCustomEndpoints({
|
|||||||
backupQueryUrl,
|
backupQueryUrl,
|
||||||
}: {
|
}: {
|
||||||
main: string;
|
main: string;
|
||||||
backUps?: string[];
|
backups?: string[];
|
||||||
backupQueryUrl?: string;
|
backupQueryUrl?: string;
|
||||||
}): void;
|
}): void;
|
||||||
|
|
||||||
|
interface ProgressData {
|
||||||
interface ProgressEvent {
|
hash: string;
|
||||||
received: number;
|
received: number;
|
||||||
total: number;
|
total: number;
|
||||||
}
|
}
|
||||||
|
112
lib/index.js
112
lib/index.js
@@ -3,8 +3,12 @@ import {
|
|||||||
getCheckUrl,
|
getCheckUrl,
|
||||||
setCustomEndpoints,
|
setCustomEndpoints,
|
||||||
} from './endpoint';
|
} from './endpoint';
|
||||||
import { NativeAppEventEmitter, NativeModules, Platform } from 'react-native';
|
import { NativeEventEmitter, NativeModules, Platform } from 'react-native';
|
||||||
export { setCustomEndpoints };
|
export { setCustomEndpoints };
|
||||||
|
const {
|
||||||
|
version: v,
|
||||||
|
} = require('react-native/Libraries/Core/ReactNativeVersion');
|
||||||
|
const RNVersion = `${v.major}.${v.minor}.${v.patch}`;
|
||||||
|
|
||||||
let Pushy = NativeModules.Pushy;
|
let Pushy = NativeModules.Pushy;
|
||||||
|
|
||||||
@@ -18,6 +22,8 @@ export const currentVersion = Pushy.currentVersion;
|
|||||||
export const isFirstTime = Pushy.isFirstTime;
|
export const isFirstTime = Pushy.isFirstTime;
|
||||||
export const isRolledBack = Pushy.isRolledBack;
|
export const isRolledBack = Pushy.isRolledBack;
|
||||||
export const buildTime = Pushy.buildTime;
|
export const buildTime = Pushy.buildTime;
|
||||||
|
let blockUpdate = Pushy.blockUpdate;
|
||||||
|
let uuid = Pushy.uuid;
|
||||||
|
|
||||||
if (Platform.OS === 'android' && !Pushy.isUsingBundleUrl) {
|
if (Platform.OS === 'android' && !Pushy.isUsingBundleUrl) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
@@ -25,9 +31,22 @@ if (Platform.OS === 'android' && !Pushy.isUsingBundleUrl) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const eventEmitter = new NativeEventEmitter(Pushy);
|
||||||
|
|
||||||
|
if (!uuid) {
|
||||||
|
uuid = require('uuid/v4')();
|
||||||
|
Pushy.setUuid(uuid);
|
||||||
|
}
|
||||||
|
|
||||||
|
function logger(text) {
|
||||||
|
console.log(`Pushy: ${text}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
logger('uuid: ' + uuid);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Return json:
|
Return json:
|
||||||
Package was expired:
|
Package expired:
|
||||||
{
|
{
|
||||||
expired: true,
|
expired: true,
|
||||||
downloadUrl: 'http://appstore/downloadUrl',
|
downloadUrl: 'http://appstore/downloadUrl',
|
||||||
@@ -56,6 +75,17 @@ function assertRelease() {
|
|||||||
|
|
||||||
export async function checkUpdate(APPKEY, isRetry) {
|
export async function checkUpdate(APPKEY, isRetry) {
|
||||||
assertRelease();
|
assertRelease();
|
||||||
|
if (blockUpdate && blockUpdate.until > Date.now() / 1000) {
|
||||||
|
throw new Error(
|
||||||
|
`热更新已暂停,原因:${blockUpdate.reason}。请在"${new Date(
|
||||||
|
blockUpdate.until * 1000,
|
||||||
|
).toLocaleString()}"之后重试。`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (typeof APPKEY !== 'string') {
|
||||||
|
throw new Error('未检查到合法的APPKEY,请查看update.json文件是否正确生成');
|
||||||
|
}
|
||||||
|
logger('checking update');
|
||||||
let resp;
|
let resp;
|
||||||
try {
|
try {
|
||||||
resp = await fetch(getCheckUrl(APPKEY), {
|
resp = await fetch(getCheckUrl(APPKEY), {
|
||||||
@@ -68,6 +98,12 @@ export async function checkUpdate(APPKEY, isRetry) {
|
|||||||
packageVersion,
|
packageVersion,
|
||||||
hash: currentVersion,
|
hash: currentVersion,
|
||||||
buildTime,
|
buildTime,
|
||||||
|
cInfo: {
|
||||||
|
pushy: require('../package.json').version,
|
||||||
|
rn: RNVersion,
|
||||||
|
os: Platform.OS + ' ' + Platform.Version,
|
||||||
|
uuid,
|
||||||
|
},
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -77,50 +113,98 @@ export async function checkUpdate(APPKEY, isRetry) {
|
|||||||
await tryBackupEndpoints(APPKEY);
|
await tryBackupEndpoints(APPKEY);
|
||||||
return checkUpdate(APPKEY, true);
|
return checkUpdate(APPKEY, true);
|
||||||
}
|
}
|
||||||
|
const result = await resp.json();
|
||||||
|
checkOperation(result.op);
|
||||||
|
|
||||||
if (resp.status !== 200) {
|
if (resp.status !== 200) {
|
||||||
throw new Error((await resp.json()).message);
|
throw new Error(result.message);
|
||||||
}
|
}
|
||||||
|
|
||||||
return resp.json();
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function downloadUpdate(options) {
|
function checkOperation(op) {
|
||||||
|
if (!Array.isArray(op)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
op.forEach((action) => {
|
||||||
|
if (action.type === 'block') {
|
||||||
|
blockUpdate = {
|
||||||
|
reason: action.reason,
|
||||||
|
until: (Date.now() + action.duration) / 1000,
|
||||||
|
};
|
||||||
|
Pushy.setBlockUpdate(blockUpdate);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function downloadUpdate(options, eventListeners) {
|
||||||
assertRelease();
|
assertRelease();
|
||||||
if (!options.update) {
|
if (!options.update) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
let progressHandler;
|
||||||
|
if (eventListeners) {
|
||||||
|
if (eventListeners.onDownloadProgress) {
|
||||||
|
const downloadCallback = eventListeners.onDownloadProgress;
|
||||||
|
progressHandler = eventEmitter.addListener('RCTPushyDownloadProgress', (progressData) => {
|
||||||
|
if (progressData.hash === options.hash) {
|
||||||
|
downloadCallback(progressData);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
if (options.diffUrl) {
|
if (options.diffUrl) {
|
||||||
|
logger('downloading diff');
|
||||||
await Pushy.downloadPatchFromPpk({
|
await Pushy.downloadPatchFromPpk({
|
||||||
updateUrl: options.diffUrl,
|
updateUrl: options.diffUrl,
|
||||||
hashName: options.hash,
|
hash: options.hash,
|
||||||
originHashName: currentVersion,
|
originHash: currentVersion,
|
||||||
});
|
});
|
||||||
} else if (options.pdiffUrl) {
|
} else if (options.pdiffUrl) {
|
||||||
|
logger('downloading pdiff');
|
||||||
await Pushy.downloadPatchFromPackage({
|
await Pushy.downloadPatchFromPackage({
|
||||||
updateUrl: options.pdiffUrl,
|
updateUrl: options.pdiffUrl,
|
||||||
hashName: options.hash,
|
hash: options.hash,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
progressHandler && progressHandler.remove();
|
||||||
return options.hash;
|
return options.hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function switchVersion(hash) {
|
export function switchVersion(hash) {
|
||||||
assertRelease();
|
assertRelease();
|
||||||
Pushy.reloadUpdate({ hashName: hash });
|
logger('switchVersion');
|
||||||
|
Pushy.reloadUpdate({ hash });
|
||||||
}
|
}
|
||||||
|
|
||||||
export function switchVersionLater(hash) {
|
export function switchVersionLater(hash) {
|
||||||
assertRelease();
|
assertRelease();
|
||||||
Pushy.setNeedUpdate({ hashName: hash });
|
logger('switchVersionLater');
|
||||||
|
Pushy.setNeedUpdate({ hash });
|
||||||
}
|
}
|
||||||
|
|
||||||
export function markSuccess() {
|
export function markSuccess() {
|
||||||
assertRelease();
|
assertRelease();
|
||||||
|
logger('markSuccess');
|
||||||
Pushy.markSuccess();
|
Pushy.markSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
NativeAppEventEmitter.addListener('RCTPushyDownloadProgress', (params) => {});
|
export async function downloadAndInstallApk({ url, onDownloadProgress }) {
|
||||||
|
logger('downloadAndInstallApk');
|
||||||
NativeAppEventEmitter.addListener('RCTPushyUnzipProgress', (params) => {});
|
let hash = Date.now().toString();
|
||||||
|
let progressHandler;
|
||||||
|
if (onDownloadProgress) {
|
||||||
|
progressHandler = eventEmitter.addListener('RCTPushyDownloadProgress', (progressData) => {
|
||||||
|
if (progressData.hash === hash) {
|
||||||
|
onDownloadProgress(progressData);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
await Pushy.downloadAndInstallApk({
|
||||||
|
url,
|
||||||
|
target: 'update.apk',
|
||||||
|
hash,
|
||||||
|
});
|
||||||
|
progressHandler && progressHandler.remove();
|
||||||
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "react-native-update",
|
"name": "react-native-update",
|
||||||
"version": "5.7.0",
|
"version": "5.11.0-beta2",
|
||||||
"description": "react-native hot update",
|
"description": "react-native hot update",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -26,5 +26,7 @@
|
|||||||
"react-native": ">=0.27.0"
|
"react-native": ">=0.27.0"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/reactnativecn/react-native-pushy#readme",
|
"homepage": "https://github.com/reactnativecn/react-native-pushy#readme",
|
||||||
"dependencies": {}
|
"dependencies": {
|
||||||
|
"uuid": "3"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user