mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-09-18 00:56:10 +08:00
Compare commits
91 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
b747b1f356 | ||
![]() |
7752581470 | ||
![]() |
33eb89d2a7 | ||
![]() |
d111bf5a9c | ||
![]() |
23346a5f1d | ||
![]() |
5aca2104c2 | ||
![]() |
fe0a05db3d | ||
![]() |
2b287786ff | ||
![]() |
7d128900cd | ||
![]() |
189e3ec78e | ||
![]() |
821722165a | ||
![]() |
6cb53ac655 | ||
![]() |
7b9a24168a | ||
![]() |
c6354bbedc | ||
![]() |
b53878c291 | ||
![]() |
ab01312f8d | ||
![]() |
44784b6d3e | ||
![]() |
30c21fed91 | ||
![]() |
15af7802ad | ||
![]() |
8bed6ef979 | ||
![]() |
7d03dc24b7 | ||
![]() |
18849ee441 | ||
![]() |
3ba1df2020 | ||
![]() |
7152ef7304 | ||
![]() |
094eb3f267 | ||
![]() |
6d01ce5152 | ||
![]() |
8bf1fed3f8 | ||
![]() |
39c4a6d339 | ||
![]() |
f1e9244a14 | ||
![]() |
546f287b6c | ||
![]() |
175e43d524 | ||
![]() |
b200766aa3 | ||
![]() |
7e65457cc1 | ||
![]() |
6c5ccd98b7 | ||
![]() |
d7abd590b0 | ||
![]() |
ffb2bf4afa | ||
![]() |
94c177512e | ||
![]() |
a16a73e754 | ||
![]() |
40df51db0f | ||
![]() |
97fec1e79e | ||
![]() |
75b4447437 | ||
![]() |
f9c6a97a50 | ||
![]() |
90aa07cc55 | ||
![]() |
26cda39451 | ||
![]() |
3d5012fced | ||
![]() |
533696e34d | ||
![]() |
9c98aaa899 | ||
![]() |
706cd8c415 | ||
![]() |
e76747f7d3 | ||
![]() |
65a2477932 | ||
![]() |
581cd3310e | ||
![]() |
f24bfd6f2a | ||
![]() |
c57802e2d2 | ||
![]() |
ca4f363e6d | ||
![]() |
6fcfa0b505 | ||
![]() |
12edc1df7a | ||
![]() |
4acba40f6c | ||
![]() |
0adda18b50 | ||
![]() |
6cd256b7f4 | ||
![]() |
bd04badbe8 | ||
![]() |
f0c52b0acd | ||
![]() |
76e5c6c59b | ||
![]() |
d2f53e17c5 | ||
![]() |
a182c5d3c6 | ||
![]() |
4e4c686f4d | ||
![]() |
301243b502 | ||
![]() |
b23898ec48 | ||
![]() |
909788c6f6 | ||
![]() |
507576795c | ||
![]() |
48526430a1 | ||
![]() |
aaab2d77c8 | ||
![]() |
b4b8856ed2 | ||
![]() |
eb1c9ff5de | ||
![]() |
6f346d7990 | ||
![]() |
27c053a645 | ||
![]() |
55506483f9 | ||
![]() |
5f28b75abd | ||
![]() |
4bf921c82c | ||
![]() |
68cc6d3fad | ||
![]() |
63c4825006 | ||
![]() |
aa5f5b9340 | ||
![]() |
6216fdfd35 | ||
![]() |
1d11fc64a8 | ||
![]() |
87a2004b2b | ||
![]() |
92675ed37c | ||
![]() |
992b17d25a | ||
![]() |
d538782b01 | ||
![]() |
d6c268f533 | ||
![]() |
55879198e8 | ||
![]() |
f8115c3a85 | ||
![]() |
e859900df6 |
49
.github/workflows/e2e_android.yml
vendored
Normal file
49
.github/workflows/e2e_android.yml
vendored
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
name: e2e-android
|
||||||
|
on: push
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
e2e-android:
|
||||||
|
runs-on: macos-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
cache: yarn
|
||||||
|
node-version-file: .nvmrc
|
||||||
|
|
||||||
|
- name: Install Yarn dependencies
|
||||||
|
run: yarn --frozen-lockfile --prefer-offline
|
||||||
|
|
||||||
|
- name: Setup Java
|
||||||
|
uses: actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
cache: gradle
|
||||||
|
distribution: temurin
|
||||||
|
java-version: 17
|
||||||
|
|
||||||
|
- name: Cache Detox build
|
||||||
|
id: cache-detox-build
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: android/app/build
|
||||||
|
key: ${{ runner.os }}-detox-build
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-detox-build
|
||||||
|
|
||||||
|
- name: Detox build
|
||||||
|
run: yarn build:android-debug
|
||||||
|
|
||||||
|
- name: Get device name
|
||||||
|
id: device
|
||||||
|
run: node -e "console.log('AVD_NAME=' + require('./Example/testHotUpdate/.detoxrc').devices.emulator.device.avdName)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Detox test
|
||||||
|
uses: reactivecircus/android-emulator-runner@v2
|
||||||
|
with:
|
||||||
|
api-level: 31
|
||||||
|
arch: x86_64
|
||||||
|
avd-name: ${{ steps.device.outputs.AVD_NAME }}
|
||||||
|
script: yarn test:android-debug
|
182
.github/workflows/e2e_ios.yml
vendored
Normal file
182
.github/workflows/e2e_ios.yml
vendored
Normal file
@@ -0,0 +1,182 @@
|
|||||||
|
name: Testing E2E iOS
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- '**'
|
||||||
|
paths-ignore:
|
||||||
|
- 'docs/**'
|
||||||
|
- 'website/**'
|
||||||
|
- '.spellcheck.dict.txt'
|
||||||
|
- '**/*.md'
|
||||||
|
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
paths-ignore:
|
||||||
|
- 'docs/**'
|
||||||
|
- 'website/**'
|
||||||
|
- '.spellcheck.dict.txt'
|
||||||
|
# - '**/*.md'
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
ios:
|
||||||
|
name: iOS
|
||||||
|
runs-on: macos-12
|
||||||
|
# TODO matrix across APIs, at least 11 and 15 (lowest to highest)
|
||||||
|
timeout-minutes: 60
|
||||||
|
env:
|
||||||
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
steps:
|
||||||
|
# Set up tool versions
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 16
|
||||||
|
|
||||||
|
- name: Configure JDK 1.11
|
||||||
|
uses: actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '11'
|
||||||
|
|
||||||
|
- uses: maxim-lobanov/setup-xcode@v1
|
||||||
|
with:
|
||||||
|
xcode-version: 'latest-stable'
|
||||||
|
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 50
|
||||||
|
|
||||||
|
# Set path variables needed for caches
|
||||||
|
- name: Set workflow variables
|
||||||
|
id: workflow-variables
|
||||||
|
run: |
|
||||||
|
echo "metro-cache=$HOME/.metro" >> $GITHUB_OUTPUT
|
||||||
|
echo "xcode-version=$(xcodebuild -version|tail -1|cut -f3 -d' ')" >> $GITHUB_OUTPUT
|
||||||
|
echo "yarn-cache-dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
name: Yarn Cache
|
||||||
|
id: yarn-cache
|
||||||
|
with:
|
||||||
|
path: ${{ steps.workflow-variables.outputs.yarn-cache-dir }}
|
||||||
|
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('yarn.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-yarn-v1
|
||||||
|
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
name: Detox Framework Cache
|
||||||
|
id: detox-cache
|
||||||
|
with:
|
||||||
|
path: ~/Library/Detox/ios
|
||||||
|
key: ${{ runner.os }}-detox-framework-cache-${{ steps.workflow-variables.outputs.xcode-version }}
|
||||||
|
|
||||||
|
# Detox is compiled during yarn install, using Xcode, set up cache first
|
||||||
|
- uses: hendrikmuhs/ccache-action@v1.2
|
||||||
|
name: Xcode Compile Cache
|
||||||
|
with:
|
||||||
|
key: ${{ runner.os }}-v2 # makes a unique key w/related restore key internally
|
||||||
|
max-size: 1500M
|
||||||
|
|
||||||
|
- name: Yarn Install
|
||||||
|
uses: nick-invision/retry@v2
|
||||||
|
with:
|
||||||
|
timeout_minutes: 10
|
||||||
|
retry_wait_seconds: 60
|
||||||
|
max_attempts: 3
|
||||||
|
command: yarn --no-audit --prefer-offline
|
||||||
|
|
||||||
|
- name: Setup Ruby
|
||||||
|
uses: ruby/setup-ruby@v1
|
||||||
|
with:
|
||||||
|
ruby-version: 3
|
||||||
|
|
||||||
|
- name: Update Ruby build tools
|
||||||
|
uses: nick-invision/retry@v2
|
||||||
|
with:
|
||||||
|
timeout_minutes: 2
|
||||||
|
retry_wait_seconds: 60
|
||||||
|
max_attempts: 3
|
||||||
|
command: gem update cocoapods xcodeproj
|
||||||
|
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
name: Cache Pods
|
||||||
|
id: pods-cache
|
||||||
|
with:
|
||||||
|
path: tests/ios/Pods
|
||||||
|
key: ${{ runner.os }}-pods-v2-${{ hashFiles('tests/ios/Podfile.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-pods-v2
|
||||||
|
|
||||||
|
- name: Pod Install
|
||||||
|
uses: nick-invision/retry@v2
|
||||||
|
with:
|
||||||
|
timeout_minutes: 10
|
||||||
|
retry_wait_seconds: 30
|
||||||
|
max_attempts: 3
|
||||||
|
command: yarn tests:ios:pod:install
|
||||||
|
|
||||||
|
- name: Cache Firestore Emulator
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ~/.cache/pushy/emulators
|
||||||
|
key: pushy-emulators-v1-${{ github.run_id }}
|
||||||
|
restore-keys: pushy-emulators-v1
|
||||||
|
|
||||||
|
- name: Start Firestore Emulator
|
||||||
|
run: yarn tests:emulator:start-ci
|
||||||
|
|
||||||
|
- name: Install brew utilities
|
||||||
|
uses: nick-invision/retry@v2
|
||||||
|
with:
|
||||||
|
timeout_minutes: 5
|
||||||
|
retry_wait_seconds: 60
|
||||||
|
max_attempts: 3
|
||||||
|
command: HOMEBREW_NO_AUTO_UPDATE=1 brew tap wix/brew && HOMEBREW_NO_AUTO_UPDATE=1 brew install applesimutils xcbeautify && applesimutils --list
|
||||||
|
|
||||||
|
- name: Build iOS App
|
||||||
|
run: |
|
||||||
|
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
||||||
|
export CCACHE_SLOPPINESS=clang_index_store,file_stat_matches,include_file_ctime,include_file_mtime,ivfsoverlay,pch_defines,modules,system_headers,time_macros
|
||||||
|
export CCACHE_FILECLONE=true
|
||||||
|
export CCACHE_DEPEND=true
|
||||||
|
export CCACHE_INODECACHE=true
|
||||||
|
export CCACHE_LIMIT_MULTIPLE=0.95
|
||||||
|
ccache -s
|
||||||
|
export SKIP_BUNDLING=1
|
||||||
|
export RCT_NO_LAUNCH_PACKAGER=1
|
||||||
|
set -o pipefail
|
||||||
|
yarn build:ios-debug
|
||||||
|
ccache -s
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: Metro Bundler Cache
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ${{ steps.workflow-variables.outputs.metro-cache }}
|
||||||
|
key: ${{ runner.os }}-metro-v1-${{ github.run_id }}
|
||||||
|
restore-keys: ${{ runner.os }}-metro-v1
|
||||||
|
|
||||||
|
- name: Pre-fetch Javascript bundle
|
||||||
|
run: |
|
||||||
|
nohup yarn tests:packager:jet-ci &
|
||||||
|
printf 'Waiting for packager to come online'
|
||||||
|
until curl --output /dev/null --silent --head --fail http://localhost:8081/status; do
|
||||||
|
printf '.'
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
echo "Packager is online! Preparing bundle..."
|
||||||
|
curl --output /dev/null --silent --head --fail "http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&inlineSourceMap=true"
|
||||||
|
echo "...javascript bundle ready"
|
||||||
|
|
||||||
|
- name: Create Simulator Log
|
||||||
|
# With a little delay so the detox test below has time to spawn it, missing the first part of boot is fine
|
||||||
|
# If you boot the simulator separately from detox, some other race fails and detox testee never sends ready to proxy
|
||||||
|
continue-on-error: true
|
||||||
|
run: nohup sh -c "sleep 30 && xcrun simctl spawn booted log stream --level debug --style compact > simulator.log 2>&1 &"
|
||||||
|
|
||||||
|
- name: Detox Test
|
||||||
|
timeout-minutes: 60
|
||||||
|
run: yarn test:ios-debug
|
10
.github/workflows/scripts/adb_all_emulators.sh
vendored
Executable file
10
.github/workflows/scripts/adb_all_emulators.sh
vendored
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
echo "Running $1 on all running emulators..."
|
||||||
|
devices=`adb devices`
|
||||||
|
|
||||||
|
for device in $devices; do
|
||||||
|
if [[ "$device" =~ "emulator-" ]]; then
|
||||||
|
adb -s $device $1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo "All Done."
|
13
.github/workflows/scripts/database.rules
vendored
Normal file
13
.github/workflows/scripts/database.rules
vendored
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"rules": {
|
||||||
|
// Database in general is closed. Read/Write to anything but "tests/" will fail.
|
||||||
|
".read": false,
|
||||||
|
".write": false,
|
||||||
|
|
||||||
|
// ..."tests" node will succeed
|
||||||
|
"tests": {
|
||||||
|
".read": true,
|
||||||
|
".write": true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
39
.github/workflows/scripts/firebase.json
vendored
Normal file
39
.github/workflows/scripts/firebase.json
vendored
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
"firestore": {
|
||||||
|
"rules": "firestore.rules",
|
||||||
|
"indexes": "firestore.indexes.json"
|
||||||
|
},
|
||||||
|
"functions": {
|
||||||
|
"predeploy": [
|
||||||
|
"yarn",
|
||||||
|
"yarn --prefix \"$RESOURCE_DIR\" build"
|
||||||
|
],
|
||||||
|
"source": "functions"
|
||||||
|
},
|
||||||
|
"database": {
|
||||||
|
"rules": "database.rules"
|
||||||
|
},
|
||||||
|
"storage": {
|
||||||
|
"rules": "storage.rules"
|
||||||
|
},
|
||||||
|
"emulators": {
|
||||||
|
"auth": {
|
||||||
|
"port": 9099
|
||||||
|
},
|
||||||
|
"database": {
|
||||||
|
"port": 9000
|
||||||
|
},
|
||||||
|
"firestore": {
|
||||||
|
"port": 8080
|
||||||
|
},
|
||||||
|
"functions": {
|
||||||
|
"port": 5001
|
||||||
|
},
|
||||||
|
"storage": {
|
||||||
|
"port": 9199
|
||||||
|
},
|
||||||
|
"ui": {
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
72
.github/workflows/scripts/firestore.indexes.json
vendored
Normal file
72
.github/workflows/scripts/firestore.indexes.json
vendored
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
{
|
||||||
|
"indexes": [
|
||||||
|
{
|
||||||
|
"collectionGroup": "firestore",
|
||||||
|
"queryScope": "COLLECTION",
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"fieldPath": "a",
|
||||||
|
"order": "ASCENDING"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldPath": "b",
|
||||||
|
"order": "ASCENDING"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"fieldOverrides": [
|
||||||
|
{
|
||||||
|
"collectionGroup": "collectionGroup",
|
||||||
|
"fieldPath": "value",
|
||||||
|
"indexes": [
|
||||||
|
{
|
||||||
|
"order": "ASCENDING",
|
||||||
|
"queryScope": "COLLECTION"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"order": "DESCENDING",
|
||||||
|
"queryScope": "COLLECTION"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"arrayConfig": "CONTAINS",
|
||||||
|
"queryScope": "COLLECTION"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"order": "ASCENDING",
|
||||||
|
"queryScope": "COLLECTION_GROUP"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"order": "DESCENDING",
|
||||||
|
"queryScope": "COLLECTION_GROUP"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"collectionGroup": "collectionGroup",
|
||||||
|
"fieldPath": "number",
|
||||||
|
"indexes": [
|
||||||
|
{
|
||||||
|
"order": "ASCENDING",
|
||||||
|
"queryScope": "COLLECTION"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"order": "DESCENDING",
|
||||||
|
"queryScope": "COLLECTION"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"arrayConfig": "CONTAINS",
|
||||||
|
"queryScope": "COLLECTION"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"order": "ASCENDING",
|
||||||
|
"queryScope": "COLLECTION_GROUP"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"order": "DESCENDING",
|
||||||
|
"queryScope": "COLLECTION_GROUP"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
17
.github/workflows/scripts/firestore.rules
vendored
Normal file
17
.github/workflows/scripts/firestore.rules
vendored
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
rules_version = '2';
|
||||||
|
service cloud.firestore {
|
||||||
|
match /databases/{database}/documents {
|
||||||
|
match /{document=**} {
|
||||||
|
allow read, write: if false;
|
||||||
|
}
|
||||||
|
match /firestore-bundle-tests/{document=**} {
|
||||||
|
allow read, write: if true;
|
||||||
|
}
|
||||||
|
match /firestore/{document=**} {
|
||||||
|
allow read, write: if true;
|
||||||
|
}
|
||||||
|
match /{path=**}/collectionGroup/{documentId} {
|
||||||
|
allow read, write: if true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
10
.github/workflows/scripts/functions/.gitignore
vendored
Normal file
10
.github/workflows/scripts/functions/.gitignore
vendored
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# Compiled JavaScript files
|
||||||
|
lib/**/*.js
|
||||||
|
lib/**/*.js.map
|
||||||
|
|
||||||
|
# TypeScript v1 declaration files
|
||||||
|
typings/
|
||||||
|
|
||||||
|
# Node.js dependency directory
|
||||||
|
node_modules/
|
||||||
|
yarn.lock
|
24
.github/workflows/scripts/functions/package.json
vendored
Normal file
24
.github/workflows/scripts/functions/package.json
vendored
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"name": "functions",
|
||||||
|
"scripts": {
|
||||||
|
"build": "tsc",
|
||||||
|
"serve": "npm run build && firebase emulators:start --only functions",
|
||||||
|
"shell": "npm run build && firebase functions:shell",
|
||||||
|
"start": "npm run shell",
|
||||||
|
"deploy": "firebase deploy --only functions",
|
||||||
|
"logs": "firebase functions:log"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "16"
|
||||||
|
},
|
||||||
|
"main": "lib/index.js",
|
||||||
|
"dependencies": {
|
||||||
|
"firebase-admin": "^11.3.0",
|
||||||
|
"firebase-functions": "^4.2.1"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"firebase-functions-test": "^3.0.0",
|
||||||
|
"typescript": "^4.9.5"
|
||||||
|
},
|
||||||
|
"private": true
|
||||||
|
}
|
13
.github/workflows/scripts/functions/src/exports.ts
vendored
Normal file
13
.github/workflows/scripts/functions/src/exports.ts
vendored
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* Testing tools for invertase/react-native-firebase use only.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2018-present Invertase Limited <oss@invertase.io>
|
||||||
|
*
|
||||||
|
* See License file for more information.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* eslint-disable global-require */
|
||||||
|
module.exports = {
|
||||||
|
SAMPLE_DATA: require('./functions/sample-data'),
|
||||||
|
};
|
12
.github/workflows/scripts/functions/src/index.ts
vendored
Normal file
12
.github/workflows/scripts/functions/src/index.ts
vendored
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
import * as functions from 'firebase-functions';
|
||||||
|
|
||||||
|
// // Start writing Firebase Functions
|
||||||
|
// // https://firebase.google.com/docs/functions/typescript
|
||||||
|
//
|
||||||
|
export const helloWorld = functions.https.onRequest((request, response) => {
|
||||||
|
functions.logger.info('Hello logs!', { structuredData: true });
|
||||||
|
response.send('{ "data": "Hello from Firebase!" }');
|
||||||
|
});
|
||||||
|
|
||||||
|
export { testFunctionCustomRegion } from './testFunctionCustomRegion';
|
||||||
|
export { testFunctionDefaultRegion } from './testFunctionDefaultRegion';
|
80
.github/workflows/scripts/functions/src/sample-data.ts
vendored
Normal file
80
.github/workflows/scripts/functions/src/sample-data.ts
vendored
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
/*
|
||||||
|
* Testing tools for invertase/react-native-firebase use only.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2018-present Invertase Limited <oss@invertase.io>
|
||||||
|
*
|
||||||
|
* See License file for more information.
|
||||||
|
*/
|
||||||
|
|
||||||
|
const SAMPLE_DATA: { [key: string]: any } = {
|
||||||
|
number: 1234,
|
||||||
|
string: 'acde',
|
||||||
|
boolean: true,
|
||||||
|
null: null,
|
||||||
|
object: {
|
||||||
|
number: 1234,
|
||||||
|
string: 'acde',
|
||||||
|
boolean: true,
|
||||||
|
null: null,
|
||||||
|
},
|
||||||
|
array: [1234, 'acde', true, null],
|
||||||
|
deepObject: {
|
||||||
|
array: [1234, 'acde', false, null],
|
||||||
|
object: {
|
||||||
|
number: 1234,
|
||||||
|
string: 'acde',
|
||||||
|
boolean: true,
|
||||||
|
null: null,
|
||||||
|
array: [1234, 'acde', true, null],
|
||||||
|
},
|
||||||
|
number: 1234,
|
||||||
|
string: 'acde',
|
||||||
|
boolean: true,
|
||||||
|
null: null,
|
||||||
|
},
|
||||||
|
deepArray: [
|
||||||
|
1234,
|
||||||
|
'acde',
|
||||||
|
true,
|
||||||
|
null,
|
||||||
|
[1234, 'acde', true, null],
|
||||||
|
{
|
||||||
|
number: 1234,
|
||||||
|
string: 'acde',
|
||||||
|
boolean: true,
|
||||||
|
null: null,
|
||||||
|
array: [1234, 'acde', true, null],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
deepMap: {
|
||||||
|
number: 123,
|
||||||
|
string: 'foo',
|
||||||
|
booleanTrue: true,
|
||||||
|
booleanFalse: false,
|
||||||
|
null: null,
|
||||||
|
list: ['1', 2, true, false],
|
||||||
|
map: {
|
||||||
|
number: 123,
|
||||||
|
string: 'foo',
|
||||||
|
booleanTrue: true,
|
||||||
|
booleanFalse: false,
|
||||||
|
null: null,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
deepList: [
|
||||||
|
'1',
|
||||||
|
2,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
['1', 2, true, false],
|
||||||
|
{
|
||||||
|
number: 123,
|
||||||
|
string: 'foo',
|
||||||
|
booleanTrue: true,
|
||||||
|
booleanFalse: false,
|
||||||
|
null: null,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
export default SAMPLE_DATA;
|
14
.github/workflows/scripts/functions/src/testFunctionCustomRegion.ts
vendored
Normal file
14
.github/workflows/scripts/functions/src/testFunctionCustomRegion.ts
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* Testing tools for invertase/react-native-firebase use only.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2018-present Invertase Limited <oss@invertase.io>
|
||||||
|
*
|
||||||
|
* See License file for more information.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import * as functions from 'firebase-functions';
|
||||||
|
|
||||||
|
export const testFunctionCustomRegion = functions
|
||||||
|
.region('europe-west1')
|
||||||
|
.https.onCall(() => 'europe-west1');
|
70
.github/workflows/scripts/functions/src/testFunctionDefaultRegion.ts
vendored
Normal file
70
.github/workflows/scripts/functions/src/testFunctionDefaultRegion.ts
vendored
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* Testing tools for invertase/react-native-firebase use only.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2018-present Invertase Limited <oss@invertase.io>
|
||||||
|
*
|
||||||
|
* See License file for more information.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import * as assert from 'assert';
|
||||||
|
import { FirebaseError } from 'firebase-admin';
|
||||||
|
import * as functions from 'firebase-functions';
|
||||||
|
import SAMPLE_DATA from './sample-data';
|
||||||
|
|
||||||
|
export const testFunctionDefaultRegion = functions.https.onCall(data => {
|
||||||
|
console.log(Date.now(), data);
|
||||||
|
|
||||||
|
if (typeof data === 'undefined') {
|
||||||
|
return 'undefined';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof data === 'string') {
|
||||||
|
return 'string';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof data === 'number') {
|
||||||
|
return 'number';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof data === 'boolean') {
|
||||||
|
return 'boolean';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data === null) {
|
||||||
|
return 'null';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Array.isArray(data)) {
|
||||||
|
return 'array';
|
||||||
|
}
|
||||||
|
|
||||||
|
const { type, asError, inputData } = data;
|
||||||
|
if (!Object.hasOwnProperty.call(SAMPLE_DATA, type)) {
|
||||||
|
throw new functions.https.HttpsError('invalid-argument', 'Invalid test requested.');
|
||||||
|
}
|
||||||
|
|
||||||
|
const outputData = SAMPLE_DATA[type];
|
||||||
|
|
||||||
|
try {
|
||||||
|
assert.deepEqual(outputData, inputData);
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e);
|
||||||
|
throw new functions.https.HttpsError(
|
||||||
|
'invalid-argument',
|
||||||
|
'Input and Output types did not match.',
|
||||||
|
(e as FirebaseError).message,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// all good
|
||||||
|
if (asError) {
|
||||||
|
throw new functions.https.HttpsError(
|
||||||
|
'cancelled',
|
||||||
|
'Response data was requested to be sent as part of an Error payload, so here we are!',
|
||||||
|
outputData,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return outputData;
|
||||||
|
});
|
16
.github/workflows/scripts/functions/tsconfig.json
vendored
Normal file
16
.github/workflows/scripts/functions/tsconfig.json
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"module": "commonjs",
|
||||||
|
"noImplicitReturns": true,
|
||||||
|
"noUnusedLocals": true,
|
||||||
|
"outDir": "lib",
|
||||||
|
"sourceMap": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"strict": true,
|
||||||
|
"target": "es2017"
|
||||||
|
},
|
||||||
|
"compileOnSave": true,
|
||||||
|
"include": [
|
||||||
|
"src"
|
||||||
|
]
|
||||||
|
}
|
6
.github/workflows/scripts/start-firebase-emulator.bat
vendored
Normal file
6
.github/workflows/scripts/start-firebase-emulator.bat
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
@REM this pushd is likely not needed, but just in case
|
||||||
|
pushd "%~dp0"
|
||||||
|
@REM this is just to see what our current directory is. Should be .github/workflow/scripts
|
||||||
|
echo %cd%
|
||||||
|
@REM strangely, unless you specify the config file as being right in the current directory, it won't find it, and everything fails
|
||||||
|
yarn firebase emulators:start --config %cd%\firebase.json --only auth,database,firestore,functions,storage --project react-native-firebase-testing
|
44
.github/workflows/scripts/start-firebase-emulator.sh
vendored
Executable file
44
.github/workflows/scripts/start-firebase-emulator.sh
vendored
Executable file
@@ -0,0 +1,44 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
if ! [ -x "$(command -v firebase)" ]; then
|
||||||
|
echo "❌ Firebase-tools CLI is missing. Run 'npm i -g firebase-tools' or the equivalent"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
EMU_START_COMMAND="firebase emulators:start --only auth,database,firestore,functions,storage --project react-native-firebase-testing"
|
||||||
|
#EMU_START_COMMAND="sleep 120"
|
||||||
|
MAX_RETRIES=3
|
||||||
|
MAX_CHECKATTEMPTS=60
|
||||||
|
CHECKATTEMPTS_WAIT=1
|
||||||
|
|
||||||
|
# Make sure functions are ready to go
|
||||||
|
pushd "$(dirname "$0")/functions" && yarn && yarn build && popd
|
||||||
|
|
||||||
|
|
||||||
|
RETRIES=1
|
||||||
|
while [ $RETRIES -le $MAX_RETRIES ]; do
|
||||||
|
|
||||||
|
if [ "$1" == "--no-daemon" ]; then
|
||||||
|
echo "Starting Firebase Emulator Suite in foreground."
|
||||||
|
$EMU_START_COMMAND
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "Starting Firebase Emulator Suite in background."
|
||||||
|
$EMU_START_COMMAND &
|
||||||
|
CHECKATTEMPTS=1
|
||||||
|
while [ $CHECKATTEMPTS -le $MAX_CHECKATTEMPTS ]; do
|
||||||
|
sleep $CHECKATTEMPTS_WAIT
|
||||||
|
if curl --output /dev/null --silent --fail http://localhost:8080; then
|
||||||
|
echo "Firebase Emulator Suite is online!"
|
||||||
|
exit 0;
|
||||||
|
fi
|
||||||
|
echo "Waiting for Firebase Emulator Suite to come online, check $CHECKATTEMPTS of $MAX_CHECKATTEMPTS..."
|
||||||
|
((CHECKATTEMPTS = CHECKATTEMPTS + 1))
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Firebase Emulator Suite did not come online in $MAX_CHECKATTEMPTS checks. Try $RETRIES of $MAX_RETRIES."
|
||||||
|
((RETRIES = RETRIES + 1))
|
||||||
|
|
||||||
|
done
|
||||||
|
echo "Firebase Emulator Suite did not come online after $MAX_RETRIES attempts."
|
||||||
|
exit 1
|
21
.github/workflows/scripts/storage.rules
vendored
Normal file
21
.github/workflows/scripts/storage.rules
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
rules_version = '2';
|
||||||
|
service firebase.storage {
|
||||||
|
match /b/{bucket}/o {
|
||||||
|
match /{document=**} {
|
||||||
|
allow read, write: if false;
|
||||||
|
}
|
||||||
|
|
||||||
|
match /writeOnly.jpeg {
|
||||||
|
allow read: if false;
|
||||||
|
allow write: if true;
|
||||||
|
}
|
||||||
|
|
||||||
|
match /playground/{document=**} {
|
||||||
|
allow read, write: if true;
|
||||||
|
}
|
||||||
|
|
||||||
|
match /react-native-firebase-testing/{document=**} {
|
||||||
|
allow read, write: if true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
6
.gitignore
vendored
6
.gitignore
vendored
@@ -41,6 +41,8 @@ local.properties
|
|||||||
node_modules/
|
node_modules/
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
|
|
||||||
Example/**/update.json
|
Example/**/.update
|
||||||
|
Example/**/.pushy
|
||||||
|
Example/testHotUpdate/artifacts
|
||||||
|
|
||||||
yarn-error.log
|
yarn-error.log
|
||||||
Example/testHotUpdate/.pushy
|
|
||||||
|
6
Example/testHotUpdate/.buckconfig
Normal file
6
Example/testHotUpdate/.buckconfig
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
|
||||||
|
[android]
|
||||||
|
target = Google Inc.:Google APIs:23
|
||||||
|
|
||||||
|
[maven_repositories]
|
||||||
|
central = https://repo1.maven.org/maven2
|
94
Example/testHotUpdate/.detoxrc.js
Normal file
94
Example/testHotUpdate/.detoxrc.js
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
/** @type {Detox.DetoxConfig} */
|
||||||
|
module.exports = {
|
||||||
|
logger: {
|
||||||
|
level: process.env.CI ? 'debug' : undefined,
|
||||||
|
},
|
||||||
|
testRunner: {
|
||||||
|
args: {
|
||||||
|
config: 'e2e/jest.config.js',
|
||||||
|
maxWorkers: process.env.CI ? 2 : undefined,
|
||||||
|
_: ['e2e'],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
artifacts: {
|
||||||
|
plugins: {
|
||||||
|
log: process.env.CI ? 'failing' : undefined,
|
||||||
|
screenshot: process.env.CI ? 'failing' : undefined,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
apps: {
|
||||||
|
'ios.debug': {
|
||||||
|
type: 'ios.app',
|
||||||
|
binaryPath: 'ios/build/Build/Products/Debug-iphonesimulator/AwesomeProject.app',
|
||||||
|
build: "xcodebuild -workspace ios/AwesomeProject.xcworkspace -UseNewBuildSystem=NO -scheme AwesomeProject -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build",
|
||||||
|
start: "scripts/start-rn.sh ios",
|
||||||
|
},
|
||||||
|
'ios.release': {
|
||||||
|
type: 'ios.app',
|
||||||
|
binaryPath:
|
||||||
|
'ios/build/Build/Products/Release-iphonesimulator/AwesomeProject.app',
|
||||||
|
build:
|
||||||
|
'export RCT_NO_LAUNCH_PACKAGER=true && xcodebuild -workspace ios/AwesomeProject.xcworkspace -UseNewBuildSystem=NO -scheme AwesomeProject -configuration Release -sdk iphonesimulator -derivedDataPath ios/build -quiet',
|
||||||
|
},
|
||||||
|
'android.debug': {
|
||||||
|
type: 'android.apk',
|
||||||
|
binaryPath: 'android/app/build/outputs/apk/debug/app-debug.apk',
|
||||||
|
build:
|
||||||
|
'cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug',
|
||||||
|
start: "scripts/start-rn.sh android",
|
||||||
|
reversePorts: [8081],
|
||||||
|
},
|
||||||
|
'android.release': {
|
||||||
|
type: 'android.apk',
|
||||||
|
binaryPath: 'android/app/build/outputs/apk/release/app-release.apk',
|
||||||
|
build:
|
||||||
|
'cd android && ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
devices: {
|
||||||
|
simulator: {
|
||||||
|
type: 'ios.simulator',
|
||||||
|
device: {
|
||||||
|
type: 'iPhone 14',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
attached: {
|
||||||
|
type: 'android.attached',
|
||||||
|
device: {
|
||||||
|
adbName: '.*',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
emulator: {
|
||||||
|
type: 'android.emulator',
|
||||||
|
device: {
|
||||||
|
avdName: 'Pixel_3a_API_33_arm64-v8a',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
configurations: {
|
||||||
|
'ios.sim.debug': {
|
||||||
|
device: 'simulator',
|
||||||
|
app: 'ios.debug',
|
||||||
|
},
|
||||||
|
'ios.sim.release': {
|
||||||
|
device: 'simulator',
|
||||||
|
app: 'ios.release',
|
||||||
|
},
|
||||||
|
'android.att.debug': {
|
||||||
|
device: 'attached',
|
||||||
|
app: 'android.debug',
|
||||||
|
},
|
||||||
|
'android.att.release': {
|
||||||
|
device: 'attached',
|
||||||
|
app: 'android.release',
|
||||||
|
},
|
||||||
|
'android.emu.debug': {
|
||||||
|
device: 'emulator',
|
||||||
|
app: 'android.debug',
|
||||||
|
},
|
||||||
|
'android.emu.release': {
|
||||||
|
device: 'emulator',
|
||||||
|
app: 'android.release',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
66
Example/testHotUpdate/.flowconfig
Normal file
66
Example/testHotUpdate/.flowconfig
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
[ignore]
|
||||||
|
; We fork some components by platform
|
||||||
|
.*/*[.]android.js
|
||||||
|
|
||||||
|
; Ignore "BUCK" generated dirs
|
||||||
|
<PROJECT_ROOT>/\.buckd/
|
||||||
|
|
||||||
|
; Ignore polyfills
|
||||||
|
node_modules/react-native/Libraries/polyfills/.*
|
||||||
|
|
||||||
|
; Flow doesn't support platforms
|
||||||
|
.*/Libraries/Utilities/LoadingView.js
|
||||||
|
|
||||||
|
.*/node_modules/resolve/test/resolver/malformed_package_json/package\.json$
|
||||||
|
|
||||||
|
[untyped]
|
||||||
|
.*/node_modules/@react-native-community/cli/.*/.*
|
||||||
|
|
||||||
|
[include]
|
||||||
|
|
||||||
|
[libs]
|
||||||
|
node_modules/react-native/interface.js
|
||||||
|
node_modules/react-native/flow/
|
||||||
|
|
||||||
|
[options]
|
||||||
|
emoji=true
|
||||||
|
|
||||||
|
exact_by_default=true
|
||||||
|
|
||||||
|
format.bracket_spacing=false
|
||||||
|
|
||||||
|
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/\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
|
||||||
|
|
||||||
|
[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
|
||||||
|
unnecessary-invariant=warn
|
||||||
|
|
||||||
|
[strict]
|
||||||
|
deprecated-type
|
||||||
|
nonstrict-import
|
||||||
|
sketchy-null
|
||||||
|
unclear-type
|
||||||
|
unsafe-getters-setters
|
||||||
|
untyped-import
|
||||||
|
untyped-type-import
|
||||||
|
|
||||||
|
[version]
|
||||||
|
^0.176.3
|
12
Example/testHotUpdate/.gitignore
vendored
12
Example/testHotUpdate/.gitignore
vendored
@@ -30,9 +30,6 @@ build/
|
|||||||
local.properties
|
local.properties
|
||||||
*.iml
|
*.iml
|
||||||
*.hprof
|
*.hprof
|
||||||
.cxx/
|
|
||||||
*.keystore
|
|
||||||
!debug.keystore
|
|
||||||
|
|
||||||
# node.js
|
# node.js
|
||||||
#
|
#
|
||||||
@@ -40,6 +37,12 @@ node_modules/
|
|||||||
npm-debug.log
|
npm-debug.log
|
||||||
yarn-error.log
|
yarn-error.log
|
||||||
|
|
||||||
|
# BUCK
|
||||||
|
buck-out/
|
||||||
|
\.buckd/
|
||||||
|
*.keystore
|
||||||
|
!debug.keystore
|
||||||
|
|
||||||
# fastlane
|
# fastlane
|
||||||
#
|
#
|
||||||
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
|
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
|
||||||
@@ -58,6 +61,3 @@ yarn-error.log
|
|||||||
# Ruby / CocoaPods
|
# Ruby / CocoaPods
|
||||||
/ios/Pods/
|
/ios/Pods/
|
||||||
/vendor/bundle/
|
/vendor/bundle/
|
||||||
|
|
||||||
# Temporary files created by Metro to check the health of the file watcher
|
|
||||||
.metro-health-check*
|
|
1
Example/testHotUpdate/.nvmrc
Normal file
1
Example/testHotUpdate/.nvmrc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
18
|
@@ -1 +1 @@
|
|||||||
2.7.6
|
2.7.5
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
|
|
||||||
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
|
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
|
||||||
ruby File.read(File.join(__dir__, '.ruby-version')).strip
|
ruby '3.1.1'
|
||||||
|
|
||||||
gem 'cocoapods', '~> 1.11', '>= 1.11.3'
|
gem 'cocoapods', '~> 1.11', '>= 1.11.2'
|
||||||
|
@@ -1,30 +1,29 @@
|
|||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
CFPropertyList (3.0.5)
|
CFPropertyList (3.0.6)
|
||||||
rexml
|
rexml
|
||||||
activesupport (6.1.5.1)
|
activesupport (7.0.4.3)
|
||||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||||
i18n (>= 1.6, < 2)
|
i18n (>= 1.6, < 2)
|
||||||
minitest (>= 5.1)
|
minitest (>= 5.1)
|
||||||
tzinfo (~> 2.0)
|
tzinfo (~> 2.0)
|
||||||
zeitwerk (~> 2.3)
|
addressable (2.8.1)
|
||||||
addressable (2.8.0)
|
public_suffix (>= 2.0.2, < 6.0)
|
||||||
public_suffix (>= 2.0.2, < 5.0)
|
|
||||||
algoliasearch (1.27.5)
|
algoliasearch (1.27.5)
|
||||||
httpclient (~> 2.8, >= 2.8.3)
|
httpclient (~> 2.8, >= 2.8.3)
|
||||||
json (>= 1.5.1)
|
json (>= 1.5.1)
|
||||||
atomos (0.1.3)
|
atomos (0.1.3)
|
||||||
claide (1.1.0)
|
claide (1.1.0)
|
||||||
cocoapods (1.11.3)
|
cocoapods (1.12.0)
|
||||||
addressable (~> 2.8)
|
addressable (~> 2.8)
|
||||||
claide (>= 1.0.2, < 2.0)
|
claide (>= 1.0.2, < 2.0)
|
||||||
cocoapods-core (= 1.11.3)
|
cocoapods-core (= 1.12.0)
|
||||||
cocoapods-deintegrate (>= 1.0.3, < 2.0)
|
cocoapods-deintegrate (>= 1.0.3, < 2.0)
|
||||||
cocoapods-downloader (>= 1.4.0, < 2.0)
|
cocoapods-downloader (>= 1.6.0, < 2.0)
|
||||||
cocoapods-plugins (>= 1.0.0, < 2.0)
|
cocoapods-plugins (>= 1.0.0, < 2.0)
|
||||||
cocoapods-search (>= 1.0.0, < 2.0)
|
cocoapods-search (>= 1.0.0, < 2.0)
|
||||||
cocoapods-trunk (>= 1.4.0, < 2.0)
|
cocoapods-trunk (>= 1.6.0, < 2.0)
|
||||||
cocoapods-try (>= 1.1.0, < 2.0)
|
cocoapods-try (>= 1.1.0, < 2.0)
|
||||||
colored2 (~> 3.1)
|
colored2 (~> 3.1)
|
||||||
escape (~> 0.0.4)
|
escape (~> 0.0.4)
|
||||||
@@ -32,10 +31,10 @@ GEM
|
|||||||
gh_inspector (~> 1.0)
|
gh_inspector (~> 1.0)
|
||||||
molinillo (~> 0.8.0)
|
molinillo (~> 0.8.0)
|
||||||
nap (~> 1.0)
|
nap (~> 1.0)
|
||||||
ruby-macho (>= 1.0, < 3.0)
|
ruby-macho (>= 2.3.0, < 3.0)
|
||||||
xcodeproj (>= 1.21.0, < 2.0)
|
xcodeproj (>= 1.21.0, < 2.0)
|
||||||
cocoapods-core (1.11.3)
|
cocoapods-core (1.12.0)
|
||||||
activesupport (>= 5.0, < 7)
|
activesupport (>= 5.0, < 8)
|
||||||
addressable (~> 2.8)
|
addressable (~> 2.8)
|
||||||
algoliasearch (~> 1.0)
|
algoliasearch (~> 1.0)
|
||||||
concurrent-ruby (~> 1.1)
|
concurrent-ruby (~> 1.1)
|
||||||
@@ -54,19 +53,19 @@ GEM
|
|||||||
netrc (~> 0.11)
|
netrc (~> 0.11)
|
||||||
cocoapods-try (1.2.0)
|
cocoapods-try (1.2.0)
|
||||||
colored2 (3.1.2)
|
colored2 (3.1.2)
|
||||||
concurrent-ruby (1.1.10)
|
concurrent-ruby (1.2.2)
|
||||||
escape (0.0.4)
|
escape (0.0.4)
|
||||||
ethon (0.15.0)
|
ethon (0.16.0)
|
||||||
ffi (>= 1.15.0)
|
ffi (>= 1.15.0)
|
||||||
ffi (1.15.5)
|
ffi (1.15.5)
|
||||||
fourflusher (2.3.1)
|
fourflusher (2.3.1)
|
||||||
fuzzy_match (2.0.4)
|
fuzzy_match (2.0.4)
|
||||||
gh_inspector (1.1.3)
|
gh_inspector (1.1.3)
|
||||||
httpclient (2.8.3)
|
httpclient (2.8.3)
|
||||||
i18n (1.10.0)
|
i18n (1.12.0)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
json (2.6.1)
|
json (2.6.3)
|
||||||
minitest (5.15.0)
|
minitest (5.18.0)
|
||||||
molinillo (0.8.0)
|
molinillo (0.8.0)
|
||||||
nanaimo (0.3.0)
|
nanaimo (0.3.0)
|
||||||
nap (1.1.0)
|
nap (1.1.0)
|
||||||
@@ -76,16 +75,15 @@ GEM
|
|||||||
ruby-macho (2.5.1)
|
ruby-macho (2.5.1)
|
||||||
typhoeus (1.4.0)
|
typhoeus (1.4.0)
|
||||||
ethon (>= 0.9.0)
|
ethon (>= 0.9.0)
|
||||||
tzinfo (2.0.4)
|
tzinfo (2.0.6)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
xcodeproj (1.21.0)
|
xcodeproj (1.22.0)
|
||||||
CFPropertyList (>= 2.3.3, < 4.0)
|
CFPropertyList (>= 2.3.3, < 4.0)
|
||||||
atomos (~> 0.1.3)
|
atomos (~> 0.1.3)
|
||||||
claide (>= 1.0.2, < 2.0)
|
claide (>= 1.0.2, < 2.0)
|
||||||
colored2 (~> 3.1)
|
colored2 (~> 3.1)
|
||||||
nanaimo (~> 0.3.0)
|
nanaimo (~> 0.3.0)
|
||||||
rexml (~> 3.2.4)
|
rexml (~> 3.2.4)
|
||||||
zeitwerk (2.5.4)
|
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
@@ -94,7 +92,7 @@ DEPENDENCIES
|
|||||||
cocoapods (~> 1.11, >= 1.11.2)
|
cocoapods (~> 1.11, >= 1.11.2)
|
||||||
|
|
||||||
RUBY VERSION
|
RUBY VERSION
|
||||||
ruby 2.7.4p191
|
ruby 3.1.1p18
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
2.2.27
|
2.1.4
|
||||||
|
66
Example/testHotUpdate/README.md
Normal file
66
Example/testHotUpdate/README.md
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
# react-native-android-detox
|
||||||
|
|
||||||
|
[](https://github.com/remarkablemark/react-native-android-detox/actions/workflows/e2e-android.yml)
|
||||||
|
|
||||||
|
React Native Android Detox. The project has already been patched with the [additional Android configuration](https://wix.github.io/Detox/docs/introduction/project-setup/).
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
Follow the [environment setup](https://wix.github.io/Detox/docs/introduction/getting-started).
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Clone the repository:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
git clone https://github.com/remarkablemark/react-native-android-detox.git
|
||||||
|
cd react-native-android-detox
|
||||||
|
```
|
||||||
|
|
||||||
|
Install the dependencies:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
yarn
|
||||||
|
```
|
||||||
|
|
||||||
|
## Build
|
||||||
|
|
||||||
|
### Android (Debug)
|
||||||
|
|
||||||
|
Build the Android debug app:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
yarn detox build --configuration android.emu.debug
|
||||||
|
```
|
||||||
|
|
||||||
|
### Android (Release)
|
||||||
|
|
||||||
|
Build the Android release app:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
yarn detox build --configuration android.emu.release
|
||||||
|
```
|
||||||
|
|
||||||
|
## Test
|
||||||
|
|
||||||
|
### Android (Debug)
|
||||||
|
|
||||||
|
Start the app:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
yarn start
|
||||||
|
```
|
||||||
|
|
||||||
|
Run the test:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
yarn detox test --configuration android.emu.debug
|
||||||
|
```
|
||||||
|
|
||||||
|
### Android (Release)
|
||||||
|
|
||||||
|
Run the test:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
yarn detox test --configuration android.emu.release
|
||||||
|
```
|
@@ -35,12 +35,12 @@ android_library(
|
|||||||
|
|
||||||
android_build_config(
|
android_build_config(
|
||||||
name = "build_config",
|
name = "build_config",
|
||||||
package = "com.testhotupdate",
|
package = "com.awesomeproject",
|
||||||
)
|
)
|
||||||
|
|
||||||
android_resource(
|
android_resource(
|
||||||
name = "res",
|
name = "res",
|
||||||
package = "com.testhotupdate",
|
package = "com.awesomeproject",
|
||||||
res = "src/main/res",
|
res = "src/main/res",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -1,87 +1,130 @@
|
|||||||
apply plugin: "com.android.application"
|
plugins {
|
||||||
apply plugin: "com.facebook.react"
|
id 'com.android.application'
|
||||||
|
id 'org.jetbrains.kotlin.android'
|
||||||
|
}
|
||||||
|
|
||||||
import com.android.build.OutputFile
|
import com.android.build.OutputFile
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the configuration block to customize your React Native Android app.
|
* The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
|
||||||
* By default you don't need to apply any configuration, just uncomment the lines you need.
|
* and bundleReleaseJsAndAssets).
|
||||||
|
* These basically call `react-native bundle` with the correct arguments during the Android build
|
||||||
|
* cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
|
||||||
|
* bundle directly from the development server. Below you can see all the possible configurations
|
||||||
|
* and their defaults. If you decide to add a configuration block, make sure to add it before the
|
||||||
|
* `apply from: "../../node_modules/react-native/react.gradle"` line.
|
||||||
|
*
|
||||||
|
* project.ext.react = [
|
||||||
|
* // the name of the generated asset file containing your JS bundle
|
||||||
|
* bundleAssetName: "index.android.bundle",
|
||||||
|
*
|
||||||
|
* // 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",
|
||||||
|
*
|
||||||
|
* // https://reactnative.dev/docs/performance#enable-the-ram-format
|
||||||
|
* bundleCommand: "ram-bundle",
|
||||||
|
*
|
||||||
|
* // whether to bundle JS and assets in debug mode
|
||||||
|
* bundleInDebug: false,
|
||||||
|
*
|
||||||
|
* // whether to bundle JS and assets in release mode
|
||||||
|
* bundleInRelease: true,
|
||||||
|
*
|
||||||
|
* // whether to bundle JS and assets in another build variant (if configured).
|
||||||
|
* // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
|
||||||
|
* // The configuration property can be in the following formats
|
||||||
|
* // 'bundleIn${productFlavor}${buildType}'
|
||||||
|
* // 'bundleIn${buildType}'
|
||||||
|
* // bundleInFreeDebug: true,
|
||||||
|
* // bundleInPaidRelease: true,
|
||||||
|
* // bundleInBeta: true,
|
||||||
|
*
|
||||||
|
* // whether to disable dev mode in custom build variants (by default only disabled in release)
|
||||||
|
* // for example: to disable dev mode in the staging build type (if configured)
|
||||||
|
* devDisabledInStaging: true,
|
||||||
|
* // The configuration property can be in the following formats
|
||||||
|
* // 'devDisabledIn${productFlavor}${buildType}'
|
||||||
|
* // 'devDisabledIn${buildType}'
|
||||||
|
*
|
||||||
|
* // the root of your project, i.e. where "package.json" lives
|
||||||
|
* root: "../../",
|
||||||
|
*
|
||||||
|
* // where to put the JS bundle asset in debug mode
|
||||||
|
* jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
|
||||||
|
*
|
||||||
|
* // where to put the JS bundle asset in release mode
|
||||||
|
* jsBundleDirRelease: "$buildDir/intermediates/assets/release",
|
||||||
|
*
|
||||||
|
* // where to put drawable resources / React Native assets, e.g. the ones you use via
|
||||||
|
* // require('./image.png')), in debug mode
|
||||||
|
* resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
|
||||||
|
*
|
||||||
|
* // where to put drawable resources / React Native assets, e.g. the ones you use via
|
||||||
|
* // require('./image.png')), in release mode
|
||||||
|
* resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
|
||||||
|
*
|
||||||
|
* // by default the gradle tasks are skipped if none of the JS files or assets change; this means
|
||||||
|
* // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
|
||||||
|
* // date; if you have any other folders that you want to ignore for performance reasons (gradle
|
||||||
|
* // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
|
||||||
|
* // for example, you might want to remove it from here.
|
||||||
|
* inputExcludes: ["android/**", "ios/**"],
|
||||||
|
*
|
||||||
|
* // override which node gets called and with what additional arguments
|
||||||
|
* nodeExecutableAndArgs: ["node"],
|
||||||
|
*
|
||||||
|
* // supply additional arguments to the packager
|
||||||
|
* extraPackagerArgs: []
|
||||||
|
* ]
|
||||||
*/
|
*/
|
||||||
react {
|
|
||||||
/* Folders */
|
|
||||||
// The root of your project, i.e. where "package.json" lives. Default is '..'
|
|
||||||
// root = file("../")
|
|
||||||
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
|
|
||||||
// reactNativeDir = file("../node_modules/react-native")
|
|
||||||
// The folder where the react-native Codegen package is. Default is ../node_modules/react-native-codegen
|
|
||||||
// codegenDir = file("../node_modules/react-native-codegen")
|
|
||||||
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
|
|
||||||
// cliFile = file("../node_modules/react-native/cli.js")
|
|
||||||
|
|
||||||
/* Variants */
|
project.ext.react = [
|
||||||
// The list of variants to that are debuggable. For those we're going to
|
enableHermes: false, // clean and rebuild if changing
|
||||||
// skip the bundling of the JS bundle and the assets. By default is just 'debug'.
|
]
|
||||||
// If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
|
|
||||||
// debuggableVariants = ["liteDebug", "prodDebug"]
|
|
||||||
|
|
||||||
/* Bundling */
|
apply from: "../../node_modules/react-native/react.gradle"
|
||||||
// A list containing the node command and its flags. Default is just 'node'.
|
|
||||||
// nodeExecutableAndArgs = ["node"]
|
|
||||||
//
|
|
||||||
// The command to run when bundling. By default is 'bundle'
|
|
||||||
// bundleCommand = "ram-bundle"
|
|
||||||
//
|
|
||||||
// The path to the CLI configuration file. Default is empty.
|
|
||||||
// bundleConfig = file(../rn-cli.config.js)
|
|
||||||
//
|
|
||||||
// The name of the generated asset file containing your JS bundle
|
|
||||||
// bundleAssetName = "MyApplication.android.bundle"
|
|
||||||
//
|
|
||||||
// The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
|
|
||||||
// entryFile = file("../js/MyApplication.android.js")
|
|
||||||
//
|
|
||||||
// A list of extra flags to pass to the 'bundle' commands.
|
|
||||||
// See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
|
|
||||||
// extraPackagerArgs = []
|
|
||||||
|
|
||||||
/* Hermes Commands */
|
|
||||||
// The hermes compiler command to run. By default it is 'hermesc'
|
|
||||||
// hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
|
|
||||||
//
|
|
||||||
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
|
|
||||||
// hermesFlags = ["-O", "-output-source-map"]
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set this to true to create four separate APKs instead of one,
|
* Set this to true to create two separate APKs instead of one:
|
||||||
* one for each native architecture. This is useful if you don't
|
* - An APK that only works on ARM devices
|
||||||
* use App Bundles (https://developer.android.com/guide/app-bundle/)
|
* - An APK that only works on x86 devices
|
||||||
* and want to have separate APKs to upload to the Play Store.
|
* The advantage is the size of the APK is reduced by about 4MB.
|
||||||
|
* Upload all the APKs to the Play Store and people will download
|
||||||
|
* the correct one based on the CPU architecture of their device.
|
||||||
*/
|
*/
|
||||||
def enableSeparateBuildPerCPUArchitecture = false
|
def enableSeparateBuildPerCPUArchitecture = false
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
|
* Run Proguard to shrink the Java bytecode in release builds.
|
||||||
*/
|
*/
|
||||||
def enableProguardInReleaseBuilds = false
|
def enableProguardInReleaseBuilds = false
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The preferred build flavor of JavaScriptCore (JSC)
|
* The preferred build flavor of JavaScriptCore.
|
||||||
*
|
*
|
||||||
* For example, to use the international variant, you can use:
|
* For example, to use the international variant, you can use:
|
||||||
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
|
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
|
||||||
*
|
*
|
||||||
* The international variant includes ICU i18n library and necessary data
|
* The international variant includes ICU i18n library and necessary data
|
||||||
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
|
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
|
||||||
* give correct results when using with locales other than en-US. Note that
|
* give correct results when using with locales other than en-US. Note that
|
||||||
* this variant is about 6MiB larger per architecture than default.
|
* this variant is about 6MiB larger per architecture than default.
|
||||||
*/
|
*/
|
||||||
def jscFlavor = 'org.webkit:android-jsc:+'
|
def jscFlavor = 'org.webkit:android-jsc:+'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Private function to get the list of Native Architectures you want to build.
|
* Whether to enable the Hermes VM.
|
||||||
* This reads the value from reactNativeArchitectures in your gradle.properties
|
*
|
||||||
* file and works together with the --active-arch-only flag of react-native run-android.
|
* This should be set on project.ext.react and that value will be read here. If it is not set
|
||||||
|
* on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
|
||||||
|
* and the benefits of using Hermes will therefore be sharply reduced.
|
||||||
|
*/
|
||||||
|
def enableHermes = project.ext.react.get("enableHermes", false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Architectures to build native code for.
|
||||||
*/
|
*/
|
||||||
def reactNativeArchitectures() {
|
def reactNativeArchitectures() {
|
||||||
def value = project.getProperties().get("reactNativeArchitectures")
|
def value = project.getProperties().get("reactNativeArchitectures")
|
||||||
@@ -93,13 +136,82 @@ android {
|
|||||||
|
|
||||||
compileSdkVersion rootProject.ext.compileSdkVersion
|
compileSdkVersion rootProject.ext.compileSdkVersion
|
||||||
|
|
||||||
namespace "com.testhotupdate"
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.testhotupdate"
|
applicationId "com.awesomeproject"
|
||||||
minSdkVersion rootProject.ext.minSdkVersion
|
minSdkVersion rootProject.ext.minSdkVersion
|
||||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "1.0"
|
versionName "1.0"
|
||||||
|
testBuildType System.getProperty('testBuildType', 'debug')
|
||||||
|
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
||||||
|
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
|
||||||
|
|
||||||
|
if (isNewArchitectureEnabled()) {
|
||||||
|
// We configure the NDK build only if you decide to opt-in for the New Architecture.
|
||||||
|
externalNativeBuild {
|
||||||
|
ndkBuild {
|
||||||
|
arguments "APP_PLATFORM=android-21",
|
||||||
|
"APP_STL=c++_shared",
|
||||||
|
"NDK_TOOLCHAIN_VERSION=clang",
|
||||||
|
"GENERATED_SRC_DIR=$buildDir/generated/source",
|
||||||
|
"PROJECT_BUILD_DIR=$buildDir",
|
||||||
|
"REACT_ANDROID_DIR=$rootDir/../node_modules/react-native/ReactAndroid",
|
||||||
|
"REACT_ANDROID_BUILD_DIR=$rootDir/../node_modules/react-native/ReactAndroid/build",
|
||||||
|
"NODE_MODULES_DIR=$rootDir/../node_modules"
|
||||||
|
cFlags "-Wall", "-Werror", "-fexceptions", "-frtti", "-DWITH_INSPECTOR=1"
|
||||||
|
cppFlags "-std=c++17"
|
||||||
|
// Make sure this target name is the same you specify inside the
|
||||||
|
// src/main/jni/Android.mk file for the `LOCAL_MODULE` variable.
|
||||||
|
targets "awesomeproject_appmodules"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!enableSeparateBuildPerCPUArchitecture) {
|
||||||
|
ndk {
|
||||||
|
abiFilters (*reactNativeArchitectures())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isNewArchitectureEnabled()) {
|
||||||
|
// We configure the NDK build only if you decide to opt-in for the New Architecture.
|
||||||
|
externalNativeBuild {
|
||||||
|
ndkBuild {
|
||||||
|
path "$projectDir/src/main/jni/Android.mk"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
def reactAndroidProjectDir = project(':ReactAndroid').projectDir
|
||||||
|
def packageReactNdkDebugLibs = tasks.register("packageReactNdkDebugLibs", Copy) {
|
||||||
|
dependsOn(":ReactAndroid:packageReactNdkDebugLibsForBuck")
|
||||||
|
from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib")
|
||||||
|
into("$buildDir/react-ndk/exported")
|
||||||
|
}
|
||||||
|
def packageReactNdkReleaseLibs = tasks.register("packageReactNdkReleaseLibs", Copy) {
|
||||||
|
dependsOn(":ReactAndroid:packageReactNdkReleaseLibsForBuck")
|
||||||
|
from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib")
|
||||||
|
into("$buildDir/react-ndk/exported")
|
||||||
|
}
|
||||||
|
afterEvaluate {
|
||||||
|
// If you wish to add a custom TurboModule or component locally,
|
||||||
|
// you should uncomment this line.
|
||||||
|
// preBuild.dependsOn("generateCodegenArtifactsFromSchema")
|
||||||
|
preDebugBuild.dependsOn(packageReactNdkDebugLibs)
|
||||||
|
preReleaseBuild.dependsOn(packageReactNdkReleaseLibs)
|
||||||
|
|
||||||
|
// Due to a bug inside AGP, we have to explicitly set a dependency
|
||||||
|
// between configureNdkBuild* tasks and the preBuild tasks.
|
||||||
|
// This can be removed once this is solved: https://issuetracker.google.com/issues/207403732
|
||||||
|
configureNdkBuildRelease.dependsOn(preReleaseBuild)
|
||||||
|
configureNdkBuildDebug.dependsOn(preDebugBuild)
|
||||||
|
reactNativeArchitectures().each { architecture ->
|
||||||
|
tasks.findByName("configureNdkBuildDebug[${architecture}]")?.configure {
|
||||||
|
dependsOn("preDebugBuild")
|
||||||
|
}
|
||||||
|
tasks.findByName("configureNdkBuildRelease[${architecture}]")?.configure {
|
||||||
|
dependsOn("preReleaseBuild")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
splits {
|
splits {
|
||||||
@@ -128,6 +240,7 @@ 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"
|
||||||
|
proguardFile "${rootProject.projectDir}/../node_modules/detox/android/detox/proguard-rules-app.pro"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -149,22 +262,67 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// The version of react-native is set by the React Native Gradle Plugin
|
androidTestImplementation('com.wix:detox:+')
|
||||||
implementation("com.facebook.react:react-android")
|
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||||
|
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||||
|
|
||||||
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0")
|
//noinspection GradleDynamicVersion
|
||||||
|
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:${FLIPPER_VERSION}")
|
|
||||||
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
|
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
|
||||||
|
exclude group:'com.facebook.flipper'
|
||||||
exclude group:'com.squareup.okhttp3', module:'okhttp'
|
exclude group:'com.squareup.okhttp3', module:'okhttp'
|
||||||
}
|
}
|
||||||
|
|
||||||
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
|
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
|
||||||
if (hermesEnabled.toBoolean()) {
|
exclude group:'com.facebook.flipper'
|
||||||
implementation("com.facebook.react:hermes-android")
|
}
|
||||||
|
|
||||||
|
if (enableHermes) {
|
||||||
|
//noinspection GradleDynamicVersion
|
||||||
|
implementation("com.facebook.react:hermes-engine:+") { // From node_modules
|
||||||
|
exclude group:'com.facebook.fbjni'
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
implementation jscFlavor
|
implementation jscFlavor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
|
if (isNewArchitectureEnabled()) {
|
||||||
|
// If new architecture is enabled, we let you build RN from source
|
||||||
|
// Otherwise we fallback to a prebuilt .aar bundled in the NPM package.
|
||||||
|
// This will be applied to all the imported transtitive dependency.
|
||||||
|
configurations.all {
|
||||||
|
resolutionStrategy.dependencySubstitution {
|
||||||
|
substitute(module("com.facebook.react:react-native"))
|
||||||
|
.using(project(":ReactAndroid"))
|
||||||
|
.because("On New Architecture we're building React Native from source")
|
||||||
|
substitute(module("com.facebook.react:hermes-engine"))
|
||||||
|
.using(project(":ReactAndroid:hermes-engine"))
|
||||||
|
.because("On New Architecture we're building Hermes from source")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Run this once to be able to run the application with BUCK
|
||||||
|
// puts all compile dependencies into folder libs for BUCK to use
|
||||||
|
task copyDownloadableDepsToLibs(type: Copy) {
|
||||||
|
from configurations.implementation
|
||||||
|
into 'libs'
|
||||||
|
}
|
||||||
|
|
||||||
|
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
|
||||||
|
|
||||||
|
def isNewArchitectureEnabled() {
|
||||||
|
// To opt-in for the New Architecture, you can either:
|
||||||
|
// - Set `newArchEnabled` to true inside the `gradle.properties` file
|
||||||
|
// - Invoke gradle with `-newArchEnabled=true`
|
||||||
|
// - Set an environment variable `ORG_GRADLE_PROJECT_newArchEnabled=true`
|
||||||
|
return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
|
||||||
|
}
|
||||||
|
19
Example/testHotUpdate/android/app/build_defs.bzl
Normal file
19
Example/testHotUpdate/android/app/build_defs.bzl
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
"""Helper definitions to glob .aar and .jar targets"""
|
||||||
|
|
||||||
|
def create_aar_targets(aarfiles):
|
||||||
|
for aarfile in aarfiles:
|
||||||
|
name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
|
||||||
|
lib_deps.append(":" + name)
|
||||||
|
android_prebuilt_aar(
|
||||||
|
name = name,
|
||||||
|
aar = aarfile,
|
||||||
|
)
|
||||||
|
|
||||||
|
def create_jar_targets(jarfiles):
|
||||||
|
for jarfile in jarfiles:
|
||||||
|
name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")]
|
||||||
|
lib_deps.append(":" + name)
|
||||||
|
prebuilt_jar(
|
||||||
|
name = name,
|
||||||
|
binary_jar = jarfile,
|
||||||
|
)
|
@@ -0,0 +1,29 @@
|
|||||||
|
package com.awesomeproject;
|
||||||
|
|
||||||
|
import com.wix.detox.Detox;
|
||||||
|
import com.wix.detox.config.DetoxConfig;
|
||||||
|
|
||||||
|
import org.junit.Rule;
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.junit.runner.RunWith;
|
||||||
|
|
||||||
|
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||||
|
import androidx.test.filters.LargeTest;
|
||||||
|
import androidx.test.rule.ActivityTestRule;
|
||||||
|
|
||||||
|
@RunWith(AndroidJUnit4.class)
|
||||||
|
@LargeTest
|
||||||
|
public class DetoxTest {
|
||||||
|
@Rule
|
||||||
|
public ActivityTestRule<MainActivity> mActivityRule = new ActivityTestRule<>(MainActivity.class, false, false);
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void runDetoxTests() {
|
||||||
|
DetoxConfig detoxConfig = new DetoxConfig();
|
||||||
|
detoxConfig.idlePolicyConfig.masterTimeoutSec = 90;
|
||||||
|
detoxConfig.idlePolicyConfig.idleResourceTimeoutSec = 60;
|
||||||
|
detoxConfig.rnContextLoadTimeoutSec = (BuildConfig.DEBUG ? 180 : 60);
|
||||||
|
|
||||||
|
Detox.runTests(mActivityRule, detoxConfig);
|
||||||
|
}
|
||||||
|
}
|
@@ -4,7 +4,7 @@
|
|||||||
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
|
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
|
||||||
* directory of this source tree.
|
* directory of this source tree.
|
||||||
*/
|
*/
|
||||||
package com.testhotupdate;
|
package com.awesomeproject;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import com.facebook.flipper.android.AndroidFlipperClient;
|
import com.facebook.flipper.android.AndroidFlipperClient;
|
||||||
@@ -17,6 +17,7 @@ import com.facebook.flipper.plugins.inspector.DescriptorMapping;
|
|||||||
import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
|
import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
|
||||||
import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
|
import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
|
||||||
import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
|
import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
|
||||||
|
import com.facebook.flipper.plugins.react.ReactFlipperPlugin;
|
||||||
import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
|
import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
|
||||||
import com.facebook.react.ReactInstanceEventListener;
|
import com.facebook.react.ReactInstanceEventListener;
|
||||||
import com.facebook.react.ReactInstanceManager;
|
import com.facebook.react.ReactInstanceManager;
|
||||||
@@ -24,16 +25,13 @@ import com.facebook.react.bridge.ReactContext;
|
|||||||
import com.facebook.react.modules.network.NetworkingModule;
|
import com.facebook.react.modules.network.NetworkingModule;
|
||||||
import okhttp3.OkHttpClient;
|
import okhttp3.OkHttpClient;
|
||||||
|
|
||||||
/**
|
|
||||||
* Class responsible of loading Flipper inside your React Native application. This is the debug
|
|
||||||
* flavor of it. Here you can add your own plugins and customize the Flipper setup.
|
|
||||||
*/
|
|
||||||
public class ReactNativeFlipper {
|
public class ReactNativeFlipper {
|
||||||
public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
|
public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
|
||||||
if (FlipperUtils.shouldEnableFlipper(context)) {
|
if (FlipperUtils.shouldEnableFlipper(context)) {
|
||||||
final FlipperClient client = AndroidFlipperClient.getInstance(context);
|
final FlipperClient client = AndroidFlipperClient.getInstance(context);
|
||||||
|
|
||||||
client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
|
client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
|
||||||
|
client.addPlugin(new ReactFlipperPlugin());
|
||||||
client.addPlugin(new DatabasesFlipperPlugin(context));
|
client.addPlugin(new DatabasesFlipperPlugin(context));
|
||||||
client.addPlugin(new SharedPreferencesFlipperPlugin(context));
|
client.addPlugin(new SharedPreferencesFlipperPlugin(context));
|
||||||
client.addPlugin(CrashReporterPlugin.getInstance());
|
client.addPlugin(CrashReporterPlugin.getInstance());
|
||||||
@@ -72,4 +70,4 @@ public class ReactNativeFlipper {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -1,4 +1,5 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
package="com.awesomeproject">
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
|
|
||||||
@@ -8,7 +9,8 @@
|
|||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:allowBackup="false"
|
android:allowBackup="false"
|
||||||
android:theme="@style/AppTheme">
|
android:theme="@style/AppTheme"
|
||||||
|
android:networkSecurityConfig="@xml/network_security_config">
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
|
@@ -0,0 +1,48 @@
|
|||||||
|
package com.awesomeproject;
|
||||||
|
|
||||||
|
import com.facebook.react.ReactActivity;
|
||||||
|
import com.facebook.react.ReactActivityDelegate;
|
||||||
|
import com.facebook.react.ReactRootView;
|
||||||
|
|
||||||
|
public class MainActivity extends ReactActivity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the name of the main component registered from JavaScript. This is used to schedule
|
||||||
|
* rendering of the component.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected String getMainComponentName() {
|
||||||
|
return "AwesomeProject";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the instance of the {@link ReactActivityDelegate}. There the RootView is created and
|
||||||
|
* you can specify the renderer you wish to use - the new renderer (Fabric) or the old renderer
|
||||||
|
* (Paper).
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected ReactActivityDelegate createReactActivityDelegate() {
|
||||||
|
return new MainActivityDelegate(this, getMainComponentName());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class MainActivityDelegate extends ReactActivityDelegate {
|
||||||
|
public MainActivityDelegate(ReactActivity activity, String mainComponentName) {
|
||||||
|
super(activity, mainComponentName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected ReactRootView createRootView() {
|
||||||
|
ReactRootView reactRootView = new ReactRootView(getContext());
|
||||||
|
// If you opted-in for the New Architecture, we enable the Fabric Renderer.
|
||||||
|
reactRootView.setIsFabric(BuildConfig.IS_NEW_ARCHITECTURE_ENABLED);
|
||||||
|
return reactRootView;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean isConcurrentRootEnabled() {
|
||||||
|
// If you opted-in for the New Architecture, we enable Concurrent Root (i.e. React 18).
|
||||||
|
// More on this on https://reactjs.org/blog/2022/03/29/react-v18.html
|
||||||
|
return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,104 @@
|
|||||||
|
package com.awesomeproject;
|
||||||
|
|
||||||
|
import android.app.Application;
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.facebook.react.PackageList;
|
||||||
|
import com.facebook.react.ReactApplication;
|
||||||
|
import com.facebook.react.ReactInstanceManager;
|
||||||
|
import com.facebook.react.ReactNativeHost;
|
||||||
|
import com.facebook.react.ReactPackage;
|
||||||
|
import com.facebook.react.config.ReactFeatureFlags;
|
||||||
|
import com.facebook.react.shell.MainReactPackage;
|
||||||
|
import com.facebook.soloader.SoLoader;
|
||||||
|
import com.awesomeproject.newarchitecture.MainApplicationReactNativeHost;
|
||||||
|
import java.lang.reflect.InvocationTargetException;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import cn.reactnative.modules.update.UpdateContext;
|
||||||
|
import cn.reactnative.modules.update.UpdatePackage;
|
||||||
|
|
||||||
|
public class MainApplication extends Application implements ReactApplication {
|
||||||
|
|
||||||
|
private final ReactNativeHost mReactNativeHost =
|
||||||
|
new ReactNativeHost(this) {
|
||||||
|
@Override
|
||||||
|
public boolean getUseDeveloperSupport() {
|
||||||
|
return BuildConfig.DEBUG;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
protected String getJSBundleFile() {
|
||||||
|
return UpdateContext.getBundleUrl(MainApplication.this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected List<ReactPackage> getPackages() {
|
||||||
|
@SuppressWarnings("UnnecessaryLocalVariable")
|
||||||
|
List<ReactPackage> packages = new PackageList(this).getPackages();
|
||||||
|
// Packages that cannot be autolinked yet can be added manually here, for example:
|
||||||
|
// packages.add(new MyReactNativePackage());
|
||||||
|
return packages;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getJSMainModuleName() {
|
||||||
|
return "index";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
private final ReactNativeHost mNewArchitectureNativeHost =
|
||||||
|
new MainApplicationReactNativeHost(this);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ReactNativeHost getReactNativeHost() {
|
||||||
|
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
|
||||||
|
return mNewArchitectureNativeHost;
|
||||||
|
} else {
|
||||||
|
return mReactNativeHost;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate() {
|
||||||
|
super.onCreate();
|
||||||
|
// If you opted-in for the New Architecture, we enable the TurboModule system
|
||||||
|
ReactFeatureFlags.useTurboModules = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
|
||||||
|
SoLoader.init(this, /* native exopackage */ false);
|
||||||
|
initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Loads Flipper in React Native templates. Call this in the onCreate method with something like
|
||||||
|
* initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
|
||||||
|
*
|
||||||
|
* @param context
|
||||||
|
* @param reactInstanceManager
|
||||||
|
*/
|
||||||
|
private static void initializeFlipper(
|
||||||
|
Context context, ReactInstanceManager reactInstanceManager) {
|
||||||
|
if (BuildConfig.DEBUG) {
|
||||||
|
try {
|
||||||
|
/*
|
||||||
|
We use reflection here to pick up the class that initializes Flipper,
|
||||||
|
since Flipper library is not available in release mode
|
||||||
|
*/
|
||||||
|
Class<?> aClass = Class.forName("com.awesomeproject.ReactNativeFlipper");
|
||||||
|
aClass
|
||||||
|
.getMethod("initializeFlipper", Context.class, ReactInstanceManager.class)
|
||||||
|
.invoke(null, context, reactInstanceManager);
|
||||||
|
} catch (ClassNotFoundException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (NoSuchMethodException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (IllegalAccessException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (InvocationTargetException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,116 @@
|
|||||||
|
package com.awesomeproject.newarchitecture;
|
||||||
|
|
||||||
|
import android.app.Application;
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import com.facebook.react.PackageList;
|
||||||
|
import com.facebook.react.ReactInstanceManager;
|
||||||
|
import com.facebook.react.ReactNativeHost;
|
||||||
|
import com.facebook.react.ReactPackage;
|
||||||
|
import com.facebook.react.ReactPackageTurboModuleManagerDelegate;
|
||||||
|
import com.facebook.react.bridge.JSIModulePackage;
|
||||||
|
import com.facebook.react.bridge.JSIModuleProvider;
|
||||||
|
import com.facebook.react.bridge.JSIModuleSpec;
|
||||||
|
import com.facebook.react.bridge.JSIModuleType;
|
||||||
|
import com.facebook.react.bridge.JavaScriptContextHolder;
|
||||||
|
import com.facebook.react.bridge.ReactApplicationContext;
|
||||||
|
import com.facebook.react.bridge.UIManager;
|
||||||
|
import com.facebook.react.fabric.ComponentFactory;
|
||||||
|
import com.facebook.react.fabric.CoreComponentsRegistry;
|
||||||
|
import com.facebook.react.fabric.FabricJSIModuleProvider;
|
||||||
|
import com.facebook.react.fabric.ReactNativeConfig;
|
||||||
|
import com.facebook.react.uimanager.ViewManagerRegistry;
|
||||||
|
import com.awesomeproject.BuildConfig;
|
||||||
|
import com.awesomeproject.newarchitecture.components.MainComponentsRegistry;
|
||||||
|
import com.awesomeproject.newarchitecture.modules.MainApplicationTurboModuleManagerDelegate;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A {@link ReactNativeHost} that helps you load everything needed for the New Architecture, both
|
||||||
|
* TurboModule delegates and the Fabric Renderer.
|
||||||
|
*
|
||||||
|
* <p>Please note that this class is used ONLY if you opt-in for the New Architecture (see the
|
||||||
|
* `newArchEnabled` property). Is ignored otherwise.
|
||||||
|
*/
|
||||||
|
public class MainApplicationReactNativeHost extends ReactNativeHost {
|
||||||
|
public MainApplicationReactNativeHost(Application application) {
|
||||||
|
super(application);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean getUseDeveloperSupport() {
|
||||||
|
return BuildConfig.DEBUG;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected List<ReactPackage> getPackages() {
|
||||||
|
List<ReactPackage> packages = new PackageList(this).getPackages();
|
||||||
|
// Packages that cannot be autolinked yet can be added manually here, for example:
|
||||||
|
// packages.add(new MyReactNativePackage());
|
||||||
|
// TurboModules must also be loaded here providing a valid TurboReactPackage implementation:
|
||||||
|
// packages.add(new TurboReactPackage() { ... });
|
||||||
|
// If you have custom Fabric Components, their ViewManagers should also be loaded here
|
||||||
|
// inside a ReactPackage.
|
||||||
|
return packages;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getJSMainModuleName() {
|
||||||
|
return "index";
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
protected ReactPackageTurboModuleManagerDelegate.Builder
|
||||||
|
getReactPackageTurboModuleManagerDelegateBuilder() {
|
||||||
|
// Here we provide the ReactPackageTurboModuleManagerDelegate Builder. This is necessary
|
||||||
|
// for the new architecture and to use TurboModules correctly.
|
||||||
|
return new MainApplicationTurboModuleManagerDelegate.Builder();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected JSIModulePackage getJSIModulePackage() {
|
||||||
|
return new JSIModulePackage() {
|
||||||
|
@Override
|
||||||
|
public List<JSIModuleSpec> getJSIModules(
|
||||||
|
final ReactApplicationContext reactApplicationContext,
|
||||||
|
final JavaScriptContextHolder jsContext) {
|
||||||
|
final List<JSIModuleSpec> specs = new ArrayList<>();
|
||||||
|
|
||||||
|
// Here we provide a new JSIModuleSpec that will be responsible of providing the
|
||||||
|
// custom Fabric Components.
|
||||||
|
specs.add(
|
||||||
|
new JSIModuleSpec() {
|
||||||
|
@Override
|
||||||
|
public JSIModuleType getJSIModuleType() {
|
||||||
|
return JSIModuleType.UIManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSIModuleProvider<UIManager> getJSIModuleProvider() {
|
||||||
|
final ComponentFactory componentFactory = new ComponentFactory();
|
||||||
|
CoreComponentsRegistry.register(componentFactory);
|
||||||
|
|
||||||
|
// Here we register a Components Registry.
|
||||||
|
// The one that is generated with the template contains no components
|
||||||
|
// and just provides you the one from React Native core.
|
||||||
|
MainComponentsRegistry.register(componentFactory);
|
||||||
|
|
||||||
|
final ReactInstanceManager reactInstanceManager = getReactInstanceManager();
|
||||||
|
|
||||||
|
ViewManagerRegistry viewManagerRegistry =
|
||||||
|
new ViewManagerRegistry(
|
||||||
|
reactInstanceManager.getOrCreateViewManagers(reactApplicationContext));
|
||||||
|
|
||||||
|
return new FabricJSIModuleProvider(
|
||||||
|
reactApplicationContext,
|
||||||
|
componentFactory,
|
||||||
|
ReactNativeConfig.DEFAULT_CONFIG,
|
||||||
|
viewManagerRegistry);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return specs;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,36 @@
|
|||||||
|
package com.awesomeproject.newarchitecture.components;
|
||||||
|
|
||||||
|
import com.facebook.jni.HybridData;
|
||||||
|
import com.facebook.proguard.annotations.DoNotStrip;
|
||||||
|
import com.facebook.react.fabric.ComponentFactory;
|
||||||
|
import com.facebook.soloader.SoLoader;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class responsible to load the custom Fabric Components. This class has native methods and needs a
|
||||||
|
* corresponding C++ implementation/header file to work correctly (already placed inside the jni/
|
||||||
|
* folder for you).
|
||||||
|
*
|
||||||
|
* <p>Please note that this class is used ONLY if you opt-in for the New Architecture (see the
|
||||||
|
* `newArchEnabled` property). Is ignored otherwise.
|
||||||
|
*/
|
||||||
|
@DoNotStrip
|
||||||
|
public class MainComponentsRegistry {
|
||||||
|
static {
|
||||||
|
SoLoader.loadLibrary("fabricjni");
|
||||||
|
}
|
||||||
|
|
||||||
|
@DoNotStrip private final HybridData mHybridData;
|
||||||
|
|
||||||
|
@DoNotStrip
|
||||||
|
private native HybridData initHybrid(ComponentFactory componentFactory);
|
||||||
|
|
||||||
|
@DoNotStrip
|
||||||
|
private MainComponentsRegistry(ComponentFactory componentFactory) {
|
||||||
|
mHybridData = initHybrid(componentFactory);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DoNotStrip
|
||||||
|
public static MainComponentsRegistry register(ComponentFactory componentFactory) {
|
||||||
|
return new MainComponentsRegistry(componentFactory);
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,48 @@
|
|||||||
|
package com.awesomeproject.newarchitecture.modules;
|
||||||
|
|
||||||
|
import com.facebook.jni.HybridData;
|
||||||
|
import com.facebook.react.ReactPackage;
|
||||||
|
import com.facebook.react.ReactPackageTurboModuleManagerDelegate;
|
||||||
|
import com.facebook.react.bridge.ReactApplicationContext;
|
||||||
|
import com.facebook.soloader.SoLoader;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class responsible to load the TurboModules. This class has native methods and needs a
|
||||||
|
* corresponding C++ implementation/header file to work correctly (already placed inside the jni/
|
||||||
|
* folder for you).
|
||||||
|
*
|
||||||
|
* <p>Please note that this class is used ONLY if you opt-in for the New Architecture (see the
|
||||||
|
* `newArchEnabled` property). Is ignored otherwise.
|
||||||
|
*/
|
||||||
|
public class MainApplicationTurboModuleManagerDelegate
|
||||||
|
extends ReactPackageTurboModuleManagerDelegate {
|
||||||
|
|
||||||
|
private static volatile boolean sIsSoLibraryLoaded;
|
||||||
|
|
||||||
|
protected MainApplicationTurboModuleManagerDelegate(
|
||||||
|
ReactApplicationContext reactApplicationContext, List<ReactPackage> packages) {
|
||||||
|
super(reactApplicationContext, packages);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected native HybridData initHybrid();
|
||||||
|
|
||||||
|
native boolean canCreateTurboModule(String moduleName);
|
||||||
|
|
||||||
|
public static class Builder extends ReactPackageTurboModuleManagerDelegate.Builder {
|
||||||
|
protected MainApplicationTurboModuleManagerDelegate build(
|
||||||
|
ReactApplicationContext context, List<ReactPackage> packages) {
|
||||||
|
return new MainApplicationTurboModuleManagerDelegate(context, packages);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected synchronized void maybeLoadOtherSoLibraries() {
|
||||||
|
if (!sIsSoLibraryLoaded) {
|
||||||
|
// If you change the name of your application .so file in the Android.mk file,
|
||||||
|
// make sure you update the name here as well.
|
||||||
|
SoLoader.loadLibrary("awesomeproject_appmodules");
|
||||||
|
sIsSoLibraryLoaded = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -1,35 +0,0 @@
|
|||||||
package com.testhotupdate;
|
|
||||||
|
|
||||||
import com.facebook.react.ReactActivity;
|
|
||||||
import com.facebook.react.ReactActivityDelegate;
|
|
||||||
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
|
|
||||||
import com.facebook.react.defaults.DefaultReactActivityDelegate;
|
|
||||||
|
|
||||||
public class MainActivity extends ReactActivity {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the name of the main component registered from JavaScript. This is used to schedule
|
|
||||||
* rendering of the component.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
protected String getMainComponentName() {
|
|
||||||
return "testHotupdate";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the instance of the {@link ReactActivityDelegate}. Here we use a util class {@link
|
|
||||||
* DefaultReactActivityDelegate} which allows you to easily enable Fabric and Concurrent React
|
|
||||||
* (aka React 18) with two boolean flags.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
protected ReactActivityDelegate createReactActivityDelegate() {
|
|
||||||
return new DefaultReactActivityDelegate(
|
|
||||||
this,
|
|
||||||
getMainComponentName(),
|
|
||||||
// If you opted-in for the New Architecture, we enable the Fabric Renderer.
|
|
||||||
DefaultNewArchitectureEntryPoint.getFabricEnabled(), // fabricEnabled
|
|
||||||
// If you opted-in for the New Architecture, we enable Concurrent React (i.e. React 18).
|
|
||||||
DefaultNewArchitectureEntryPoint.getConcurrentReactEnabled() // concurrentRootEnabled
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,67 +0,0 @@
|
|||||||
package com.testhotupdate;
|
|
||||||
|
|
||||||
import android.app.Application;
|
|
||||||
import com.facebook.react.PackageList;
|
|
||||||
import com.facebook.react.ReactApplication;
|
|
||||||
import com.facebook.react.ReactNativeHost;
|
|
||||||
import com.facebook.react.ReactPackage;
|
|
||||||
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
|
|
||||||
import com.facebook.react.defaults.DefaultReactNativeHost;
|
|
||||||
import com.facebook.soloader.SoLoader;
|
|
||||||
import java.util.List;
|
|
||||||
import cn.reactnative.modules.update.UpdateContext;
|
|
||||||
public class MainApplication extends Application implements ReactApplication {
|
|
||||||
|
|
||||||
private final ReactNativeHost mReactNativeHost =
|
|
||||||
new DefaultReactNativeHost(this) {
|
|
||||||
@Override
|
|
||||||
protected String getJSBundleFile() {
|
|
||||||
return UpdateContext.getBundleUrl(MainApplication.this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean getUseDeveloperSupport() {
|
|
||||||
return BuildConfig.DEBUG;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected List<ReactPackage> getPackages() {
|
|
||||||
@SuppressWarnings("UnnecessaryLocalVariable")
|
|
||||||
List<ReactPackage> packages = new PackageList(this).getPackages();
|
|
||||||
// Packages that cannot be autolinked yet can be added manually here, for example:
|
|
||||||
// packages.add(new MyReactNativePackage());
|
|
||||||
return packages;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected String getJSMainModuleName() {
|
|
||||||
return "index";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected boolean isNewArchEnabled() {
|
|
||||||
return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected Boolean isHermesEnabled() {
|
|
||||||
return BuildConfig.IS_HERMES_ENABLED;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ReactNativeHost getReactNativeHost() {
|
|
||||||
return mReactNativeHost;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onCreate() {
|
|
||||||
super.onCreate();
|
|
||||||
SoLoader.init(this, /* native exopackage */ false);
|
|
||||||
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
|
|
||||||
// If you opted-in for the New Architecture, we load the native entry point for this app.
|
|
||||||
DefaultNewArchitectureEntryPoint.load();
|
|
||||||
}
|
|
||||||
ReactNativeFlipper.initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
|
|
||||||
}
|
|
||||||
}
|
|
48
Example/testHotUpdate/android/app/src/main/jni/Android.mk
Normal file
48
Example/testHotUpdate/android/app/src/main/jni/Android.mk
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
THIS_DIR := $(call my-dir)
|
||||||
|
|
||||||
|
include $(REACT_ANDROID_DIR)/Android-prebuilt.mk
|
||||||
|
|
||||||
|
# If you wish to add a custom TurboModule or Fabric component in your app you
|
||||||
|
# will have to include the following autogenerated makefile.
|
||||||
|
# include $(GENERATED_SRC_DIR)/codegen/jni/Android.mk
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
|
||||||
|
LOCAL_PATH := $(THIS_DIR)
|
||||||
|
|
||||||
|
# You can customize the name of your application .so file here.
|
||||||
|
LOCAL_MODULE := awesomeproject_appmodules
|
||||||
|
|
||||||
|
LOCAL_C_INCLUDES := $(LOCAL_PATH)
|
||||||
|
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
|
||||||
|
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
|
||||||
|
|
||||||
|
# If you wish to add a custom TurboModule or Fabric component in your app you
|
||||||
|
# will have to uncomment those lines to include the generated source
|
||||||
|
# files from the codegen (placed in $(GENERATED_SRC_DIR)/codegen/jni)
|
||||||
|
#
|
||||||
|
# LOCAL_C_INCLUDES += $(GENERATED_SRC_DIR)/codegen/jni
|
||||||
|
# LOCAL_SRC_FILES += $(wildcard $(GENERATED_SRC_DIR)/codegen/jni/*.cpp)
|
||||||
|
# LOCAL_EXPORT_C_INCLUDES += $(GENERATED_SRC_DIR)/codegen/jni
|
||||||
|
|
||||||
|
# Here you should add any native library you wish to depend on.
|
||||||
|
LOCAL_SHARED_LIBRARIES := \
|
||||||
|
libfabricjni \
|
||||||
|
libfbjni \
|
||||||
|
libfolly_runtime \
|
||||||
|
libglog \
|
||||||
|
libjsi \
|
||||||
|
libreact_codegen_rncore \
|
||||||
|
libreact_debug \
|
||||||
|
libreact_nativemodule_core \
|
||||||
|
libreact_render_componentregistry \
|
||||||
|
libreact_render_core \
|
||||||
|
libreact_render_debug \
|
||||||
|
libreact_render_graphics \
|
||||||
|
librrc_view \
|
||||||
|
libruntimeexecutor \
|
||||||
|
libturbomodulejsijni \
|
||||||
|
libyoga
|
||||||
|
|
||||||
|
LOCAL_CFLAGS := -DLOG_TAG=\"ReactNative\" -fexceptions -frtti -std=c++17 -Wall
|
||||||
|
|
||||||
|
include $(BUILD_SHARED_LIBRARY)
|
@@ -0,0 +1,24 @@
|
|||||||
|
#include "MainApplicationModuleProvider.h"
|
||||||
|
|
||||||
|
#include <rncore.h>
|
||||||
|
|
||||||
|
namespace facebook {
|
||||||
|
namespace react {
|
||||||
|
|
||||||
|
std::shared_ptr<TurboModule> MainApplicationModuleProvider(
|
||||||
|
const std::string moduleName,
|
||||||
|
const JavaTurboModule::InitParams ¶ms) {
|
||||||
|
// Here you can provide your own module provider for TurboModules coming from
|
||||||
|
// either your application or from external libraries. The approach to follow
|
||||||
|
// is similar to the following (for a library called `samplelibrary`:
|
||||||
|
//
|
||||||
|
// auto module = samplelibrary_ModuleProvider(moduleName, params);
|
||||||
|
// if (module != nullptr) {
|
||||||
|
// return module;
|
||||||
|
// }
|
||||||
|
// return rncore_ModuleProvider(moduleName, params);
|
||||||
|
return rncore_ModuleProvider(moduleName, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace react
|
||||||
|
} // namespace facebook
|
@@ -0,0 +1,16 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
#include <ReactCommon/JavaTurboModule.h>
|
||||||
|
|
||||||
|
namespace facebook {
|
||||||
|
namespace react {
|
||||||
|
|
||||||
|
std::shared_ptr<TurboModule> MainApplicationModuleProvider(
|
||||||
|
const std::string moduleName,
|
||||||
|
const JavaTurboModule::InitParams ¶ms);
|
||||||
|
|
||||||
|
} // namespace react
|
||||||
|
} // namespace facebook
|
@@ -0,0 +1,45 @@
|
|||||||
|
#include "MainApplicationTurboModuleManagerDelegate.h"
|
||||||
|
#include "MainApplicationModuleProvider.h"
|
||||||
|
|
||||||
|
namespace facebook {
|
||||||
|
namespace react {
|
||||||
|
|
||||||
|
jni::local_ref<MainApplicationTurboModuleManagerDelegate::jhybriddata>
|
||||||
|
MainApplicationTurboModuleManagerDelegate::initHybrid(
|
||||||
|
jni::alias_ref<jhybridobject>) {
|
||||||
|
return makeCxxInstance();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainApplicationTurboModuleManagerDelegate::registerNatives() {
|
||||||
|
registerHybrid({
|
||||||
|
makeNativeMethod(
|
||||||
|
"initHybrid", MainApplicationTurboModuleManagerDelegate::initHybrid),
|
||||||
|
makeNativeMethod(
|
||||||
|
"canCreateTurboModule",
|
||||||
|
MainApplicationTurboModuleManagerDelegate::canCreateTurboModule),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
std::shared_ptr<TurboModule>
|
||||||
|
MainApplicationTurboModuleManagerDelegate::getTurboModule(
|
||||||
|
const std::string name,
|
||||||
|
const std::shared_ptr<CallInvoker> jsInvoker) {
|
||||||
|
// Not implemented yet: provide pure-C++ NativeModules here.
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::shared_ptr<TurboModule>
|
||||||
|
MainApplicationTurboModuleManagerDelegate::getTurboModule(
|
||||||
|
const std::string name,
|
||||||
|
const JavaTurboModule::InitParams ¶ms) {
|
||||||
|
return MainApplicationModuleProvider(name, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool MainApplicationTurboModuleManagerDelegate::canCreateTurboModule(
|
||||||
|
std::string name) {
|
||||||
|
return getTurboModule(name, nullptr) != nullptr ||
|
||||||
|
getTurboModule(name, {.moduleName = name}) != nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace react
|
||||||
|
} // namespace facebook
|
@@ -0,0 +1,38 @@
|
|||||||
|
#include <memory>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
#include <ReactCommon/TurboModuleManagerDelegate.h>
|
||||||
|
#include <fbjni/fbjni.h>
|
||||||
|
|
||||||
|
namespace facebook {
|
||||||
|
namespace react {
|
||||||
|
|
||||||
|
class MainApplicationTurboModuleManagerDelegate
|
||||||
|
: public jni::HybridClass<
|
||||||
|
MainApplicationTurboModuleManagerDelegate,
|
||||||
|
TurboModuleManagerDelegate> {
|
||||||
|
public:
|
||||||
|
// Adapt it to the package you used for your Java class.
|
||||||
|
static constexpr auto kJavaDescriptor =
|
||||||
|
"Lcom/awesomeproject/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate;";
|
||||||
|
|
||||||
|
static jni::local_ref<jhybriddata> initHybrid(jni::alias_ref<jhybridobject>);
|
||||||
|
|
||||||
|
static void registerNatives();
|
||||||
|
|
||||||
|
std::shared_ptr<TurboModule> getTurboModule(
|
||||||
|
const std::string name,
|
||||||
|
const std::shared_ptr<CallInvoker> jsInvoker) override;
|
||||||
|
std::shared_ptr<TurboModule> getTurboModule(
|
||||||
|
const std::string name,
|
||||||
|
const JavaTurboModule::InitParams ¶ms) override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test-only method. Allows user to verify whether a TurboModule can be
|
||||||
|
* created by instances of this class.
|
||||||
|
*/
|
||||||
|
bool canCreateTurboModule(std::string name);
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace react
|
||||||
|
} // namespace facebook
|
@@ -0,0 +1,61 @@
|
|||||||
|
#include "MainComponentsRegistry.h"
|
||||||
|
|
||||||
|
#include <CoreComponentsRegistry.h>
|
||||||
|
#include <fbjni/fbjni.h>
|
||||||
|
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
|
||||||
|
#include <react/renderer/components/rncore/ComponentDescriptors.h>
|
||||||
|
|
||||||
|
namespace facebook {
|
||||||
|
namespace react {
|
||||||
|
|
||||||
|
MainComponentsRegistry::MainComponentsRegistry(ComponentFactory *delegate) {}
|
||||||
|
|
||||||
|
std::shared_ptr<ComponentDescriptorProviderRegistry const>
|
||||||
|
MainComponentsRegistry::sharedProviderRegistry() {
|
||||||
|
auto providerRegistry = CoreComponentsRegistry::sharedProviderRegistry();
|
||||||
|
|
||||||
|
// Custom Fabric Components go here. You can register custom
|
||||||
|
// components coming from your App or from 3rd party libraries here.
|
||||||
|
//
|
||||||
|
// providerRegistry->add(concreteComponentDescriptorProvider<
|
||||||
|
// AocViewerComponentDescriptor>());
|
||||||
|
return providerRegistry;
|
||||||
|
}
|
||||||
|
|
||||||
|
jni::local_ref<MainComponentsRegistry::jhybriddata>
|
||||||
|
MainComponentsRegistry::initHybrid(
|
||||||
|
jni::alias_ref<jclass>,
|
||||||
|
ComponentFactory *delegate) {
|
||||||
|
auto instance = makeCxxInstance(delegate);
|
||||||
|
|
||||||
|
auto buildRegistryFunction =
|
||||||
|
[](EventDispatcher::Weak const &eventDispatcher,
|
||||||
|
ContextContainer::Shared const &contextContainer)
|
||||||
|
-> ComponentDescriptorRegistry::Shared {
|
||||||
|
auto registry = MainComponentsRegistry::sharedProviderRegistry()
|
||||||
|
->createComponentDescriptorRegistry(
|
||||||
|
{eventDispatcher, contextContainer});
|
||||||
|
|
||||||
|
auto mutableRegistry =
|
||||||
|
std::const_pointer_cast<ComponentDescriptorRegistry>(registry);
|
||||||
|
|
||||||
|
mutableRegistry->setFallbackComponentDescriptor(
|
||||||
|
std::make_shared<UnimplementedNativeViewComponentDescriptor>(
|
||||||
|
ComponentDescriptorParameters{
|
||||||
|
eventDispatcher, contextContainer, nullptr}));
|
||||||
|
|
||||||
|
return registry;
|
||||||
|
};
|
||||||
|
|
||||||
|
delegate->buildRegistryFunction = buildRegistryFunction;
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainComponentsRegistry::registerNatives() {
|
||||||
|
registerHybrid({
|
||||||
|
makeNativeMethod("initHybrid", MainComponentsRegistry::initHybrid),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace react
|
||||||
|
} // namespace facebook
|
@@ -0,0 +1,32 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <ComponentFactory.h>
|
||||||
|
#include <fbjni/fbjni.h>
|
||||||
|
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
|
||||||
|
#include <react/renderer/componentregistry/ComponentDescriptorRegistry.h>
|
||||||
|
|
||||||
|
namespace facebook {
|
||||||
|
namespace react {
|
||||||
|
|
||||||
|
class MainComponentsRegistry
|
||||||
|
: public facebook::jni::HybridClass<MainComponentsRegistry> {
|
||||||
|
public:
|
||||||
|
// Adapt it to the package you used for your Java class.
|
||||||
|
constexpr static auto kJavaDescriptor =
|
||||||
|
"Lcom/awesomeproject/newarchitecture/components/MainComponentsRegistry;";
|
||||||
|
|
||||||
|
static void registerNatives();
|
||||||
|
|
||||||
|
MainComponentsRegistry(ComponentFactory *delegate);
|
||||||
|
|
||||||
|
private:
|
||||||
|
static std::shared_ptr<ComponentDescriptorProviderRegistry const>
|
||||||
|
sharedProviderRegistry();
|
||||||
|
|
||||||
|
static jni::local_ref<jhybriddata> initHybrid(
|
||||||
|
jni::alias_ref<jclass>,
|
||||||
|
ComponentFactory *delegate);
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace react
|
||||||
|
} // namespace facebook
|
11
Example/testHotUpdate/android/app/src/main/jni/OnLoad.cpp
Normal file
11
Example/testHotUpdate/android/app/src/main/jni/OnLoad.cpp
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
#include <fbjni/fbjni.h>
|
||||||
|
#include "MainApplicationTurboModuleManagerDelegate.h"
|
||||||
|
#include "MainComponentsRegistry.h"
|
||||||
|
|
||||||
|
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *) {
|
||||||
|
return facebook::jni::initialize(vm, [] {
|
||||||
|
facebook::react::MainApplicationTurboModuleManagerDelegate::
|
||||||
|
registerNatives();
|
||||||
|
facebook::react::MainComponentsRegistry::registerNatives();
|
||||||
|
});
|
||||||
|
}
|
@@ -1,3 +1,3 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">testHotupdate</string>
|
<string name="app_name">AwesomeProject</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<network-security-config>
|
||||||
|
<domain-config cleartextTrafficPermitted="true">
|
||||||
|
<domain includeSubdomains="true">10.0.2.2</domain>
|
||||||
|
<domain includeSubdomains="true">localhost</domain>
|
||||||
|
<domain includeSubdomains="true">cos.pgyer.com</domain>
|
||||||
|
</domain-config>
|
||||||
|
</network-security-config>
|
@@ -1,20 +0,0 @@
|
|||||||
/**
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and 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.react.ReactInstanceManager;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class responsible of loading Flipper inside your React Native application. This is the release
|
|
||||||
* flavor of it so it's empty as we don't want to load Flipper.
|
|
||||||
*/
|
|
||||||
public class ReactNativeFlipper {
|
|
||||||
public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
|
|
||||||
// Do nothing as we don't want to initialize Flipper on Release.
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,21 +1,58 @@
|
|||||||
|
import org.apache.tools.ant.taskdefs.condition.Os
|
||||||
|
|
||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
ext {
|
ext {
|
||||||
buildToolsVersion = "33.0.0"
|
buildToolsVersion = "31.0.0"
|
||||||
minSdkVersion = 21
|
minSdkVersion = 21
|
||||||
compileSdkVersion = 33
|
compileSdkVersion = 31
|
||||||
targetSdkVersion = 33
|
targetSdkVersion = 31
|
||||||
|
kotlinVersion = '1.6.10'
|
||||||
|
|
||||||
// We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
|
if (System.properties['os.arch'] == "aarch64") {
|
||||||
ndkVersion = "23.1.7779620"
|
// For M1 Users we need to use the NDK 24 which added support for aarch64
|
||||||
|
ndkVersion = "24.0.8215888"
|
||||||
|
} else {
|
||||||
|
// Otherwise we default to the side-by-side NDK version from AGP.
|
||||||
|
ndkVersion = "21.4.7075529"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath("com.android.tools.build:gradle:7.3.1")
|
classpath("com.android.tools.build:gradle:7.1.1")
|
||||||
classpath("com.facebook.react:react-native-gradle-plugin")
|
classpath("com.facebook.react:react-native-gradle-plugin")
|
||||||
|
classpath("de.undercouch:gradle-download-task:5.0.1")
|
||||||
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
|
// in the individual module build.gradle files
|
||||||
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
allprojects {
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
|
||||||
|
url("$rootDir/../node_modules/react-native/android")
|
||||||
|
}
|
||||||
|
maven {
|
||||||
|
// Android JSC is installed from npm
|
||||||
|
url("$rootDir/../node_modules/jsc-android/dist")
|
||||||
|
}
|
||||||
|
mavenCentral {
|
||||||
|
// We don't want to fetch react-native from Maven Central as there are
|
||||||
|
// older versions over there.
|
||||||
|
content {
|
||||||
|
excludeGroup "com.facebook.react"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
google()
|
||||||
|
maven {
|
||||||
|
url("$rootDir/../node_modules/detox/Detox-android")
|
||||||
|
}
|
||||||
|
maven { url 'https://www.jitpack.io' }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -38,7 +38,3 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
|
|||||||
# to write custom TurboModules/Fabric components OR use libraries that
|
# to write custom TurboModules/Fabric components OR use libraries that
|
||||||
# are providing them.
|
# are providing them.
|
||||||
newArchEnabled=false
|
newArchEnabled=false
|
||||||
|
|
||||||
# Use this property to enable or disable the Hermes JS engine.
|
|
||||||
# If set to false, you will be using JSC instead.
|
|
||||||
hermesEnabled=true
|
|
||||||
|
@@ -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-7.5.1-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
@@ -1,4 +1,11 @@
|
|||||||
rootProject.name = 'testHotupdate'
|
rootProject.name = 'AwesomeProject'
|
||||||
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
|
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
|
||||||
include ':app'
|
include ':app'
|
||||||
includeBuild('../node_modules/react-native-gradle-plugin')
|
includeBuild('../node_modules/react-native-gradle-plugin')
|
||||||
|
|
||||||
|
if (settings.hasProperty("newArchEnabled") && settings.newArchEnabled == "true") {
|
||||||
|
include(":ReactAndroid")
|
||||||
|
project(":ReactAndroid").projectDir = file('../node_modules/react-native/ReactAndroid')
|
||||||
|
include(":ReactAndroid:hermes-engine")
|
||||||
|
project(":ReactAndroid:hermes-engine").projectDir = file('../node_modules/react-native/ReactAndroid/hermes-engine')
|
||||||
|
}
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"name": "testHotupdate",
|
"name": "AwesomeProject",
|
||||||
"displayName": "testHotupdate"
|
"displayName": "AwesomeProject"
|
||||||
}
|
}
|
123
Example/testHotUpdate/e2e/NativeModule.test.ts
Normal file
123
Example/testHotUpdate/e2e/NativeModule.test.ts
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
import {by, device, element, expect, waitFor} from 'detox';
|
||||||
|
describe('测试Native模块的方法', () => {
|
||||||
|
beforeAll(async () => {
|
||||||
|
await device.launchApp();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('setLocalHashInfo', async () => {
|
||||||
|
await element(by.id('testcase')).longPress();
|
||||||
|
await element(by.id('setLocalHashInfo')).longPress();
|
||||||
|
await element(by.id('submit')).longPress();
|
||||||
|
await expect(element(by.id('done'))).toBeVisible();
|
||||||
|
await element(by.id('done')).longPress();
|
||||||
|
await expect(element(by.id('done'))).toBeNotVisible();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('getLocalHashInfo', async () => {
|
||||||
|
await element(by.id('getLocalHashInfo')).longPress();
|
||||||
|
await element(by.id('submit')).longPress();
|
||||||
|
await expect(element(by.text('done'))).toBeVisible();
|
||||||
|
await element(by.id('done')).longPress();
|
||||||
|
await expect(element(by.id('done'))).toBeNotVisible();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('setUuid', async () => {
|
||||||
|
await element(by.id('setUuid')).longPress();
|
||||||
|
await element(by.id('submit')).longPress();
|
||||||
|
await expect(element(by.text('done'))).toBeVisible();
|
||||||
|
await element(by.id('done')).longPress();
|
||||||
|
await expect(element(by.id('done'))).toBeNotVisible();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('setBlockUpdate', async () => {
|
||||||
|
await element(by.id('setBlockUpdate')).longPress();
|
||||||
|
await element(by.id('submit')).longPress();
|
||||||
|
await expect(element(by.text('done'))).toBeVisible();
|
||||||
|
await element(by.id('done')).longPress();
|
||||||
|
await expect(element(by.id('done'))).toBeNotVisible();
|
||||||
|
});
|
||||||
|
if (device.getPlatform() === 'android') {
|
||||||
|
it('reloadUpdate', async () => {
|
||||||
|
await element(by.id('reloadUpdate')).longPress();
|
||||||
|
await element(by.id('submit')).longPress();
|
||||||
|
await waitFor(element(by.text('确认')))
|
||||||
|
.toBeVisible()
|
||||||
|
.withTimeout(10000);
|
||||||
|
await element(by.id('done')).longPress();
|
||||||
|
await expect(element(by.id('done'))).toBeNotVisible();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
it('setNeedUpdate', async () => {
|
||||||
|
await element(by.id('setNeedUpdate')).longPress();
|
||||||
|
await element(by.id('submit')).longPress();
|
||||||
|
await expect(element(by.text('done'))).toBeVisible();
|
||||||
|
await element(by.id('done')).longPress();
|
||||||
|
await expect(element(by.id('done'))).toBeNotVisible();
|
||||||
|
});
|
||||||
|
|
||||||
|
if (device.getPlatform() === 'android') {
|
||||||
|
it('markSuccess', async () => {
|
||||||
|
await element(by.id('markSuccess')).longPress();
|
||||||
|
await element(by.id('submit')).longPress();
|
||||||
|
await waitFor(element(by.text('确认')))
|
||||||
|
.toBeVisible()
|
||||||
|
.withTimeout(10000);
|
||||||
|
await element(by.id('done')).longPress();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
it('downloadPatchFromPpk', async () => {
|
||||||
|
await element(by.id('downloadPatchFromPpk')).longPress();
|
||||||
|
await element(by.id('submit')).longPress();
|
||||||
|
if (device.getPlatform() === 'ios') {
|
||||||
|
await expect(element(by.text('failed to open zip file'))).toBeVisible();
|
||||||
|
} else {
|
||||||
|
await waitFor(element(by.text('确认')))
|
||||||
|
.toBeVisible()
|
||||||
|
.withTimeout(10000);
|
||||||
|
}
|
||||||
|
await element(by.id('done')).longPress();
|
||||||
|
await expect(element(by.id('done'))).toBeNotVisible();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('downloadPatchFromPackage', async () => {
|
||||||
|
await element(by.id('downloadPatchFromPackage')).longPress();
|
||||||
|
await element(by.id('submit')).longPress();
|
||||||
|
if (device.getPlatform() === 'ios') {
|
||||||
|
await expect(element(by.text('failed to open zip file'))).toBeVisible();
|
||||||
|
} else {
|
||||||
|
await waitFor(element(by.text('确认')))
|
||||||
|
.toBeVisible()
|
||||||
|
.withTimeout(10000);
|
||||||
|
}
|
||||||
|
await element(by.id('done')).longPress();
|
||||||
|
await expect(element(by.id('done'))).toBeNotVisible();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('downloadFullUpdate', async () => {
|
||||||
|
await element(by.id('downloadFullUpdate')).longPress();
|
||||||
|
await element(by.id('submit')).longPress();
|
||||||
|
if (device.getPlatform() === 'ios') {
|
||||||
|
await expect(element(by.text('failed to open zip file'))).toBeVisible();
|
||||||
|
} else {
|
||||||
|
await waitFor(element(by.text('确认')))
|
||||||
|
.toBeVisible()
|
||||||
|
.withTimeout(10000);
|
||||||
|
}
|
||||||
|
await element(by.id('done')).longPress();
|
||||||
|
await expect(element(by.id('done'))).toBeNotVisible();
|
||||||
|
});
|
||||||
|
|
||||||
|
if (device.getPlatform() === 'android') {
|
||||||
|
it('downloadAndInstallApk', async () => {
|
||||||
|
await element(by.id('downloadAndInstallApk')).longPress();
|
||||||
|
await element(by.id('submit')).longPress();
|
||||||
|
await waitFor(element(by.text('确认')))
|
||||||
|
.toBeVisible()
|
||||||
|
.withTimeout(10000);
|
||||||
|
await element(by.id('done')).longPress();
|
||||||
|
await expect(element(by.id('done'))).toBeNotVisible();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
15
Example/testHotUpdate/e2e/jest.config.js
Normal file
15
Example/testHotUpdate/e2e/jest.config.js
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
/** @type {import('@jest/types').Config.InitialOptions} */
|
||||||
|
module.exports = {
|
||||||
|
rootDir: '..',
|
||||||
|
testMatch: ['<rootDir>/e2e/**/*.test.ts'],
|
||||||
|
testTimeout: 240000,
|
||||||
|
maxWorkers: 2,
|
||||||
|
transform: {
|
||||||
|
'\\.tsx?$': 'ts-jest',
|
||||||
|
},
|
||||||
|
globalSetup: 'detox/runners/jest/globalSetup',
|
||||||
|
globalTeardown: 'detox/runners/jest/globalTeardown',
|
||||||
|
reporters: ['detox/runners/jest/reporter'],
|
||||||
|
testEnvironment: 'detox/runners/jest/testEnvironment',
|
||||||
|
verbose: true,
|
||||||
|
};
|
@@ -2,9 +2,10 @@
|
|||||||
# used when running script phases inside Xcode.
|
# used when running script phases inside Xcode.
|
||||||
# To customize your local environment, you can create an `.xcode.env.local`
|
# To customize your local environment, you can create an `.xcode.env.local`
|
||||||
# file that is not versioned.
|
# file that is not versioned.
|
||||||
|
|
||||||
# NODE_BINARY variable contains the PATH to the node executable.
|
# NODE_BINARY variable contains the PATH to the node executable.
|
||||||
#
|
#
|
||||||
# Customize the NODE_BINARY variable here.
|
# Customize the NODE_BINARY variable here.
|
||||||
# For example, to use nvm with brew, add the following line
|
# For example, to use nvm with brew, add the following line
|
||||||
# . "$(brew --prefix nvm)/nvm.sh" --no-use
|
# . "$(brew --prefix nvm)/nvm.sh" --no-use
|
||||||
export NODE_BINARY=$(command -v node)
|
export NODE_BINARY=$(command -v node)
|
||||||
|
@@ -7,13 +7,13 @@
|
|||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
00E356F31AD99517003FC87E /* testHotupdateTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* testHotupdateTests.m */; };
|
00E356F31AD99517003FC87E /* AwesomeProjectTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* AwesomeProjectTests.m */; };
|
||||||
0C80B921A6F3F58F76C31292 /* libPods-testHotupdate.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-testHotupdate.a */; };
|
0C80B921A6F3F58F76C31292 /* libPods-AwesomeProject.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-AwesomeProject.a */; };
|
||||||
13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; };
|
13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; };
|
||||||
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 */; };
|
||||||
|
7699B88040F8A987B510C191 /* libPods-AwesomeProject-AwesomeProjectTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 19F6CBCC0A4E27FBF8BF4A61 /* libPods-AwesomeProject-AwesomeProjectTests.a */; };
|
||||||
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
|
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
|
||||||
983131D2EBAB94EBB6700C34 /* libPods-testHotupdate-testHotupdateTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 59B080016B9F7992256D7BCD /* libPods-testHotupdate-testHotupdateTests.a */; };
|
|
||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
/* Begin PBXContainerItemProxy section */
|
/* Begin PBXContainerItemProxy section */
|
||||||
@@ -22,27 +22,27 @@
|
|||||||
containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
|
containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
|
||||||
proxyType = 1;
|
proxyType = 1;
|
||||||
remoteGlobalIDString = 13B07F861A680F5B00A75B9A;
|
remoteGlobalIDString = 13B07F861A680F5B00A75B9A;
|
||||||
remoteInfo = testHotupdate;
|
remoteInfo = AwesomeProject;
|
||||||
};
|
};
|
||||||
/* End PBXContainerItemProxy section */
|
/* End PBXContainerItemProxy section */
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
00E356EE1AD99517003FC87E /* testHotupdateTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = testHotupdateTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
00E356EE1AD99517003FC87E /* AwesomeProjectTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AwesomeProjectTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
00E356F21AD99517003FC87E /* testHotupdateTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = testHotupdateTests.m; sourceTree = "<group>"; };
|
00E356F21AD99517003FC87E /* AwesomeProjectTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AwesomeProjectTests.m; sourceTree = "<group>"; };
|
||||||
13B07F961A680F5B00A75B9A /* testHotupdate.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testHotupdate.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
13B07F961A680F5B00A75B9A /* AwesomeProject.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AwesomeProject.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = testHotupdate/AppDelegate.h; sourceTree = "<group>"; };
|
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = AwesomeProject/AppDelegate.h; sourceTree = "<group>"; };
|
||||||
13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = testHotupdate/AppDelegate.mm; sourceTree = "<group>"; };
|
13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = AwesomeProject/AppDelegate.mm; sourceTree = "<group>"; };
|
||||||
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = testHotupdate/Images.xcassets; sourceTree = "<group>"; };
|
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = AwesomeProject/Images.xcassets; sourceTree = "<group>"; };
|
||||||
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = testHotupdate/Info.plist; sourceTree = "<group>"; };
|
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = AwesomeProject/Info.plist; sourceTree = "<group>"; };
|
||||||
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = testHotupdate/main.m; sourceTree = "<group>"; };
|
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = AwesomeProject/main.m; sourceTree = "<group>"; };
|
||||||
35A33350B5D9A46B028EB31B /* Pods-testHotupdate-testHotupdateTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-testHotupdate-testHotupdateTests.release.xcconfig"; path = "Target Support Files/Pods-testHotupdate-testHotupdateTests/Pods-testHotupdate-testHotupdateTests.release.xcconfig"; sourceTree = "<group>"; };
|
19F6CBCC0A4E27FBF8BF4A61 /* libPods-AwesomeProject-AwesomeProjectTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-AwesomeProject-AwesomeProjectTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
3B4392A12AC88292D35C810B /* Pods-testHotupdate.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-testHotupdate.debug.xcconfig"; path = "Target Support Files/Pods-testHotupdate/Pods-testHotupdate.debug.xcconfig"; sourceTree = "<group>"; };
|
3B4392A12AC88292D35C810B /* Pods-AwesomeProject.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AwesomeProject.debug.xcconfig"; path = "Target Support Files/Pods-AwesomeProject/Pods-AwesomeProject.debug.xcconfig"; sourceTree = "<group>"; };
|
||||||
404B8A109FF0E52B839C8687 /* Pods-testHotupdate-testHotupdateTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-testHotupdate-testHotupdateTests.debug.xcconfig"; path = "Target Support Files/Pods-testHotupdate-testHotupdateTests/Pods-testHotupdate-testHotupdateTests.debug.xcconfig"; sourceTree = "<group>"; };
|
5709B34CF0A7D63546082F79 /* Pods-AwesomeProject.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AwesomeProject.release.xcconfig"; path = "Target Support Files/Pods-AwesomeProject/Pods-AwesomeProject.release.xcconfig"; sourceTree = "<group>"; };
|
||||||
5709B34CF0A7D63546082F79 /* Pods-testHotupdate.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-testHotupdate.release.xcconfig"; path = "Target Support Files/Pods-testHotupdate/Pods-testHotupdate.release.xcconfig"; sourceTree = "<group>"; };
|
5B7EB9410499542E8C5724F5 /* Pods-AwesomeProject-AwesomeProjectTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AwesomeProject-AwesomeProjectTests.debug.xcconfig"; path = "Target Support Files/Pods-AwesomeProject-AwesomeProjectTests/Pods-AwesomeProject-AwesomeProjectTests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||||
59B080016B9F7992256D7BCD /* libPods-testHotupdate-testHotupdateTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-testHotupdate-testHotupdateTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
5DCACB8F33CDC322A6C60F78 /* libPods-AwesomeProject.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-AwesomeProject.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
5DCACB8F33CDC322A6C60F78 /* libPods-testHotupdate.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-testHotupdate.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = AwesomeProject/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||||
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = testHotupdate/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
89C6BE57DB24E9ADA2F236DE /* Pods-AwesomeProject-AwesomeProjectTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AwesomeProject-AwesomeProjectTests.release.xcconfig"; path = "Target Support Files/Pods-AwesomeProject-AwesomeProjectTests/Pods-AwesomeProject-AwesomeProjectTests.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; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
isa = PBXFrameworksBuildPhase;
|
isa = PBXFrameworksBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
983131D2EBAB94EBB6700C34 /* libPods-testHotupdate-testHotupdateTests.a in Frameworks */,
|
7699B88040F8A987B510C191 /* libPods-AwesomeProject-AwesomeProjectTests.a in Frameworks */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
@@ -59,20 +59,20 @@
|
|||||||
isa = PBXFrameworksBuildPhase;
|
isa = PBXFrameworksBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
0C80B921A6F3F58F76C31292 /* libPods-testHotupdate.a in Frameworks */,
|
0C80B921A6F3F58F76C31292 /* libPods-AwesomeProject.a in Frameworks */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
/* End PBXFrameworksBuildPhase section */
|
/* End PBXFrameworksBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXGroup section */
|
/* Begin PBXGroup section */
|
||||||
00E356EF1AD99517003FC87E /* testHotupdateTests */ = {
|
00E356EF1AD99517003FC87E /* AwesomeProjectTests */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
00E356F21AD99517003FC87E /* testHotupdateTests.m */,
|
00E356F21AD99517003FC87E /* AwesomeProjectTests.m */,
|
||||||
00E356F01AD99517003FC87E /* Supporting Files */,
|
00E356F01AD99517003FC87E /* Supporting Files */,
|
||||||
);
|
);
|
||||||
path = testHotupdateTests;
|
path = AwesomeProjectTests;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
00E356F01AD99517003FC87E /* Supporting Files */ = {
|
00E356F01AD99517003FC87E /* Supporting Files */ = {
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
name = "Supporting Files";
|
name = "Supporting Files";
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
13B07FAE1A68108700A75B9A /* testHotupdate */ = {
|
13B07FAE1A68108700A75B9A /* AwesomeProject */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
13B07FAF1A68108700A75B9A /* AppDelegate.h */,
|
13B07FAF1A68108700A75B9A /* AppDelegate.h */,
|
||||||
@@ -93,15 +93,15 @@
|
|||||||
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */,
|
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */,
|
||||||
13B07FB71A68108700A75B9A /* main.m */,
|
13B07FB71A68108700A75B9A /* main.m */,
|
||||||
);
|
);
|
||||||
name = testHotupdate;
|
name = AwesomeProject;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
|
2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
|
ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
|
||||||
5DCACB8F33CDC322A6C60F78 /* libPods-testHotupdate.a */,
|
5DCACB8F33CDC322A6C60F78 /* libPods-AwesomeProject.a */,
|
||||||
59B080016B9F7992256D7BCD /* libPods-testHotupdate-testHotupdateTests.a */,
|
19F6CBCC0A4E27FBF8BF4A61 /* libPods-AwesomeProject-AwesomeProjectTests.a */,
|
||||||
);
|
);
|
||||||
name = Frameworks;
|
name = Frameworks;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -116,9 +116,9 @@
|
|||||||
83CBB9F61A601CBA00E9B192 = {
|
83CBB9F61A601CBA00E9B192 = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
13B07FAE1A68108700A75B9A /* testHotupdate */,
|
13B07FAE1A68108700A75B9A /* AwesomeProject */,
|
||||||
832341AE1AAA6A7D00B99B32 /* Libraries */,
|
832341AE1AAA6A7D00B99B32 /* Libraries */,
|
||||||
00E356EF1AD99517003FC87E /* testHotupdateTests */,
|
00E356EF1AD99517003FC87E /* AwesomeProjectTests */,
|
||||||
83CBBA001A601CBA00E9B192 /* Products */,
|
83CBBA001A601CBA00E9B192 /* Products */,
|
||||||
2D16E6871FA4F8E400B85C8A /* Frameworks */,
|
2D16E6871FA4F8E400B85C8A /* Frameworks */,
|
||||||
BBD78D7AC51CEA395F1C20DB /* Pods */,
|
BBD78D7AC51CEA395F1C20DB /* Pods */,
|
||||||
@@ -131,8 +131,8 @@
|
|||||||
83CBBA001A601CBA00E9B192 /* Products */ = {
|
83CBBA001A601CBA00E9B192 /* Products */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
13B07F961A680F5B00A75B9A /* testHotupdate.app */,
|
13B07F961A680F5B00A75B9A /* AwesomeProject.app */,
|
||||||
00E356EE1AD99517003FC87E /* testHotupdateTests.xctest */,
|
00E356EE1AD99517003FC87E /* AwesomeProjectTests.xctest */,
|
||||||
);
|
);
|
||||||
name = Products;
|
name = Products;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -140,10 +140,10 @@
|
|||||||
BBD78D7AC51CEA395F1C20DB /* Pods */ = {
|
BBD78D7AC51CEA395F1C20DB /* Pods */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
3B4392A12AC88292D35C810B /* Pods-testHotupdate.debug.xcconfig */,
|
3B4392A12AC88292D35C810B /* Pods-AwesomeProject.debug.xcconfig */,
|
||||||
5709B34CF0A7D63546082F79 /* Pods-testHotupdate.release.xcconfig */,
|
5709B34CF0A7D63546082F79 /* Pods-AwesomeProject.release.xcconfig */,
|
||||||
404B8A109FF0E52B839C8687 /* Pods-testHotupdate-testHotupdateTests.debug.xcconfig */,
|
5B7EB9410499542E8C5724F5 /* Pods-AwesomeProject-AwesomeProjectTests.debug.xcconfig */,
|
||||||
35A33350B5D9A46B028EB31B /* Pods-testHotupdate-testHotupdateTests.release.xcconfig */,
|
89C6BE57DB24E9ADA2F236DE /* Pods-AwesomeProject-AwesomeProjectTests.release.xcconfig */,
|
||||||
);
|
);
|
||||||
path = Pods;
|
path = Pods;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -151,30 +151,30 @@
|
|||||||
/* End PBXGroup section */
|
/* End PBXGroup section */
|
||||||
|
|
||||||
/* Begin PBXNativeTarget section */
|
/* Begin PBXNativeTarget section */
|
||||||
00E356ED1AD99517003FC87E /* testHotupdateTests */ = {
|
00E356ED1AD99517003FC87E /* AwesomeProjectTests */ = {
|
||||||
isa = PBXNativeTarget;
|
isa = PBXNativeTarget;
|
||||||
buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "testHotupdateTests" */;
|
buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "AwesomeProjectTests" */;
|
||||||
buildPhases = (
|
buildPhases = (
|
||||||
DC20F2927A7E6CA06E8D485C /* [CP] Check Pods Manifest.lock */,
|
A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */,
|
||||||
00E356EA1AD99517003FC87E /* Sources */,
|
00E356EA1AD99517003FC87E /* Sources */,
|
||||||
00E356EB1AD99517003FC87E /* Frameworks */,
|
00E356EB1AD99517003FC87E /* Frameworks */,
|
||||||
00E356EC1AD99517003FC87E /* Resources */,
|
00E356EC1AD99517003FC87E /* Resources */,
|
||||||
4C7F70F5C06F7BFA31EE8610 /* [CP] Embed Pods Frameworks */,
|
C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */,
|
||||||
BC2CDA870086B299A0FA004A /* [CP] Copy Pods Resources */,
|
F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */,
|
||||||
);
|
);
|
||||||
buildRules = (
|
buildRules = (
|
||||||
);
|
);
|
||||||
dependencies = (
|
dependencies = (
|
||||||
00E356F51AD99517003FC87E /* PBXTargetDependency */,
|
00E356F51AD99517003FC87E /* PBXTargetDependency */,
|
||||||
);
|
);
|
||||||
name = testHotupdateTests;
|
name = AwesomeProjectTests;
|
||||||
productName = testHotupdateTests;
|
productName = AwesomeProjectTests;
|
||||||
productReference = 00E356EE1AD99517003FC87E /* testHotupdateTests.xctest */;
|
productReference = 00E356EE1AD99517003FC87E /* AwesomeProjectTests.xctest */;
|
||||||
productType = "com.apple.product-type.bundle.unit-test";
|
productType = "com.apple.product-type.bundle.unit-test";
|
||||||
};
|
};
|
||||||
13B07F861A680F5B00A75B9A /* testHotupdate */ = {
|
13B07F861A680F5B00A75B9A /* AwesomeProject */ = {
|
||||||
isa = PBXNativeTarget;
|
isa = PBXNativeTarget;
|
||||||
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "testHotupdate" */;
|
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "AwesomeProject" */;
|
||||||
buildPhases = (
|
buildPhases = (
|
||||||
C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */,
|
C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */,
|
||||||
FD10A7F022414F080027D42C /* Start Packager */,
|
FD10A7F022414F080027D42C /* Start Packager */,
|
||||||
@@ -189,9 +189,9 @@
|
|||||||
);
|
);
|
||||||
dependencies = (
|
dependencies = (
|
||||||
);
|
);
|
||||||
name = testHotupdate;
|
name = AwesomeProject;
|
||||||
productName = testHotupdate;
|
productName = AwesomeProject;
|
||||||
productReference = 13B07F961A680F5B00A75B9A /* testHotupdate.app */;
|
productReference = 13B07F961A680F5B00A75B9A /* AwesomeProject.app */;
|
||||||
productType = "com.apple.product-type.application";
|
productType = "com.apple.product-type.application";
|
||||||
};
|
};
|
||||||
/* End PBXNativeTarget section */
|
/* End PBXNativeTarget section */
|
||||||
@@ -211,7 +211,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "testHotupdate" */;
|
buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "AwesomeProject" */;
|
||||||
compatibilityVersion = "Xcode 12.0";
|
compatibilityVersion = "Xcode 12.0";
|
||||||
developmentRegion = en;
|
developmentRegion = en;
|
||||||
hasScannedForEncodings = 0;
|
hasScannedForEncodings = 0;
|
||||||
@@ -224,8 +224,8 @@
|
|||||||
projectDirPath = "";
|
projectDirPath = "";
|
||||||
projectRoot = "";
|
projectRoot = "";
|
||||||
targets = (
|
targets = (
|
||||||
13B07F861A680F5B00A75B9A /* testHotupdate */,
|
13B07F861A680F5B00A75B9A /* AwesomeProject */,
|
||||||
00E356ED1AD99517003FC87E /* testHotupdateTests */,
|
00E356ED1AD99517003FC87E /* AwesomeProjectTests */,
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
/* End PBXProject section */
|
/* End PBXProject section */
|
||||||
@@ -256,13 +256,15 @@
|
|||||||
files = (
|
files = (
|
||||||
);
|
);
|
||||||
inputPaths = (
|
inputPaths = (
|
||||||
|
"$(SRCROOT)/.xcode.env.local",
|
||||||
|
"$(SRCROOT)/.xcode.env",
|
||||||
);
|
);
|
||||||
name = "Bundle React Native code and images";
|
name = "Bundle React Native code and images";
|
||||||
outputPaths = (
|
outputPaths = (
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "set -e\n\nexport NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh\n";
|
shellScript = "set -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n";
|
||||||
};
|
};
|
||||||
00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = {
|
00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
@@ -270,49 +272,37 @@
|
|||||||
files = (
|
files = (
|
||||||
);
|
);
|
||||||
inputFileListPaths = (
|
inputFileListPaths = (
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-testHotupdate/Pods-testHotupdate-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
"${PODS_ROOT}/Target Support Files/Pods-AwesomeProject/Pods-AwesomeProject-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
||||||
);
|
);
|
||||||
name = "[CP] Embed Pods Frameworks";
|
name = "[CP] Embed Pods Frameworks";
|
||||||
outputFileListPaths = (
|
outputFileListPaths = (
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-testHotupdate/Pods-testHotupdate-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
"${PODS_ROOT}/Target Support Files/Pods-AwesomeProject/Pods-AwesomeProject-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-testHotupdate/Pods-testHotupdate-frameworks.sh\"\n";
|
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-AwesomeProject/Pods-AwesomeProject-frameworks.sh\"\n";
|
||||||
showEnvVarsInLog = 0;
|
showEnvVarsInLog = 0;
|
||||||
};
|
};
|
||||||
4C7F70F5C06F7BFA31EE8610 /* [CP] Embed Pods Frameworks */ = {
|
A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
);
|
);
|
||||||
inputFileListPaths = (
|
inputFileListPaths = (
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-testHotupdate-testHotupdateTests/Pods-testHotupdate-testHotupdateTests-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
|
||||||
);
|
);
|
||||||
name = "[CP] Embed Pods Frameworks";
|
inputPaths = (
|
||||||
|
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||||
|
"${PODS_ROOT}/Manifest.lock",
|
||||||
|
);
|
||||||
|
name = "[CP] Check Pods Manifest.lock";
|
||||||
outputFileListPaths = (
|
outputFileListPaths = (
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-testHotupdate-testHotupdateTests/Pods-testHotupdate-testHotupdateTests-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
);
|
||||||
|
outputPaths = (
|
||||||
|
"$(DERIVED_FILE_DIR)/Pods-AwesomeProject-AwesomeProjectTests-checkManifestLockResult.txt",
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-testHotupdate-testHotupdateTests/Pods-testHotupdate-testHotupdateTests-frameworks.sh\"\n";
|
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||||
showEnvVarsInLog = 0;
|
|
||||||
};
|
|
||||||
BC2CDA870086B299A0FA004A /* [CP] Copy Pods Resources */ = {
|
|
||||||
isa = PBXShellScriptBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
);
|
|
||||||
inputFileListPaths = (
|
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-testHotupdate-testHotupdateTests/Pods-testHotupdate-testHotupdateTests-resources-${CONFIGURATION}-input-files.xcfilelist",
|
|
||||||
);
|
|
||||||
name = "[CP] Copy Pods Resources";
|
|
||||||
outputFileListPaths = (
|
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-testHotupdate-testHotupdateTests/Pods-testHotupdate-testHotupdateTests-resources-${CONFIGURATION}-output-files.xcfilelist",
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
shellPath = /bin/sh;
|
|
||||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-testHotupdate-testHotupdateTests/Pods-testHotupdate-testHotupdateTests-resources.sh\"\n";
|
|
||||||
showEnvVarsInLog = 0;
|
showEnvVarsInLog = 0;
|
||||||
};
|
};
|
||||||
C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = {
|
C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = {
|
||||||
@@ -330,33 +320,28 @@
|
|||||||
outputFileListPaths = (
|
outputFileListPaths = (
|
||||||
);
|
);
|
||||||
outputPaths = (
|
outputPaths = (
|
||||||
"$(DERIVED_FILE_DIR)/Pods-testHotupdate-checkManifestLockResult.txt",
|
"$(DERIVED_FILE_DIR)/Pods-AwesomeProject-checkManifestLockResult.txt",
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||||
showEnvVarsInLog = 0;
|
showEnvVarsInLog = 0;
|
||||||
};
|
};
|
||||||
DC20F2927A7E6CA06E8D485C /* [CP] Check Pods Manifest.lock */ = {
|
C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
);
|
);
|
||||||
inputFileListPaths = (
|
inputFileListPaths = (
|
||||||
|
"${PODS_ROOT}/Target Support Files/Pods-AwesomeProject-AwesomeProjectTests/Pods-AwesomeProject-AwesomeProjectTests-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
||||||
);
|
);
|
||||||
inputPaths = (
|
name = "[CP] Embed Pods Frameworks";
|
||||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
|
||||||
"${PODS_ROOT}/Manifest.lock",
|
|
||||||
);
|
|
||||||
name = "[CP] Check Pods Manifest.lock";
|
|
||||||
outputFileListPaths = (
|
outputFileListPaths = (
|
||||||
);
|
"${PODS_ROOT}/Target Support Files/Pods-AwesomeProject-AwesomeProjectTests/Pods-AwesomeProject-AwesomeProjectTests-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
||||||
outputPaths = (
|
|
||||||
"$(DERIVED_FILE_DIR)/Pods-testHotupdate-testHotupdateTests-checkManifestLockResult.txt",
|
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-AwesomeProject-AwesomeProjectTests/Pods-AwesomeProject-AwesomeProjectTests-frameworks.sh\"\n";
|
||||||
showEnvVarsInLog = 0;
|
showEnvVarsInLog = 0;
|
||||||
};
|
};
|
||||||
E235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = {
|
E235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = {
|
||||||
@@ -365,15 +350,32 @@
|
|||||||
files = (
|
files = (
|
||||||
);
|
);
|
||||||
inputFileListPaths = (
|
inputFileListPaths = (
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-testHotupdate/Pods-testHotupdate-resources-${CONFIGURATION}-input-files.xcfilelist",
|
"${PODS_ROOT}/Target Support Files/Pods-AwesomeProject/Pods-AwesomeProject-resources-${CONFIGURATION}-input-files.xcfilelist",
|
||||||
);
|
);
|
||||||
name = "[CP] Copy Pods Resources";
|
name = "[CP] Copy Pods Resources";
|
||||||
outputFileListPaths = (
|
outputFileListPaths = (
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-testHotupdate/Pods-testHotupdate-resources-${CONFIGURATION}-output-files.xcfilelist",
|
"${PODS_ROOT}/Target Support Files/Pods-AwesomeProject/Pods-AwesomeProject-resources-${CONFIGURATION}-output-files.xcfilelist",
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-testHotupdate/Pods-testHotupdate-resources.sh\"\n";
|
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-AwesomeProject/Pods-AwesomeProject-resources.sh\"\n";
|
||||||
|
showEnvVarsInLog = 0;
|
||||||
|
};
|
||||||
|
F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputFileListPaths = (
|
||||||
|
"${PODS_ROOT}/Target Support Files/Pods-AwesomeProject-AwesomeProjectTests/Pods-AwesomeProject-AwesomeProjectTests-resources-${CONFIGURATION}-input-files.xcfilelist",
|
||||||
|
);
|
||||||
|
name = "[CP] Copy Pods Resources";
|
||||||
|
outputFileListPaths = (
|
||||||
|
"${PODS_ROOT}/Target Support Files/Pods-AwesomeProject-AwesomeProjectTests/Pods-AwesomeProject-AwesomeProjectTests-resources-${CONFIGURATION}-output-files.xcfilelist",
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-AwesomeProject-AwesomeProjectTests/Pods-AwesomeProject-AwesomeProjectTests-resources.sh\"\n";
|
||||||
showEnvVarsInLog = 0;
|
showEnvVarsInLog = 0;
|
||||||
};
|
};
|
||||||
FD10A7F022414F080027D42C /* Start Packager */ = {
|
FD10A7F022414F080027D42C /* Start Packager */ = {
|
||||||
@@ -402,7 +404,7 @@
|
|||||||
isa = PBXSourcesBuildPhase;
|
isa = PBXSourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
00E356F31AD99517003FC87E /* testHotupdateTests.m in Sources */,
|
00E356F31AD99517003FC87E /* AwesomeProjectTests.m in Sources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
@@ -420,7 +422,7 @@
|
|||||||
/* Begin PBXTargetDependency section */
|
/* Begin PBXTargetDependency section */
|
||||||
00E356F51AD99517003FC87E /* PBXTargetDependency */ = {
|
00E356F51AD99517003FC87E /* PBXTargetDependency */ = {
|
||||||
isa = PBXTargetDependency;
|
isa = PBXTargetDependency;
|
||||||
target = 13B07F861A680F5B00A75B9A /* testHotupdate */;
|
target = 13B07F861A680F5B00A75B9A /* AwesomeProject */;
|
||||||
targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */;
|
targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */;
|
||||||
};
|
};
|
||||||
/* End PBXTargetDependency section */
|
/* End PBXTargetDependency section */
|
||||||
@@ -428,15 +430,15 @@
|
|||||||
/* Begin XCBuildConfiguration section */
|
/* Begin XCBuildConfiguration section */
|
||||||
00E356F61AD99517003FC87E /* Debug */ = {
|
00E356F61AD99517003FC87E /* Debug */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = 404B8A109FF0E52B839C8687 /* Pods-testHotupdate-testHotupdateTests.debug.xcconfig */;
|
baseConfigurationReference = 5B7EB9410499542E8C5724F5 /* Pods-AwesomeProject-AwesomeProjectTests.debug.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||||
"DEBUG=1",
|
"DEBUG=1",
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
);
|
);
|
||||||
INFOPLIST_FILE = testHotupdateTests/Info.plist;
|
INFOPLIST_FILE = AwesomeProjectTests/Info.plist;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
@@ -449,18 +451,18 @@
|
|||||||
);
|
);
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
|
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/testHotupdate.app/testHotupdate";
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AwesomeProject.app/AwesomeProject";
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
};
|
};
|
||||||
00E356F71AD99517003FC87E /* Release */ = {
|
00E356F71AD99517003FC87E /* Release */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = 35A33350B5D9A46B028EB31B /* Pods-testHotupdate-testHotupdateTests.release.xcconfig */;
|
baseConfigurationReference = 89C6BE57DB24E9ADA2F236DE /* Pods-AwesomeProject-AwesomeProjectTests.release.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
COPY_PHASE_STRIP = NO;
|
COPY_PHASE_STRIP = NO;
|
||||||
INFOPLIST_FILE = testHotupdateTests/Info.plist;
|
INFOPLIST_FILE = AwesomeProjectTests/Info.plist;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
@@ -473,19 +475,19 @@
|
|||||||
);
|
);
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
|
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/testHotupdate.app/testHotupdate";
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AwesomeProject.app/AwesomeProject";
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
};
|
};
|
||||||
13B07F941A680F5B00A75B9A /* Debug */ = {
|
13B07F941A680F5B00A75B9A /* Debug */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = 3B4392A12AC88292D35C810B /* Pods-testHotupdate.debug.xcconfig */;
|
baseConfigurationReference = 3B4392A12AC88292D35C810B /* Pods-AwesomeProject.debug.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = testHotupdate/Info.plist;
|
INFOPLIST_FILE = AwesomeProject/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
@@ -496,7 +498,7 @@
|
|||||||
"-lc++",
|
"-lc++",
|
||||||
);
|
);
|
||||||
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 = AwesomeProject;
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
@@ -505,12 +507,12 @@
|
|||||||
};
|
};
|
||||||
13B07F951A680F5B00A75B9A /* Release */ = {
|
13B07F951A680F5B00A75B9A /* Release */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = 5709B34CF0A7D63546082F79 /* Pods-testHotupdate.release.xcconfig */;
|
baseConfigurationReference = 5709B34CF0A7D63546082F79 /* Pods-AwesomeProject.release.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
INFOPLIST_FILE = testHotupdate/Info.plist;
|
INFOPLIST_FILE = AwesomeProject/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
@@ -521,7 +523,7 @@
|
|||||||
"-lc++",
|
"-lc++",
|
||||||
);
|
);
|
||||||
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 = AwesomeProject;
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
};
|
};
|
||||||
@@ -560,7 +562,7 @@
|
|||||||
COPY_PHASE_STRIP = NO;
|
COPY_PHASE_STRIP = NO;
|
||||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
ENABLE_TESTABILITY = YES;
|
ENABLE_TESTABILITY = YES;
|
||||||
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
|
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||||
GCC_DYNAMIC_NO_PIC = NO;
|
GCC_DYNAMIC_NO_PIC = NO;
|
||||||
GCC_NO_COMMON_BLOCKS = YES;
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
@@ -576,7 +578,7 @@
|
|||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
/usr/lib/swift,
|
/usr/lib/swift,
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
@@ -632,7 +634,7 @@
|
|||||||
COPY_PHASE_STRIP = YES;
|
COPY_PHASE_STRIP = YES;
|
||||||
ENABLE_NS_ASSERTIONS = NO;
|
ENABLE_NS_ASSERTIONS = NO;
|
||||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
|
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||||
GCC_NO_COMMON_BLOCKS = YES;
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
@@ -641,7 +643,7 @@
|
|||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
/usr/lib/swift,
|
/usr/lib/swift,
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
@@ -667,7 +669,7 @@
|
|||||||
/* End XCBuildConfiguration section */
|
/* End XCBuildConfiguration section */
|
||||||
|
|
||||||
/* Begin XCConfigurationList section */
|
/* Begin XCConfigurationList section */
|
||||||
00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "testHotupdateTests" */ = {
|
00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "AwesomeProjectTests" */ = {
|
||||||
isa = XCConfigurationList;
|
isa = XCConfigurationList;
|
||||||
buildConfigurations = (
|
buildConfigurations = (
|
||||||
00E356F61AD99517003FC87E /* Debug */,
|
00E356F61AD99517003FC87E /* Debug */,
|
||||||
@@ -676,7 +678,7 @@
|
|||||||
defaultConfigurationIsVisible = 0;
|
defaultConfigurationIsVisible = 0;
|
||||||
defaultConfigurationName = Release;
|
defaultConfigurationName = Release;
|
||||||
};
|
};
|
||||||
13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "testHotupdate" */ = {
|
13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "AwesomeProject" */ = {
|
||||||
isa = XCConfigurationList;
|
isa = XCConfigurationList;
|
||||||
buildConfigurations = (
|
buildConfigurations = (
|
||||||
13B07F941A680F5B00A75B9A /* Debug */,
|
13B07F941A680F5B00A75B9A /* Debug */,
|
||||||
@@ -685,7 +687,7 @@
|
|||||||
defaultConfigurationIsVisible = 0;
|
defaultConfigurationIsVisible = 0;
|
||||||
defaultConfigurationName = Release;
|
defaultConfigurationName = Release;
|
||||||
};
|
};
|
||||||
83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "testHotupdate" */ = {
|
83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "AwesomeProject" */ = {
|
||||||
isa = XCConfigurationList;
|
isa = XCConfigurationList;
|
||||||
buildConfigurations = (
|
buildConfigurations = (
|
||||||
83CBBA201A601CBA00E9B192 /* Debug */,
|
83CBBA201A601CBA00E9B192 /* Debug */,
|
@@ -15,9 +15,9 @@
|
|||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||||
BuildableName = "testHotupdate.app"
|
BuildableName = "AwesomeProject.app"
|
||||||
BlueprintName = "testHotupdate"
|
BlueprintName = "AwesomeProject"
|
||||||
ReferencedContainer = "container:testHotupdate.xcodeproj">
|
ReferencedContainer = "container:AwesomeProject.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</BuildActionEntry>
|
</BuildActionEntry>
|
||||||
</BuildActionEntries>
|
</BuildActionEntries>
|
||||||
@@ -33,9 +33,9 @@
|
|||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
|
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
|
||||||
BuildableName = "testHotupdateTests.xctest"
|
BuildableName = "AwesomeProjectTests.xctest"
|
||||||
BlueprintName = "testHotupdateTests"
|
BlueprintName = "AwesomeProjectTests"
|
||||||
ReferencedContainer = "container:testHotupdate.xcodeproj">
|
ReferencedContainer = "container:AwesomeProject.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</TestableReference>
|
</TestableReference>
|
||||||
</Testables>
|
</Testables>
|
||||||
@@ -55,9 +55,9 @@
|
|||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||||
BuildableName = "testHotupdate.app"
|
BuildableName = "AwesomeProject.app"
|
||||||
BlueprintName = "testHotupdate"
|
BlueprintName = "AwesomeProject"
|
||||||
ReferencedContainer = "container:testHotupdate.xcodeproj">
|
ReferencedContainer = "container:AwesomeProject.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</BuildableProductRunnable>
|
</BuildableProductRunnable>
|
||||||
</LaunchAction>
|
</LaunchAction>
|
||||||
@@ -72,9 +72,9 @@
|
|||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||||
BuildableName = "testHotupdate.app"
|
BuildableName = "AwesomeProject.app"
|
||||||
BlueprintName = "testHotupdate"
|
BlueprintName = "AwesomeProject"
|
||||||
ReferencedContainer = "container:testHotupdate.xcodeproj">
|
ReferencedContainer = "container:AwesomeProject.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</BuildableProductRunnable>
|
</BuildableProductRunnable>
|
||||||
</ProfileAction>
|
</ProfileAction>
|
@@ -2,7 +2,7 @@
|
|||||||
<Workspace
|
<Workspace
|
||||||
version = "1.0">
|
version = "1.0">
|
||||||
<FileRef
|
<FileRef
|
||||||
location = "group:testHotupdate.xcodeproj">
|
location = "group:AwesomeProject.xcodeproj">
|
||||||
</FileRef>
|
</FileRef>
|
||||||
<FileRef
|
<FileRef
|
||||||
location = "group:Pods/Pods.xcodeproj">
|
location = "group:Pods/Pods.xcodeproj">
|
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>IDEDidComputeMac32BitWarning</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
8
Example/testHotUpdate/ios/AwesomeProject/AppDelegate.h
Normal file
8
Example/testHotUpdate/ios/AwesomeProject/AppDelegate.h
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#import <React/RCTBridgeDelegate.h>
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
|
@interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate>
|
||||||
|
|
||||||
|
@property (nonatomic, strong) UIWindow *window;
|
||||||
|
|
||||||
|
@end
|
133
Example/testHotUpdate/ios/AwesomeProject/AppDelegate.mm
Normal file
133
Example/testHotUpdate/ios/AwesomeProject/AppDelegate.mm
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
#import "AppDelegate.h"
|
||||||
|
#import "RCTPushy.h"
|
||||||
|
#import <React/RCTBridge.h>
|
||||||
|
#import <React/RCTBundleURLProvider.h>
|
||||||
|
#import <React/RCTRootView.h>
|
||||||
|
|
||||||
|
#import <React/RCTAppSetupUtils.h>
|
||||||
|
|
||||||
|
#if RCT_NEW_ARCH_ENABLED
|
||||||
|
#import <React/CoreModulesPlugins.h>
|
||||||
|
#import <React/RCTCxxBridgeDelegate.h>
|
||||||
|
#import <React/RCTFabricSurfaceHostingProxyRootView.h>
|
||||||
|
#import <React/RCTSurfacePresenter.h>
|
||||||
|
#import <React/RCTSurfacePresenterBridgeAdapter.h>
|
||||||
|
#import <ReactCommon/RCTTurboModuleManager.h>
|
||||||
|
|
||||||
|
#import <react/config/ReactNativeConfig.h>
|
||||||
|
|
||||||
|
static NSString *const kRNConcurrentRoot = @"concurrentRoot";
|
||||||
|
|
||||||
|
@interface AppDelegate () <RCTCxxBridgeDelegate, RCTTurboModuleManagerDelegate> {
|
||||||
|
RCTTurboModuleManager *_turboModuleManager;
|
||||||
|
RCTSurfacePresenterBridgeAdapter *_bridgeAdapter;
|
||||||
|
std::shared_ptr<const facebook::react::ReactNativeConfig> _reactNativeConfig;
|
||||||
|
facebook::react::ContextContainer::Shared _contextContainer;
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
#endif
|
||||||
|
|
||||||
|
@implementation AppDelegate
|
||||||
|
|
||||||
|
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
||||||
|
{
|
||||||
|
RCTAppSetupPrepareApp(application);
|
||||||
|
|
||||||
|
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
|
||||||
|
|
||||||
|
#if RCT_NEW_ARCH_ENABLED
|
||||||
|
_contextContainer = std::make_shared<facebook::react::ContextContainer const>();
|
||||||
|
_reactNativeConfig = std::make_shared<facebook::react::EmptyReactNativeConfig const>();
|
||||||
|
_contextContainer->insert("ReactNativeConfig", _reactNativeConfig);
|
||||||
|
_bridgeAdapter = [[RCTSurfacePresenterBridgeAdapter alloc] initWithBridge:bridge contextContainer:_contextContainer];
|
||||||
|
bridge.surfacePresenter = _bridgeAdapter.surfacePresenter;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
NSDictionary *initProps = [self prepareInitialProps];
|
||||||
|
UIView *rootView = RCTAppSetupDefaultRootView(bridge, @"AwesomeProject", initProps);
|
||||||
|
|
||||||
|
if (@available(iOS 13.0, *)) {
|
||||||
|
rootView.backgroundColor = [UIColor systemBackgroundColor];
|
||||||
|
} else {
|
||||||
|
rootView.backgroundColor = [UIColor whiteColor];
|
||||||
|
}
|
||||||
|
|
||||||
|
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
|
||||||
|
UIViewController *rootViewController = [UIViewController new];
|
||||||
|
rootViewController.view = rootView;
|
||||||
|
self.window.rootViewController = rootViewController;
|
||||||
|
[self.window makeKeyAndVisible];
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// This method controls whether the `concurrentRoot`feature of React18 is turned on or off.
|
||||||
|
///
|
||||||
|
/// @see: https://reactjs.org/blog/2022/03/29/react-v18.html
|
||||||
|
/// @note: This requires to be rendering on Fabric (i.e. on the New Architecture).
|
||||||
|
/// @return: `true` if the `concurrentRoot` feture is enabled. Otherwise, it returns `false`.
|
||||||
|
- (BOOL)concurrentRootEnabled
|
||||||
|
{
|
||||||
|
// Switch this bool to turn on and off the concurrent root
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSDictionary *)prepareInitialProps
|
||||||
|
{
|
||||||
|
NSMutableDictionary *initProps = [NSMutableDictionary new];
|
||||||
|
|
||||||
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
|
initProps[kRNConcurrentRoot] = @([self concurrentRootEnabled]);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return initProps;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
|
||||||
|
{
|
||||||
|
#if DEBUG
|
||||||
|
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
|
||||||
|
#else
|
||||||
|
return [RCTPushy bundleURL];
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#if RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
|
#pragma mark - RCTCxxBridgeDelegate
|
||||||
|
|
||||||
|
- (std::unique_ptr<facebook::react::JSExecutorFactory>)jsExecutorFactoryForBridge:(RCTBridge *)bridge
|
||||||
|
{
|
||||||
|
_turboModuleManager = [[RCTTurboModuleManager alloc] initWithBridge:bridge
|
||||||
|
delegate:self
|
||||||
|
jsInvoker:bridge.jsCallInvoker];
|
||||||
|
return RCTAppSetupDefaultJsExecutorFactory(bridge, _turboModuleManager);
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark RCTTurboModuleManagerDelegate
|
||||||
|
|
||||||
|
- (Class)getModuleClassFromName:(const char *)name
|
||||||
|
{
|
||||||
|
return RCTCoreModulesClassProvider(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const std::string &)name
|
||||||
|
jsInvoker:(std::shared_ptr<facebook::react::CallInvoker>)jsInvoker
|
||||||
|
{
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const std::string &)name
|
||||||
|
initParams:
|
||||||
|
(const facebook::react::ObjCTurboModule::InitParams &)params
|
||||||
|
{
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (id<RCTTurboModule>)getModuleInstanceFromClass:(Class)moduleClass
|
||||||
|
{
|
||||||
|
return RCTAppSetupDefaultModuleFromClass(moduleClass);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
@end
|
@@ -5,7 +5,7 @@
|
|||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>en</string>
|
<string>en</string>
|
||||||
<key>CFBundleDisplayName</key>
|
<key>CFBundleDisplayName</key>
|
||||||
<string>testHotupdate</string>
|
<string>AwesomeProject</string>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>$(EXECUTABLE_NAME)</string>
|
<string>$(EXECUTABLE_NAME)</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
@@ -26,6 +26,8 @@
|
|||||||
<true/>
|
<true/>
|
||||||
<key>NSAppTransportSecurity</key>
|
<key>NSAppTransportSecurity</key>
|
||||||
<dict>
|
<dict>
|
||||||
|
<key>NSAllowsArbitraryLoads</key>
|
||||||
|
<true/>
|
||||||
<key>NSExceptionDomains</key>
|
<key>NSExceptionDomains</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>localhost</key>
|
<key>localhost</key>
|
@@ -16,7 +16,7 @@
|
|||||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="testHotupdate" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="GJd-Yh-RWb">
|
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="AwesomeProject" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="GJd-Yh-RWb">
|
||||||
<rect key="frame" x="0.0" y="202" width="375" height="43"/>
|
<rect key="frame" x="0.0" y="202" width="375" height="43"/>
|
||||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
|
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
|
||||||
<nil key="highlightedColor"/>
|
<nil key="highlightedColor"/>
|
@@ -7,11 +7,11 @@
|
|||||||
#define TIMEOUT_SECONDS 600
|
#define TIMEOUT_SECONDS 600
|
||||||
#define TEXT_TO_LOOK_FOR @"Welcome to React"
|
#define TEXT_TO_LOOK_FOR @"Welcome to React"
|
||||||
|
|
||||||
@interface testHotupdateTests : XCTestCase
|
@interface AwesomeProjectTests : XCTestCase
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation testHotupdateTests
|
@implementation AwesomeProjectTests
|
||||||
|
|
||||||
- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test
|
- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test
|
||||||
{
|
{
|
@@ -1,27 +1,12 @@
|
|||||||
require_relative '../node_modules/react-native/scripts/react_native_pods'
|
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, min_ios_version_supported
|
platform :ios, '12.4'
|
||||||
prepare_react_native_project!
|
install! 'cocoapods', :deterministic_uuids => false
|
||||||
|
|
||||||
# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
|
production = ENV["PRODUCTION"] == "1"
|
||||||
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
|
|
||||||
#
|
|
||||||
# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
|
|
||||||
# ```js
|
|
||||||
# module.exports = {
|
|
||||||
# dependencies: {
|
|
||||||
# ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
|
|
||||||
# ```
|
|
||||||
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
|
|
||||||
|
|
||||||
linkage = ENV['USE_FRAMEWORKS']
|
target 'AwesomeProject' do
|
||||||
if linkage != nil
|
|
||||||
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
|
|
||||||
use_frameworks! :linkage => linkage.to_sym
|
|
||||||
end
|
|
||||||
|
|
||||||
target 'testHotupdate' do
|
|
||||||
config = use_native_modules!
|
config = use_native_modules!
|
||||||
|
|
||||||
# Flags change depending on the env values.
|
# Flags change depending on the env values.
|
||||||
@@ -29,32 +14,22 @@ target 'testHotupdate' do
|
|||||||
|
|
||||||
use_react_native!(
|
use_react_native!(
|
||||||
:path => config[:reactNativePath],
|
:path => config[:reactNativePath],
|
||||||
# Hermes is now enabled by default. Disable by setting this flag to false.
|
# to enable hermes on iOS, change `false` to `true` and then install pods
|
||||||
# Upcoming versions of React Native may rely on get_default_flags(), but
|
:production => production,
|
||||||
# we make it explicit here to aid in the React Native upgrade process.
|
|
||||||
:hermes_enabled => flags[:hermes_enabled],
|
:hermes_enabled => flags[:hermes_enabled],
|
||||||
:fabric_enabled => flags[:fabric_enabled],
|
:fabric_enabled => flags[:fabric_enabled],
|
||||||
# Enables Flipper.
|
:flipper_configuration => FlipperConfiguration.enabled,
|
||||||
#
|
|
||||||
# Note that if you have use_frameworks! enabled, Flipper will not work and
|
|
||||||
# you should disable the next line.
|
|
||||||
:flipper_configuration => flipper_config,
|
|
||||||
# An absolute path to your application root.
|
# An absolute path to your application root.
|
||||||
:app_path => "#{Pod::Config.instance.installation_root}/.."
|
:app_path => "#{Pod::Config.instance.installation_root}/.."
|
||||||
)
|
)
|
||||||
|
|
||||||
target 'testHotupdateTests' do
|
target 'AwesomeProjectTests' do
|
||||||
inherit! :complete
|
inherit! :complete
|
||||||
# Pods for testing
|
# Pods for testing
|
||||||
end
|
end
|
||||||
|
|
||||||
post_install do |installer|
|
post_install do |installer|
|
||||||
react_native_post_install(
|
react_native_post_install(installer)
|
||||||
installer,
|
|
||||||
# Set `mac_catalyst_enabled` to `true` in order to apply patches
|
|
||||||
# necessary for Mac Catalyst builds
|
|
||||||
:mac_catalyst_enabled => false
|
|
||||||
)
|
|
||||||
__apply_Xcode_12_5_M1_post_install_workaround(installer)
|
__apply_Xcode_12_5_M1_post_install_workaround(installer)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@@ -2,14 +2,14 @@ PODS:
|
|||||||
- boost (1.76.0)
|
- boost (1.76.0)
|
||||||
- CocoaAsyncSocket (7.6.5)
|
- CocoaAsyncSocket (7.6.5)
|
||||||
- DoubleConversion (1.1.6)
|
- DoubleConversion (1.1.6)
|
||||||
- FBLazyVector (0.71.1)
|
- FBLazyVector (0.69.8)
|
||||||
- FBReactNativeSpec (0.71.1):
|
- FBReactNativeSpec (0.69.8):
|
||||||
- RCT-Folly (= 2021.07.22.00)
|
- RCT-Folly (= 2021.06.28.00-v2)
|
||||||
- RCTRequired (= 0.71.1)
|
- RCTRequired (= 0.69.8)
|
||||||
- RCTTypeSafety (= 0.71.1)
|
- RCTTypeSafety (= 0.69.8)
|
||||||
- React-Core (= 0.71.1)
|
- React-Core (= 0.69.8)
|
||||||
- React-jsi (= 0.71.1)
|
- React-jsi (= 0.69.8)
|
||||||
- ReactCommon/turbomodule/core (= 0.71.1)
|
- ReactCommon/turbomodule/core (= 0.69.8)
|
||||||
- Flipper (0.125.0):
|
- Flipper (0.125.0):
|
||||||
- Flipper-Folly (~> 2.6)
|
- Flipper-Folly (~> 2.6)
|
||||||
- Flipper-RSocket (~> 1.4)
|
- Flipper-RSocket (~> 1.4)
|
||||||
@@ -73,322 +73,297 @@ PODS:
|
|||||||
- FlipperKit/FlipperKitNetworkPlugin
|
- FlipperKit/FlipperKitNetworkPlugin
|
||||||
- fmt (6.2.1)
|
- fmt (6.2.1)
|
||||||
- glog (0.3.5)
|
- glog (0.3.5)
|
||||||
- hermes-engine (0.71.1):
|
|
||||||
- hermes-engine/Pre-built (= 0.71.1)
|
|
||||||
- hermes-engine/Pre-built (0.71.1)
|
|
||||||
- libevent (2.1.12)
|
- libevent (2.1.12)
|
||||||
- OpenSSL-Universal (1.1.1100)
|
- OpenSSL-Universal (1.1.1100)
|
||||||
- RCT-Folly (2021.07.22.00):
|
- RCT-Folly (2021.06.28.00-v2):
|
||||||
- boost
|
- boost
|
||||||
- DoubleConversion
|
- DoubleConversion
|
||||||
- fmt (~> 6.2.1)
|
- fmt (~> 6.2.1)
|
||||||
- glog
|
- glog
|
||||||
- RCT-Folly/Default (= 2021.07.22.00)
|
- RCT-Folly/Default (= 2021.06.28.00-v2)
|
||||||
- RCT-Folly/Default (2021.07.22.00):
|
- RCT-Folly/Default (2021.06.28.00-v2):
|
||||||
- boost
|
- boost
|
||||||
- DoubleConversion
|
- DoubleConversion
|
||||||
- fmt (~> 6.2.1)
|
- fmt (~> 6.2.1)
|
||||||
- glog
|
- glog
|
||||||
- RCT-Folly/Futures (2021.07.22.00):
|
- RCTRequired (0.69.8)
|
||||||
- boost
|
- RCTTypeSafety (0.69.8):
|
||||||
- DoubleConversion
|
- FBLazyVector (= 0.69.8)
|
||||||
- fmt (~> 6.2.1)
|
- RCTRequired (= 0.69.8)
|
||||||
|
- React-Core (= 0.69.8)
|
||||||
|
- React (0.69.8):
|
||||||
|
- React-Core (= 0.69.8)
|
||||||
|
- React-Core/DevSupport (= 0.69.8)
|
||||||
|
- React-Core/RCTWebSocket (= 0.69.8)
|
||||||
|
- React-RCTActionSheet (= 0.69.8)
|
||||||
|
- React-RCTAnimation (= 0.69.8)
|
||||||
|
- React-RCTBlob (= 0.69.8)
|
||||||
|
- React-RCTImage (= 0.69.8)
|
||||||
|
- React-RCTLinking (= 0.69.8)
|
||||||
|
- React-RCTNetwork (= 0.69.8)
|
||||||
|
- React-RCTSettings (= 0.69.8)
|
||||||
|
- React-RCTText (= 0.69.8)
|
||||||
|
- React-RCTVibration (= 0.69.8)
|
||||||
|
- React-bridging (0.69.8):
|
||||||
|
- RCT-Folly (= 2021.06.28.00-v2)
|
||||||
|
- React-jsi (= 0.69.8)
|
||||||
|
- React-callinvoker (0.69.8)
|
||||||
|
- React-Codegen (0.69.8):
|
||||||
|
- FBReactNativeSpec (= 0.69.8)
|
||||||
|
- RCT-Folly (= 2021.06.28.00-v2)
|
||||||
|
- RCTRequired (= 0.69.8)
|
||||||
|
- RCTTypeSafety (= 0.69.8)
|
||||||
|
- React-Core (= 0.69.8)
|
||||||
|
- React-jsi (= 0.69.8)
|
||||||
|
- React-jsiexecutor (= 0.69.8)
|
||||||
|
- ReactCommon/turbomodule/core (= 0.69.8)
|
||||||
|
- React-Core (0.69.8):
|
||||||
- glog
|
- glog
|
||||||
- libevent
|
- RCT-Folly (= 2021.06.28.00-v2)
|
||||||
- RCTRequired (0.71.1)
|
- React-Core/Default (= 0.69.8)
|
||||||
- RCTTypeSafety (0.71.1):
|
- React-cxxreact (= 0.69.8)
|
||||||
- FBLazyVector (= 0.71.1)
|
- React-jsi (= 0.69.8)
|
||||||
- RCTRequired (= 0.71.1)
|
- React-jsiexecutor (= 0.69.8)
|
||||||
- React-Core (= 0.71.1)
|
- React-perflogger (= 0.69.8)
|
||||||
- React (0.71.1):
|
|
||||||
- React-Core (= 0.71.1)
|
|
||||||
- React-Core/DevSupport (= 0.71.1)
|
|
||||||
- React-Core/RCTWebSocket (= 0.71.1)
|
|
||||||
- React-RCTActionSheet (= 0.71.1)
|
|
||||||
- React-RCTAnimation (= 0.71.1)
|
|
||||||
- React-RCTBlob (= 0.71.1)
|
|
||||||
- React-RCTImage (= 0.71.1)
|
|
||||||
- React-RCTLinking (= 0.71.1)
|
|
||||||
- React-RCTNetwork (= 0.71.1)
|
|
||||||
- React-RCTSettings (= 0.71.1)
|
|
||||||
- React-RCTText (= 0.71.1)
|
|
||||||
- React-RCTVibration (= 0.71.1)
|
|
||||||
- React-callinvoker (0.71.1)
|
|
||||||
- React-Codegen (0.71.1):
|
|
||||||
- FBReactNativeSpec
|
|
||||||
- hermes-engine
|
|
||||||
- RCT-Folly
|
|
||||||
- RCTRequired
|
|
||||||
- RCTTypeSafety
|
|
||||||
- React-Core
|
|
||||||
- React-jsi
|
|
||||||
- React-jsiexecutor
|
|
||||||
- ReactCommon/turbomodule/bridging
|
|
||||||
- ReactCommon/turbomodule/core
|
|
||||||
- React-Core (0.71.1):
|
|
||||||
- glog
|
|
||||||
- RCT-Folly (= 2021.07.22.00)
|
|
||||||
- React-Core/Default (= 0.71.1)
|
|
||||||
- React-cxxreact (= 0.71.1)
|
|
||||||
- React-jsi (= 0.71.1)
|
|
||||||
- React-jsiexecutor (= 0.71.1)
|
|
||||||
- React-perflogger (= 0.71.1)
|
|
||||||
- Yoga
|
- Yoga
|
||||||
- React-Core/CoreModulesHeaders (0.71.1):
|
- React-Core/CoreModulesHeaders (0.69.8):
|
||||||
- glog
|
- glog
|
||||||
- RCT-Folly (= 2021.07.22.00)
|
- RCT-Folly (= 2021.06.28.00-v2)
|
||||||
- React-Core/Default
|
- React-Core/Default
|
||||||
- React-cxxreact (= 0.71.1)
|
- React-cxxreact (= 0.69.8)
|
||||||
- React-jsi (= 0.71.1)
|
- React-jsi (= 0.69.8)
|
||||||
- React-jsiexecutor (= 0.71.1)
|
- React-jsiexecutor (= 0.69.8)
|
||||||
- React-perflogger (= 0.71.1)
|
- React-perflogger (= 0.69.8)
|
||||||
- Yoga
|
- Yoga
|
||||||
- React-Core/Default (0.71.1):
|
- React-Core/Default (0.69.8):
|
||||||
- glog
|
- glog
|
||||||
- RCT-Folly (= 2021.07.22.00)
|
- RCT-Folly (= 2021.06.28.00-v2)
|
||||||
- React-cxxreact (= 0.71.1)
|
- React-cxxreact (= 0.69.8)
|
||||||
- React-jsi (= 0.71.1)
|
- React-jsi (= 0.69.8)
|
||||||
- React-jsiexecutor (= 0.71.1)
|
- React-jsiexecutor (= 0.69.8)
|
||||||
- React-perflogger (= 0.71.1)
|
- React-perflogger (= 0.69.8)
|
||||||
- Yoga
|
- Yoga
|
||||||
- React-Core/DevSupport (0.71.1):
|
- React-Core/DevSupport (0.69.8):
|
||||||
- glog
|
- glog
|
||||||
- RCT-Folly (= 2021.07.22.00)
|
- RCT-Folly (= 2021.06.28.00-v2)
|
||||||
- React-Core/Default (= 0.71.1)
|
- React-Core/Default (= 0.69.8)
|
||||||
- React-Core/RCTWebSocket (= 0.71.1)
|
- React-Core/RCTWebSocket (= 0.69.8)
|
||||||
- React-cxxreact (= 0.71.1)
|
- React-cxxreact (= 0.69.8)
|
||||||
- React-jsi (= 0.71.1)
|
- React-jsi (= 0.69.8)
|
||||||
- React-jsiexecutor (= 0.71.1)
|
- React-jsiexecutor (= 0.69.8)
|
||||||
- React-jsinspector (= 0.71.1)
|
- React-jsinspector (= 0.69.8)
|
||||||
- React-perflogger (= 0.71.1)
|
- React-perflogger (= 0.69.8)
|
||||||
- Yoga
|
- Yoga
|
||||||
- React-Core/RCTActionSheetHeaders (0.71.1):
|
- React-Core/RCTActionSheetHeaders (0.69.8):
|
||||||
- glog
|
- glog
|
||||||
- RCT-Folly (= 2021.07.22.00)
|
- RCT-Folly (= 2021.06.28.00-v2)
|
||||||
- React-Core/Default
|
- React-Core/Default
|
||||||
- React-cxxreact (= 0.71.1)
|
- React-cxxreact (= 0.69.8)
|
||||||
- React-jsi (= 0.71.1)
|
- React-jsi (= 0.69.8)
|
||||||
- React-jsiexecutor (= 0.71.1)
|
- React-jsiexecutor (= 0.69.8)
|
||||||
- React-perflogger (= 0.71.1)
|
- React-perflogger (= 0.69.8)
|
||||||
- Yoga
|
- Yoga
|
||||||
- React-Core/RCTAnimationHeaders (0.71.1):
|
- React-Core/RCTAnimationHeaders (0.69.8):
|
||||||
- glog
|
- glog
|
||||||
- RCT-Folly (= 2021.07.22.00)
|
- RCT-Folly (= 2021.06.28.00-v2)
|
||||||
- React-Core/Default
|
- React-Core/Default
|
||||||
- React-cxxreact (= 0.71.1)
|
- React-cxxreact (= 0.69.8)
|
||||||
- React-jsi (= 0.71.1)
|
- React-jsi (= 0.69.8)
|
||||||
- React-jsiexecutor (= 0.71.1)
|
- React-jsiexecutor (= 0.69.8)
|
||||||
- React-perflogger (= 0.71.1)
|
- React-perflogger (= 0.69.8)
|
||||||
- Yoga
|
- Yoga
|
||||||
- React-Core/RCTBlobHeaders (0.71.1):
|
- React-Core/RCTBlobHeaders (0.69.8):
|
||||||
- glog
|
- glog
|
||||||
- RCT-Folly (= 2021.07.22.00)
|
- RCT-Folly (= 2021.06.28.00-v2)
|
||||||
- React-Core/Default
|
- React-Core/Default
|
||||||
- React-cxxreact (= 0.71.1)
|
- React-cxxreact (= 0.69.8)
|
||||||
- React-jsi (= 0.71.1)
|
- React-jsi (= 0.69.8)
|
||||||
- React-jsiexecutor (= 0.71.1)
|
- React-jsiexecutor (= 0.69.8)
|
||||||
- React-perflogger (= 0.71.1)
|
- React-perflogger (= 0.69.8)
|
||||||
- Yoga
|
- Yoga
|
||||||
- React-Core/RCTImageHeaders (0.71.1):
|
- React-Core/RCTImageHeaders (0.69.8):
|
||||||
- glog
|
- glog
|
||||||
- RCT-Folly (= 2021.07.22.00)
|
- RCT-Folly (= 2021.06.28.00-v2)
|
||||||
- React-Core/Default
|
- React-Core/Default
|
||||||
- React-cxxreact (= 0.71.1)
|
- React-cxxreact (= 0.69.8)
|
||||||
- React-jsi (= 0.71.1)
|
- React-jsi (= 0.69.8)
|
||||||
- React-jsiexecutor (= 0.71.1)
|
- React-jsiexecutor (= 0.69.8)
|
||||||
- React-perflogger (= 0.71.1)
|
- React-perflogger (= 0.69.8)
|
||||||
- Yoga
|
- Yoga
|
||||||
- React-Core/RCTLinkingHeaders (0.71.1):
|
- React-Core/RCTLinkingHeaders (0.69.8):
|
||||||
- glog
|
- glog
|
||||||
- RCT-Folly (= 2021.07.22.00)
|
- RCT-Folly (= 2021.06.28.00-v2)
|
||||||
- React-Core/Default
|
- React-Core/Default
|
||||||
- React-cxxreact (= 0.71.1)
|
- React-cxxreact (= 0.69.8)
|
||||||
- React-jsi (= 0.71.1)
|
- React-jsi (= 0.69.8)
|
||||||
- React-jsiexecutor (= 0.71.1)
|
- React-jsiexecutor (= 0.69.8)
|
||||||
- React-perflogger (= 0.71.1)
|
- React-perflogger (= 0.69.8)
|
||||||
- Yoga
|
- Yoga
|
||||||
- React-Core/RCTNetworkHeaders (0.71.1):
|
- React-Core/RCTNetworkHeaders (0.69.8):
|
||||||
- glog
|
- glog
|
||||||
- RCT-Folly (= 2021.07.22.00)
|
- RCT-Folly (= 2021.06.28.00-v2)
|
||||||
- React-Core/Default
|
- React-Core/Default
|
||||||
- React-cxxreact (= 0.71.1)
|
- React-cxxreact (= 0.69.8)
|
||||||
- React-jsi (= 0.71.1)
|
- React-jsi (= 0.69.8)
|
||||||
- React-jsiexecutor (= 0.71.1)
|
- React-jsiexecutor (= 0.69.8)
|
||||||
- React-perflogger (= 0.71.1)
|
- React-perflogger (= 0.69.8)
|
||||||
- Yoga
|
- Yoga
|
||||||
- React-Core/RCTSettingsHeaders (0.71.1):
|
- React-Core/RCTSettingsHeaders (0.69.8):
|
||||||
- glog
|
- glog
|
||||||
- RCT-Folly (= 2021.07.22.00)
|
- RCT-Folly (= 2021.06.28.00-v2)
|
||||||
- React-Core/Default
|
- React-Core/Default
|
||||||
- React-cxxreact (= 0.71.1)
|
- React-cxxreact (= 0.69.8)
|
||||||
- React-jsi (= 0.71.1)
|
- React-jsi (= 0.69.8)
|
||||||
- React-jsiexecutor (= 0.71.1)
|
- React-jsiexecutor (= 0.69.8)
|
||||||
- React-perflogger (= 0.71.1)
|
- React-perflogger (= 0.69.8)
|
||||||
- Yoga
|
- Yoga
|
||||||
- React-Core/RCTTextHeaders (0.71.1):
|
- React-Core/RCTTextHeaders (0.69.8):
|
||||||
- glog
|
- glog
|
||||||
- RCT-Folly (= 2021.07.22.00)
|
- RCT-Folly (= 2021.06.28.00-v2)
|
||||||
- React-Core/Default
|
- React-Core/Default
|
||||||
- React-cxxreact (= 0.71.1)
|
- React-cxxreact (= 0.69.8)
|
||||||
- React-jsi (= 0.71.1)
|
- React-jsi (= 0.69.8)
|
||||||
- React-jsiexecutor (= 0.71.1)
|
- React-jsiexecutor (= 0.69.8)
|
||||||
- React-perflogger (= 0.71.1)
|
- React-perflogger (= 0.69.8)
|
||||||
- Yoga
|
- Yoga
|
||||||
- React-Core/RCTVibrationHeaders (0.71.1):
|
- React-Core/RCTVibrationHeaders (0.69.8):
|
||||||
- glog
|
- glog
|
||||||
- RCT-Folly (= 2021.07.22.00)
|
- RCT-Folly (= 2021.06.28.00-v2)
|
||||||
- React-Core/Default
|
- React-Core/Default
|
||||||
- React-cxxreact (= 0.71.1)
|
- React-cxxreact (= 0.69.8)
|
||||||
- React-jsi (= 0.71.1)
|
- React-jsi (= 0.69.8)
|
||||||
- React-jsiexecutor (= 0.71.1)
|
- React-jsiexecutor (= 0.69.8)
|
||||||
- React-perflogger (= 0.71.1)
|
- React-perflogger (= 0.69.8)
|
||||||
- Yoga
|
- Yoga
|
||||||
- React-Core/RCTWebSocket (0.71.1):
|
- React-Core/RCTWebSocket (0.69.8):
|
||||||
- glog
|
- glog
|
||||||
- RCT-Folly (= 2021.07.22.00)
|
- RCT-Folly (= 2021.06.28.00-v2)
|
||||||
- React-Core/Default (= 0.71.1)
|
- React-Core/Default (= 0.69.8)
|
||||||
- React-cxxreact (= 0.71.1)
|
- React-cxxreact (= 0.69.8)
|
||||||
- React-jsi (= 0.71.1)
|
- React-jsi (= 0.69.8)
|
||||||
- React-jsiexecutor (= 0.71.1)
|
- React-jsiexecutor (= 0.69.8)
|
||||||
- React-perflogger (= 0.71.1)
|
- React-perflogger (= 0.69.8)
|
||||||
- Yoga
|
- Yoga
|
||||||
- React-CoreModules (0.71.1):
|
- React-CoreModules (0.69.8):
|
||||||
- RCT-Folly (= 2021.07.22.00)
|
- RCT-Folly (= 2021.06.28.00-v2)
|
||||||
- RCTTypeSafety (= 0.71.1)
|
- RCTTypeSafety (= 0.69.8)
|
||||||
- React-Codegen (= 0.71.1)
|
- React-Codegen (= 0.69.8)
|
||||||
- React-Core/CoreModulesHeaders (= 0.71.1)
|
- React-Core/CoreModulesHeaders (= 0.69.8)
|
||||||
- React-jsi (= 0.71.1)
|
- React-jsi (= 0.69.8)
|
||||||
- React-RCTImage (= 0.71.1)
|
- React-RCTImage (= 0.69.8)
|
||||||
- ReactCommon/turbomodule/core (= 0.71.1)
|
- ReactCommon/turbomodule/core (= 0.69.8)
|
||||||
- React-cxxreact (0.71.1):
|
- React-cxxreact (0.69.8):
|
||||||
- boost (= 1.76.0)
|
- boost (= 1.76.0)
|
||||||
- DoubleConversion
|
- DoubleConversion
|
||||||
- glog
|
- glog
|
||||||
- RCT-Folly (= 2021.07.22.00)
|
- RCT-Folly (= 2021.06.28.00-v2)
|
||||||
- React-callinvoker (= 0.71.1)
|
- React-callinvoker (= 0.69.8)
|
||||||
- React-jsi (= 0.71.1)
|
- React-jsi (= 0.69.8)
|
||||||
- React-jsinspector (= 0.71.1)
|
- React-jsinspector (= 0.69.8)
|
||||||
- React-logger (= 0.71.1)
|
- React-logger (= 0.69.8)
|
||||||
- React-perflogger (= 0.71.1)
|
- React-perflogger (= 0.69.8)
|
||||||
- React-runtimeexecutor (= 0.71.1)
|
- React-runtimeexecutor (= 0.69.8)
|
||||||
- React-hermes (0.71.1):
|
- React-jsi (0.69.8):
|
||||||
- DoubleConversion
|
|
||||||
- glog
|
|
||||||
- hermes-engine
|
|
||||||
- RCT-Folly (= 2021.07.22.00)
|
|
||||||
- RCT-Folly/Futures (= 2021.07.22.00)
|
|
||||||
- React-cxxreact (= 0.71.1)
|
|
||||||
- React-jsiexecutor (= 0.71.1)
|
|
||||||
- React-jsinspector (= 0.71.1)
|
|
||||||
- React-perflogger (= 0.71.1)
|
|
||||||
- React-jsi (0.71.1):
|
|
||||||
- boost (= 1.76.0)
|
- boost (= 1.76.0)
|
||||||
- DoubleConversion
|
- DoubleConversion
|
||||||
- glog
|
- glog
|
||||||
- hermes-engine
|
- RCT-Folly (= 2021.06.28.00-v2)
|
||||||
- RCT-Folly (= 2021.07.22.00)
|
- React-jsi/Default (= 0.69.8)
|
||||||
- React-jsiexecutor (0.71.1):
|
- React-jsi/Default (0.69.8):
|
||||||
|
- boost (= 1.76.0)
|
||||||
- DoubleConversion
|
- DoubleConversion
|
||||||
- glog
|
- glog
|
||||||
- RCT-Folly (= 2021.07.22.00)
|
- RCT-Folly (= 2021.06.28.00-v2)
|
||||||
- React-cxxreact (= 0.71.1)
|
- React-jsiexecutor (0.69.8):
|
||||||
- React-jsi (= 0.71.1)
|
- DoubleConversion
|
||||||
- React-perflogger (= 0.71.1)
|
|
||||||
- React-jsinspector (0.71.1)
|
|
||||||
- React-logger (0.71.1):
|
|
||||||
- glog
|
- glog
|
||||||
- react-native-update (8.1.0):
|
- RCT-Folly (= 2021.06.28.00-v2)
|
||||||
|
- React-cxxreact (= 0.69.8)
|
||||||
|
- React-jsi (= 0.69.8)
|
||||||
|
- React-perflogger (= 0.69.8)
|
||||||
|
- React-jsinspector (0.69.8)
|
||||||
|
- React-logger (0.69.8):
|
||||||
|
- glog
|
||||||
|
- react-native-update (9.0.0):
|
||||||
- React
|
- React
|
||||||
- react-native-update/HDiffPatch (= 8.1.0)
|
|
||||||
- react-native-update/RCTPushy (= 8.1.0)
|
|
||||||
- SSZipArchive
|
|
||||||
- react-native-update/HDiffPatch (8.1.0):
|
|
||||||
- React
|
|
||||||
- SSZipArchive
|
|
||||||
- react-native-update/RCTPushy (8.1.0):
|
|
||||||
- React
|
|
||||||
- SSZipArchive
|
|
||||||
- React-perflogger (0.71.1)
|
|
||||||
- React-RCTActionSheet (0.71.1):
|
|
||||||
- React-Core/RCTActionSheetHeaders (= 0.71.1)
|
|
||||||
- React-RCTAnimation (0.71.1):
|
|
||||||
- RCT-Folly (= 2021.07.22.00)
|
|
||||||
- RCTTypeSafety (= 0.71.1)
|
|
||||||
- React-Codegen (= 0.71.1)
|
|
||||||
- React-Core/RCTAnimationHeaders (= 0.71.1)
|
|
||||||
- React-jsi (= 0.71.1)
|
|
||||||
- ReactCommon/turbomodule/core (= 0.71.1)
|
|
||||||
- React-RCTAppDelegate (0.71.1):
|
|
||||||
- RCT-Folly
|
|
||||||
- RCTRequired
|
|
||||||
- RCTTypeSafety
|
|
||||||
- React-Core
|
- React-Core
|
||||||
- ReactCommon/turbomodule/core
|
- react-native-update/HDiffPatch (= 9.0.0)
|
||||||
- React-RCTBlob (0.71.1):
|
- react-native-update/RCTPushy (= 9.0.0)
|
||||||
- RCT-Folly (= 2021.07.22.00)
|
- SSZipArchive
|
||||||
- React-Codegen (= 0.71.1)
|
- react-native-update/HDiffPatch (9.0.0):
|
||||||
- React-Core/RCTBlobHeaders (= 0.71.1)
|
- React
|
||||||
- React-Core/RCTWebSocket (= 0.71.1)
|
- React-Core
|
||||||
- React-jsi (= 0.71.1)
|
- SSZipArchive
|
||||||
- React-RCTNetwork (= 0.71.1)
|
- react-native-update/RCTPushy (9.0.0):
|
||||||
- ReactCommon/turbomodule/core (= 0.71.1)
|
- React
|
||||||
- React-RCTImage (0.71.1):
|
- React-Core
|
||||||
- RCT-Folly (= 2021.07.22.00)
|
- SSZipArchive
|
||||||
- RCTTypeSafety (= 0.71.1)
|
- React-perflogger (0.69.8)
|
||||||
- React-Codegen (= 0.71.1)
|
- React-RCTActionSheet (0.69.8):
|
||||||
- React-Core/RCTImageHeaders (= 0.71.1)
|
- React-Core/RCTActionSheetHeaders (= 0.69.8)
|
||||||
- React-jsi (= 0.71.1)
|
- React-RCTAnimation (0.69.8):
|
||||||
- React-RCTNetwork (= 0.71.1)
|
- RCT-Folly (= 2021.06.28.00-v2)
|
||||||
- ReactCommon/turbomodule/core (= 0.71.1)
|
- RCTTypeSafety (= 0.69.8)
|
||||||
- React-RCTLinking (0.71.1):
|
- React-Codegen (= 0.69.8)
|
||||||
- React-Codegen (= 0.71.1)
|
- React-Core/RCTAnimationHeaders (= 0.69.8)
|
||||||
- React-Core/RCTLinkingHeaders (= 0.71.1)
|
- React-jsi (= 0.69.8)
|
||||||
- React-jsi (= 0.71.1)
|
- ReactCommon/turbomodule/core (= 0.69.8)
|
||||||
- ReactCommon/turbomodule/core (= 0.71.1)
|
- React-RCTBlob (0.69.8):
|
||||||
- React-RCTNetwork (0.71.1):
|
- RCT-Folly (= 2021.06.28.00-v2)
|
||||||
- RCT-Folly (= 2021.07.22.00)
|
- React-Codegen (= 0.69.8)
|
||||||
- RCTTypeSafety (= 0.71.1)
|
- React-Core/RCTBlobHeaders (= 0.69.8)
|
||||||
- React-Codegen (= 0.71.1)
|
- React-Core/RCTWebSocket (= 0.69.8)
|
||||||
- React-Core/RCTNetworkHeaders (= 0.71.1)
|
- React-jsi (= 0.69.8)
|
||||||
- React-jsi (= 0.71.1)
|
- React-RCTNetwork (= 0.69.8)
|
||||||
- ReactCommon/turbomodule/core (= 0.71.1)
|
- ReactCommon/turbomodule/core (= 0.69.8)
|
||||||
- React-RCTSettings (0.71.1):
|
- React-RCTImage (0.69.8):
|
||||||
- RCT-Folly (= 2021.07.22.00)
|
- RCT-Folly (= 2021.06.28.00-v2)
|
||||||
- RCTTypeSafety (= 0.71.1)
|
- RCTTypeSafety (= 0.69.8)
|
||||||
- React-Codegen (= 0.71.1)
|
- React-Codegen (= 0.69.8)
|
||||||
- React-Core/RCTSettingsHeaders (= 0.71.1)
|
- React-Core/RCTImageHeaders (= 0.69.8)
|
||||||
- React-jsi (= 0.71.1)
|
- React-jsi (= 0.69.8)
|
||||||
- ReactCommon/turbomodule/core (= 0.71.1)
|
- React-RCTNetwork (= 0.69.8)
|
||||||
- React-RCTText (0.71.1):
|
- ReactCommon/turbomodule/core (= 0.69.8)
|
||||||
- React-Core/RCTTextHeaders (= 0.71.1)
|
- React-RCTLinking (0.69.8):
|
||||||
- React-RCTVibration (0.71.1):
|
- React-Codegen (= 0.69.8)
|
||||||
- RCT-Folly (= 2021.07.22.00)
|
- React-Core/RCTLinkingHeaders (= 0.69.8)
|
||||||
- React-Codegen (= 0.71.1)
|
- React-jsi (= 0.69.8)
|
||||||
- React-Core/RCTVibrationHeaders (= 0.71.1)
|
- ReactCommon/turbomodule/core (= 0.69.8)
|
||||||
- React-jsi (= 0.71.1)
|
- React-RCTNetwork (0.69.8):
|
||||||
- ReactCommon/turbomodule/core (= 0.71.1)
|
- RCT-Folly (= 2021.06.28.00-v2)
|
||||||
- React-runtimeexecutor (0.71.1):
|
- RCTTypeSafety (= 0.69.8)
|
||||||
- React-jsi (= 0.71.1)
|
- React-Codegen (= 0.69.8)
|
||||||
- ReactCommon/turbomodule/bridging (0.71.1):
|
- React-Core/RCTNetworkHeaders (= 0.69.8)
|
||||||
|
- React-jsi (= 0.69.8)
|
||||||
|
- ReactCommon/turbomodule/core (= 0.69.8)
|
||||||
|
- React-RCTSettings (0.69.8):
|
||||||
|
- RCT-Folly (= 2021.06.28.00-v2)
|
||||||
|
- RCTTypeSafety (= 0.69.8)
|
||||||
|
- React-Codegen (= 0.69.8)
|
||||||
|
- React-Core/RCTSettingsHeaders (= 0.69.8)
|
||||||
|
- React-jsi (= 0.69.8)
|
||||||
|
- ReactCommon/turbomodule/core (= 0.69.8)
|
||||||
|
- React-RCTText (0.69.8):
|
||||||
|
- React-Core/RCTTextHeaders (= 0.69.8)
|
||||||
|
- React-RCTVibration (0.69.8):
|
||||||
|
- RCT-Folly (= 2021.06.28.00-v2)
|
||||||
|
- React-Codegen (= 0.69.8)
|
||||||
|
- React-Core/RCTVibrationHeaders (= 0.69.8)
|
||||||
|
- React-jsi (= 0.69.8)
|
||||||
|
- ReactCommon/turbomodule/core (= 0.69.8)
|
||||||
|
- React-runtimeexecutor (0.69.8):
|
||||||
|
- React-jsi (= 0.69.8)
|
||||||
|
- ReactCommon/turbomodule/core (0.69.8):
|
||||||
- DoubleConversion
|
- DoubleConversion
|
||||||
- glog
|
- glog
|
||||||
- RCT-Folly (= 2021.07.22.00)
|
- RCT-Folly (= 2021.06.28.00-v2)
|
||||||
- React-callinvoker (= 0.71.1)
|
- React-bridging (= 0.69.8)
|
||||||
- React-Core (= 0.71.1)
|
- React-callinvoker (= 0.69.8)
|
||||||
- React-cxxreact (= 0.71.1)
|
- React-Core (= 0.69.8)
|
||||||
- React-jsi (= 0.71.1)
|
- React-cxxreact (= 0.69.8)
|
||||||
- React-logger (= 0.71.1)
|
- React-jsi (= 0.69.8)
|
||||||
- React-perflogger (= 0.71.1)
|
- React-logger (= 0.69.8)
|
||||||
- ReactCommon/turbomodule/core (0.71.1):
|
- React-perflogger (= 0.69.8)
|
||||||
- DoubleConversion
|
|
||||||
- glog
|
|
||||||
- RCT-Folly (= 2021.07.22.00)
|
|
||||||
- React-callinvoker (= 0.71.1)
|
|
||||||
- React-Core (= 0.71.1)
|
|
||||||
- React-cxxreact (= 0.71.1)
|
|
||||||
- React-jsi (= 0.71.1)
|
|
||||||
- React-logger (= 0.71.1)
|
|
||||||
- React-perflogger (= 0.71.1)
|
|
||||||
- SocketRocket (0.6.0)
|
- SocketRocket (0.6.0)
|
||||||
- SSZipArchive (2.4.3)
|
- SSZipArchive (2.4.3)
|
||||||
- Yoga (1.14.0)
|
- Yoga (1.14.0)
|
||||||
@@ -422,13 +397,12 @@ DEPENDENCIES:
|
|||||||
- FlipperKit/FlipperKitUserDefaultsPlugin (= 0.125.0)
|
- FlipperKit/FlipperKitUserDefaultsPlugin (= 0.125.0)
|
||||||
- FlipperKit/SKIOSNetworkPlugin (= 0.125.0)
|
- FlipperKit/SKIOSNetworkPlugin (= 0.125.0)
|
||||||
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
|
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
|
||||||
- hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`)
|
|
||||||
- libevent (~> 2.1.12)
|
|
||||||
- OpenSSL-Universal (= 1.1.1100)
|
- OpenSSL-Universal (= 1.1.1100)
|
||||||
- RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
|
- RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.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-bridging (from `../node_modules/react-native/ReactCommon`)
|
||||||
- React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`)
|
- React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`)
|
||||||
- React-Codegen (from `build/generated/ios`)
|
- React-Codegen (from `build/generated/ios`)
|
||||||
- React-Core (from `../node_modules/react-native/`)
|
- React-Core (from `../node_modules/react-native/`)
|
||||||
@@ -436,7 +410,6 @@ DEPENDENCIES:
|
|||||||
- React-Core/RCTWebSocket (from `../node_modules/react-native/`)
|
- React-Core/RCTWebSocket (from `../node_modules/react-native/`)
|
||||||
- React-CoreModules (from `../node_modules/react-native/React/CoreModules`)
|
- React-CoreModules (from `../node_modules/react-native/React/CoreModules`)
|
||||||
- React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`)
|
- React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`)
|
||||||
- React-hermes (from `../node_modules/react-native/ReactCommon/hermes`)
|
|
||||||
- React-jsi (from `../node_modules/react-native/ReactCommon/jsi`)
|
- React-jsi (from `../node_modules/react-native/ReactCommon/jsi`)
|
||||||
- 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`)
|
||||||
@@ -445,7 +418,6 @@ DEPENDENCIES:
|
|||||||
- React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`)
|
- React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`)
|
||||||
- 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-RCTAppDelegate (from `../node_modules/react-native/Libraries/AppDelegate`)
|
|
||||||
- React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`)
|
- React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`)
|
||||||
- React-RCTImage (from `../node_modules/react-native/Libraries/Image`)
|
- React-RCTImage (from `../node_modules/react-native/Libraries/Image`)
|
||||||
- React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`)
|
- React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`)
|
||||||
@@ -487,8 +459,6 @@ EXTERNAL SOURCES:
|
|||||||
:path: "../node_modules/react-native/React/FBReactNativeSpec"
|
:path: "../node_modules/react-native/React/FBReactNativeSpec"
|
||||||
glog:
|
glog:
|
||||||
:podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
|
:podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
|
||||||
hermes-engine:
|
|
||||||
:podspec: "../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec"
|
|
||||||
RCT-Folly:
|
RCT-Folly:
|
||||||
:podspec: "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec"
|
:podspec: "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec"
|
||||||
RCTRequired:
|
RCTRequired:
|
||||||
@@ -497,6 +467,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-bridging:
|
||||||
|
:path: "../node_modules/react-native/ReactCommon"
|
||||||
React-callinvoker:
|
React-callinvoker:
|
||||||
:path: "../node_modules/react-native/ReactCommon/callinvoker"
|
:path: "../node_modules/react-native/ReactCommon/callinvoker"
|
||||||
React-Codegen:
|
React-Codegen:
|
||||||
@@ -507,8 +479,6 @@ EXTERNAL SOURCES:
|
|||||||
:path: "../node_modules/react-native/React/CoreModules"
|
:path: "../node_modules/react-native/React/CoreModules"
|
||||||
React-cxxreact:
|
React-cxxreact:
|
||||||
:path: "../node_modules/react-native/ReactCommon/cxxreact"
|
:path: "../node_modules/react-native/ReactCommon/cxxreact"
|
||||||
React-hermes:
|
|
||||||
:path: "../node_modules/react-native/ReactCommon/hermes"
|
|
||||||
React-jsi:
|
React-jsi:
|
||||||
:path: "../node_modules/react-native/ReactCommon/jsi"
|
:path: "../node_modules/react-native/ReactCommon/jsi"
|
||||||
React-jsiexecutor:
|
React-jsiexecutor:
|
||||||
@@ -525,8 +495,6 @@ EXTERNAL SOURCES:
|
|||||||
:path: "../node_modules/react-native/Libraries/ActionSheetIOS"
|
:path: "../node_modules/react-native/Libraries/ActionSheetIOS"
|
||||||
React-RCTAnimation:
|
React-RCTAnimation:
|
||||||
:path: "../node_modules/react-native/Libraries/NativeAnimation"
|
:path: "../node_modules/react-native/Libraries/NativeAnimation"
|
||||||
React-RCTAppDelegate:
|
|
||||||
:path: "../node_modules/react-native/Libraries/AppDelegate"
|
|
||||||
React-RCTBlob:
|
React-RCTBlob:
|
||||||
:path: "../node_modules/react-native/Libraries/Blob"
|
:path: "../node_modules/react-native/Libraries/Blob"
|
||||||
React-RCTImage:
|
React-RCTImage:
|
||||||
@@ -551,9 +519,9 @@ EXTERNAL SOURCES:
|
|||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
boost: a7c83b31436843459a1961bfd74b96033dc77234
|
boost: a7c83b31436843459a1961bfd74b96033dc77234
|
||||||
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
|
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
|
||||||
DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662
|
DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
|
||||||
FBLazyVector: ad72713385db5289b19f1ead07e8e4aa26dcb01d
|
FBLazyVector: c7b6997d41fffaaaf4d18c82bc93885df731e2d0
|
||||||
FBReactNativeSpec: df2602c11e33d310433496e28a48b4b2be652a61
|
FBReactNativeSpec: b1217c558a3ae84c2057d9c2ddce88af21379a68
|
||||||
Flipper: 26fc4b7382499f1281eb8cb921e5c3ad6de91fe0
|
Flipper: 26fc4b7382499f1281eb8cb921e5c3ad6de91fe0
|
||||||
Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c
|
Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c
|
||||||
Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30
|
Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30
|
||||||
@@ -564,43 +532,41 @@ SPEC CHECKSUMS:
|
|||||||
Flipper-RSocket: d9d9ade67cbecf6ac10730304bf5607266dd2541
|
Flipper-RSocket: d9d9ade67cbecf6ac10730304bf5607266dd2541
|
||||||
FlipperKit: cbdee19bdd4e7f05472a66ce290f1b729ba3cb86
|
FlipperKit: cbdee19bdd4e7f05472a66ce290f1b729ba3cb86
|
||||||
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
|
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
|
||||||
glog: 476ee3e89abb49e07f822b48323c51c57124b572
|
glog: 3d02b25ca00c2d456734d0bcff864cbc62f6ae1a
|
||||||
hermes-engine: 922ccd744f50d9bfde09e9677bf0f3b562ea5fb9
|
|
||||||
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
|
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
|
||||||
OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
|
OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
|
||||||
RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1
|
RCT-Folly: b9d9fe1fc70114b751c076104e52f3b1b5e5a95a
|
||||||
RCTRequired: fd4d923b964658aa0c4091a32c8b2004c6d9e3a6
|
RCTRequired: 344fd6fb3c669da87e91294be7ee0199bf35c701
|
||||||
RCTTypeSafety: c276d85975bde3d8448907235c70bf0da257adfd
|
RCTTypeSafety: ca608cc1d3a81229632bc0c1136b698b9337c1d8
|
||||||
React: e481a67971af1ce9639c9f746b753dd0e84ca108
|
React: 1d76bae8d73113b202224075f0b0bd546996b328
|
||||||
React-callinvoker: 1051c04a94fa9d243786b86380606bad701a3b31
|
React-bridging: 2eb62dc8ba31194d285705cb62e24a15753aeaec
|
||||||
React-Codegen: 14b1e716d361d5ad95e0ce1a338f3fa0733a98b5
|
React-callinvoker: f3cfb045a0fb185445542555d88b6acf385cbedc
|
||||||
React-Core: 698fc3baecb80d511d987475a16d036cec6d287f
|
React-Codegen: 808e2d4d4201583ac89fb40d6862aaa26cb88999
|
||||||
React-CoreModules: 59245305f41ff0adfeac334acc0594dea4585a7c
|
React-Core: 82c5392ab182252ce4ffbc16794e0e38b32ea9a1
|
||||||
React-cxxreact: 49accd2954b0f532805dbcd1918fa6962f32f247
|
React-CoreModules: 4e891a6c0a59b01ca8406e041c7e49ab12e51d48
|
||||||
React-hermes: d068733294581a085e95b6024e8d951b005e26d3
|
React-cxxreact: 0dc4ba3d97839bd36d422592ddb0bdfa9940a990
|
||||||
React-jsi: 122b9bce14f4c6c7cb58f28f87912cfe091885fa
|
React-jsi: dcd936ff5e580dba0d8644ac9ee4ca47bb166df1
|
||||||
React-jsiexecutor: 60cf272aababc5212410e4249d17cea14fc36caa
|
React-jsiexecutor: 2cf8ea3753afb81dfcc386613dbbb0b5d155fb34
|
||||||
React-jsinspector: ff56004b0c974b688a6548c156d5830ad751ae07
|
React-jsinspector: 0eda09e9cf22bbb5dbb1d23143b03a31acf37d67
|
||||||
React-logger: 60a0b5f8bed667ecf9e24fecca1f30d125de6d75
|
React-logger: 5997ab008583826c10ffe4e1ff990363e975639d
|
||||||
react-native-update: 394b7f52ed3c0688d12084f3fb47d49504131be6
|
react-native-update: 2b5ef06bfeaa668614c8deb7ec4d20dcf56f9278
|
||||||
React-perflogger: ec8eef2a8f03ecfa6361c2c5fb9197ef4a29cc85
|
React-perflogger: ad1416a715d86b32f456e5d0aed99c3b52f1de37
|
||||||
React-RCTActionSheet: a0c023b86cf4c862fa9c4eb0f6f91fbe878fb2de
|
React-RCTActionSheet: cbf7c6a953982562418ee72a1084ff7b9447b558
|
||||||
React-RCTAnimation: 168d53718c74153947c0109f55900faa64d79439
|
React-RCTAnimation: 33df3e25824dd7313edec28dded2745542f9352b
|
||||||
React-RCTAppDelegate: a8efbab128b34aa07a9491c85a41401210b1bec5
|
React-RCTBlob: 2434411df0d2d0e6567445a995f6678e2cc1d8e3
|
||||||
React-RCTBlob: 9bcbfc893bfda9f6b2eb016329d38c0f6366d31a
|
React-RCTImage: 0b912ab4255ea5ec903d06c77f5a23cea9e9c988
|
||||||
React-RCTImage: 3fcd4570b4b0f1ac2f4b4b6308dba33ce66c5b50
|
React-RCTLinking: eb239c24f4f5fe79c57a2fedf45f34f40481dda3
|
||||||
React-RCTLinking: 1edb8e1bb3fc39bf9e13c63d6aaaa3f0c3d18683
|
React-RCTNetwork: db173a6c35c1212909944920a5aa03eb8b7b9cf4
|
||||||
React-RCTNetwork: 500a79e0e0f67678077df727fabba87a55c043e1
|
React-RCTSettings: 687fa7538972467d80cd7729b6f86598e1369813
|
||||||
React-RCTSettings: cc4414eb84ad756d619076c3999fecbf12896d6f
|
React-RCTText: 605ef414f8e72bd111945d3612cd0518de612b24
|
||||||
React-RCTText: 2a34261f3da6e34f47a62154def657546ebfa5e1
|
React-RCTVibration: 5462287ee85304ba1a00474665ab292e63a41663
|
||||||
React-RCTVibration: 49d531ec8498e0afa2c9b22c2205784372e3d4f3
|
React-runtimeexecutor: 9df680f18497367bcf5c15b6b6406c0f2dfa2b6a
|
||||||
React-runtimeexecutor: 311feb67600774723fe10eb8801d3138cae9ad67
|
ReactCommon: c10f046f3ef8561e7c8e7e9b9dae2ecc9ffc48ef
|
||||||
ReactCommon: 03be76588338a27a88d103b35c3c44a3fd43d136
|
|
||||||
SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608
|
SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608
|
||||||
SSZipArchive: fe6a26b2a54d5a0890f2567b5cc6de5caa600aef
|
SSZipArchive: fe6a26b2a54d5a0890f2567b5cc6de5caa600aef
|
||||||
Yoga: 921eb014669cf9c718ada68b08d362517d564e0c
|
Yoga: d3820731e0ca3a4933f061ad29defaf7726e3251
|
||||||
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
|
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
|
||||||
|
|
||||||
PODFILE CHECKSUM: 640d0fbc8653c12b1d7121eae0169fad3d42517e
|
PODFILE CHECKSUM: 618d17df10f335f1d113daac849a7997894646b2
|
||||||
|
|
||||||
COCOAPODS: 1.11.3
|
COCOAPODS: 1.11.3
|
||||||
|
@@ -1,6 +0,0 @@
|
|||||||
#import <RCTAppDelegate.h>
|
|
||||||
#import <UIKit/UIKit.h>
|
|
||||||
|
|
||||||
@interface AppDelegate : RCTAppDelegate
|
|
||||||
|
|
||||||
@end
|
|
@@ -1,38 +0,0 @@
|
|||||||
#import "AppDelegate.h"
|
|
||||||
|
|
||||||
#import <React/RCTBundleURLProvider.h>
|
|
||||||
#import "RCTPushy.h"
|
|
||||||
|
|
||||||
@implementation AppDelegate
|
|
||||||
|
|
||||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
|
||||||
{
|
|
||||||
self.moduleName = @"testHotupdate";
|
|
||||||
// You can add your custom initial props in the dictionary below.
|
|
||||||
// They will be passed down to the ViewController used by React Native.
|
|
||||||
self.initialProps = @{};
|
|
||||||
|
|
||||||
return [super application:application didFinishLaunchingWithOptions:launchOptions];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
|
|
||||||
{
|
|
||||||
#if DEBUG
|
|
||||||
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
|
|
||||||
#else
|
|
||||||
// 非DEBUG情况下替换为热更新bundle
|
|
||||||
return [RCTPushy bundleURL];
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
/// This method controls whether the `concurrentRoot`feature of React18 is turned on or off.
|
|
||||||
///
|
|
||||||
/// @see: https://reactjs.org/blog/2022/03/29/react-v18.html
|
|
||||||
/// @note: This requires to be rendering on Fabric (i.e. on the New Architecture).
|
|
||||||
/// @return: `true` if the `concurrentRoot` feature is enabled. Otherwise, it returns `false`.
|
|
||||||
- (BOOL)concurrentRootEnabled
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@end
|
|
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "testhotupdate",
|
"name": "testHotUpdate",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -7,29 +7,30 @@
|
|||||||
"ios": "react-native run-ios",
|
"ios": "react-native run-ios",
|
||||||
"start": "react-native start",
|
"start": "react-native start",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
|
"test:e2e": "detox test --configuration android.emu.debug",
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"apk": "(cd android && ./gradlew aR)"
|
"postinstall": "patch-package"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"react": "18.2.0",
|
"patch-package": "^6.5.1",
|
||||||
"react-native": "0.71.1",
|
"postinstall-postinstall": "^2.1.0",
|
||||||
|
"react": "18.0.0",
|
||||||
|
"react-native": "0.69.8",
|
||||||
"react-native-update": "link:../.."
|
"react-native-update": "link:../.."
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.20.0",
|
"@babel/core": "^7.21.0",
|
||||||
"@babel/preset-env": "^7.20.0",
|
"@babel/runtime": "^7.21.0",
|
||||||
"@babel/runtime": "^7.20.0",
|
"@react-native-community/eslint-config": "^3.2.0",
|
||||||
"@react-native-community/eslint-config": "^3.0.0",
|
"babel-jest": "^29.5.0",
|
||||||
"@tsconfig/react-native": "^2.0.2",
|
"detox": "^20.5.0",
|
||||||
"@types/jest": "^29.2.1",
|
"eslint": "^8.36.0",
|
||||||
"@types/react": "^18.0.24",
|
"jest": "^29.5.0",
|
||||||
"@types/react-test-renderer": "^18.0.0",
|
"metro-react-native-babel-preset": "^0.76.0",
|
||||||
"babel-jest": "^29.2.1",
|
"pod-install": "^0.1.37",
|
||||||
"eslint": "^8.19.0",
|
"prettier": "^2.8.4",
|
||||||
"jest": "^29.2.1",
|
"react-test-renderer": "18.2.0",
|
||||||
"metro-react-native-babel-preset": "0.73.7",
|
"ts-jest": "^29.0.5"
|
||||||
"prettier": "^2.4.1",
|
|
||||||
"react-test-renderer": "18.2.0"
|
|
||||||
},
|
},
|
||||||
"jest": {
|
"jest": {
|
||||||
"preset": "react-native"
|
"preset": "react-native"
|
||||||
|
13
Example/testHotUpdate/patches/react-native+0.69.8.patch
Normal file
13
Example/testHotUpdate/patches/react-native+0.69.8.patch
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/node_modules/react-native/scripts/react_native_pods.rb b/node_modules/react-native/scripts/react_native_pods.rb
|
||||||
|
index e7c59ad..1461d45 100644
|
||||||
|
--- a/node_modules/react-native/scripts/react_native_pods.rb
|
||||||
|
+++ b/node_modules/react-native/scripts/react_native_pods.rb
|
||||||
|
@@ -420,7 +420,7 @@ def get_react_codegen_spec(options={})
|
||||||
|
'source' => { :git => '' },
|
||||||
|
'header_mappings_dir' => './',
|
||||||
|
'platforms' => {
|
||||||
|
- 'ios' => '11.0',
|
||||||
|
+ 'ios' => '12.0',
|
||||||
|
},
|
||||||
|
'source_files' => "**/*.{h,mm,cpp}",
|
||||||
|
'pod_target_xcconfig' => { "HEADER_SEARCH_PATHS" =>
|
10
Example/testHotUpdate/scripts/start-rn.sh
Executable file
10
Example/testHotUpdate/scripts/start-rn.sh
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
trap 'kill $RN_PID' EXIT
|
||||||
|
|
||||||
|
PLATFORM=$1
|
||||||
|
|
||||||
|
kill -9 $(lsof -i :8081 | awk '{print $2}' | tail -n +2) & npm start &
|
||||||
|
RN_PID=$!
|
||||||
|
sleep 2 && curl>/dev/null http://localhost:8081/index.bundle
|
||||||
|
wait $RN_PID
|
@@ -1,21 +1,146 @@
|
|||||||
import React from 'react';
|
/* eslint-disable react-native/no-inline-styles */
|
||||||
|
/* eslint-disable react/react-in-jsx-scope */
|
||||||
|
import {useCallback, useMemo, useState} from 'react';
|
||||||
import {
|
import {
|
||||||
ActivityIndicator,
|
ActivityIndicator,
|
||||||
Alert,
|
|
||||||
Modal,
|
Modal,
|
||||||
TextInput,
|
TextInput,
|
||||||
Button,
|
Button,
|
||||||
NativeModules,
|
|
||||||
StyleSheet,
|
StyleSheet,
|
||||||
SafeAreaView,
|
SafeAreaView,
|
||||||
Text,
|
Text,
|
||||||
View,
|
View,
|
||||||
|
TouchableOpacity,
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
|
|
||||||
const Pushy = NativeModules.Pushy;
|
import {PushyModule} from 'react-native-update';
|
||||||
|
const Hash = '9D5CE6EBA420717BE7E7D308B11F8207681B066C951D68F3994D19828F342474';
|
||||||
|
const UUID = '00000000-0000-0000-0000-000000000000';
|
||||||
|
const DownloadUrl =
|
||||||
|
'http://cos.pgyer.com/697913e94d7441f20c686e2b0996a1aa.apk?sign=7a8f11b1df82cba45c8ac30b1acec88c&t=1680404102&response-content-disposition=attachment%3Bfilename%3DtestHotupdate_1.0.apk';
|
||||||
|
|
||||||
|
|
||||||
|
const CustomDialog = ({title, visible, onConfirm}) => {
|
||||||
|
if (!visible) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<View style={styles.overlay}>
|
||||||
|
<View style={styles.dialog}>
|
||||||
|
<Text style={styles.title}>{title}</Text>
|
||||||
|
<TouchableOpacity testID='done' style={styles.button} onLongPress={onConfirm}>
|
||||||
|
<Text style={styles.buttonText}>确认</Text>
|
||||||
|
</TouchableOpacity>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
};
|
||||||
export default function TestConsole({visible}) {
|
export default function TestConsole({visible}) {
|
||||||
const [text, setText] = React.useState('');
|
const [text, setText] = useState('');
|
||||||
const [running, setRunning] = React.useState(false);
|
const [running, setRunning] = useState(false);
|
||||||
|
const [options, setOptions] = useState();
|
||||||
|
const [alertVisible, setAlertVisible] = useState(false);
|
||||||
|
const [alertMsg, setAlertMsg] = useState('');
|
||||||
|
const NativeTestMethod = useMemo(() => {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
name: 'setLocalHashInfo',
|
||||||
|
invoke: () => {
|
||||||
|
setText(
|
||||||
|
`setLocalHashInfo\n${Hash}\n{\"version\":\"1.0.0\",\"size\":\"19M\"}`,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'getLocalHashInfo',
|
||||||
|
invoke: () => {
|
||||||
|
setText(`getLocalHashInfo\n${Hash}`);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'setUuid',
|
||||||
|
invoke: () => {
|
||||||
|
setText(`setUuid\n${UUID}`);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'setBlockUpdate',
|
||||||
|
invoke: () => {
|
||||||
|
setText('setBlockUpdate');
|
||||||
|
setOptions({reason: 'application has been block', until: 1673082950});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'reloadUpdate',
|
||||||
|
invoke: () => {
|
||||||
|
setText('reloadUpdate');
|
||||||
|
setOptions({hash: Hash});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'setNeedUpdate',
|
||||||
|
invoke: () => {
|
||||||
|
setText('setNeedUpdate');
|
||||||
|
setOptions({hash: Hash});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'markSuccess',
|
||||||
|
invoke: () => {
|
||||||
|
setText('markSuccess');
|
||||||
|
setOptions(undefined);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'downloadPatchFromPpk',
|
||||||
|
invoke: () => {
|
||||||
|
setText('downloadPatchFromPpk');
|
||||||
|
setOptions({updateUrl: DownloadUrl, hash: Hash, originHash: Hash});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'downloadPatchFromPackage',
|
||||||
|
invoke: () => {
|
||||||
|
setText('downloadPatchFromPackage');
|
||||||
|
setOptions({updateUrl: DownloadUrl, hash: Hash});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'downloadFullUpdate',
|
||||||
|
invoke: () => {
|
||||||
|
setText('downloadFullUpdate');
|
||||||
|
setOptions({updateUrl: DownloadUrl, hash: Hash});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'downloadAndInstallApk',
|
||||||
|
invoke: () => {
|
||||||
|
setText('downloadAndInstallApk');
|
||||||
|
setOptions({url: DownloadUrl, target: Hash, hash: Hash});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
const renderTestView = useCallback(() => {
|
||||||
|
const views = [];
|
||||||
|
for (let i = 0; i < NativeTestMethod.length; i++) {
|
||||||
|
views.push(
|
||||||
|
<TouchableOpacity
|
||||||
|
key={i}
|
||||||
|
testID={NativeTestMethod[i].name}
|
||||||
|
onLongPress={() => {
|
||||||
|
NativeTestMethod[i].invoke();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Text>{NativeTestMethod[i].name}</Text>
|
||||||
|
</TouchableOpacity>,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return <View>{views}</View>;
|
||||||
|
}, [NativeTestMethod]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal visible={visible}>
|
<Modal visible={visible}>
|
||||||
<SafeAreaView style={{flex: 1, padding: 10}}>
|
<SafeAreaView style={{flex: 1, padding: 10}}>
|
||||||
@@ -38,39 +163,90 @@ export default function TestConsole({visible}) {
|
|||||||
onChangeText={setText}
|
onChangeText={setText}
|
||||||
/>
|
/>
|
||||||
{running && <ActivityIndicator />}
|
{running && <ActivityIndicator />}
|
||||||
<Button
|
<TouchableOpacity
|
||||||
title="执行"
|
style={{backgroundColor:'rgb(0,140,237)', justifyContent: 'center',
|
||||||
onPress={async () => {
|
alignItems: 'center',paddingTop:10,paddingBottom:10,marginBottom:5}}
|
||||||
|
testID="submit"
|
||||||
|
onLongPress={async () => {
|
||||||
setRunning(true);
|
setRunning(true);
|
||||||
try {
|
try {
|
||||||
const inputs = text.split('\n');
|
const inputs = text.split('\n');
|
||||||
const methodName = inputs[0];
|
const methodName = inputs[0];
|
||||||
let params;
|
let params = [];
|
||||||
if (inputs.length === 1) {
|
if (inputs.length === 1) {
|
||||||
await Pushy[methodName]();
|
if (options) {
|
||||||
|
await PushyModule[methodName](options);
|
||||||
|
} else {
|
||||||
|
await PushyModule[methodName]();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (inputs.length === 2) {
|
if (inputs.length === 2) {
|
||||||
params = inputs[1];
|
params = [inputs[1]];
|
||||||
} else {
|
} else {
|
||||||
params = {};
|
params = [inputs[1], inputs[2]];
|
||||||
for (let i = 1; i < inputs.length; i += 2) {
|
|
||||||
params[inputs[i]] = inputs[i + 1];
|
|
||||||
}
|
|
||||||
console.log({inputs, params});
|
console.log({inputs, params});
|
||||||
}
|
}
|
||||||
await Pushy[methodName](params);
|
await PushyModule[methodName](...params);
|
||||||
}
|
}
|
||||||
Alert.alert('done');
|
setAlertVisible(true);
|
||||||
|
setAlertMsg('done');
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
Alert.alert(e.message);
|
setAlertVisible(true);
|
||||||
|
setAlertMsg(e.message);
|
||||||
}
|
}
|
||||||
setRunning(false);
|
setRunning(false);
|
||||||
}}
|
}}
|
||||||
/>
|
>
|
||||||
<View style={{marginTop: 15}}>
|
<Text style={{color:'white'}}>执行</Text>
|
||||||
<Button title="重置" onPress={() => setText('')} />
|
</TouchableOpacity>
|
||||||
</View>
|
<Button title="重置" onPress={() => setText('')} />
|
||||||
|
{renderTestView()}
|
||||||
|
<CustomDialog
|
||||||
|
title={alertMsg}
|
||||||
|
visible={alertVisible}
|
||||||
|
onConfirm={()=>{setAlertVisible(false)}}
|
||||||
|
/>
|
||||||
</SafeAreaView>
|
</SafeAreaView>
|
||||||
</Modal>
|
</Modal>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const styles = StyleSheet.create({
|
||||||
|
container: {
|
||||||
|
flex: 1,
|
||||||
|
justifyContent: 'center',
|
||||||
|
alignItems: 'center',
|
||||||
|
},
|
||||||
|
overlay: {
|
||||||
|
position: 'absolute',
|
||||||
|
top: 0,
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
bottom: 0,
|
||||||
|
backgroundColor: 'rgba(0, 0, 0, 0.5)',
|
||||||
|
justifyContent: 'center',
|
||||||
|
alignItems: 'center',
|
||||||
|
},
|
||||||
|
dialog: {
|
||||||
|
backgroundColor: 'white',
|
||||||
|
borderRadius: 10,
|
||||||
|
padding: 20,
|
||||||
|
width: '80%',
|
||||||
|
alignItems: 'center',
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
fontSize: 18,
|
||||||
|
fontWeight: 'bold',
|
||||||
|
marginBottom: 20,
|
||||||
|
},
|
||||||
|
button: {
|
||||||
|
backgroundColor: '#2196F3',
|
||||||
|
borderRadius: 5,
|
||||||
|
paddingVertical: 10,
|
||||||
|
paddingHorizontal: 20,
|
||||||
|
},
|
||||||
|
buttonText: {
|
||||||
|
color: 'white',
|
||||||
|
fontWeight: 'bold',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
@@ -170,6 +170,7 @@ export default class App extends Component {
|
|||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
|
testID="testcase"
|
||||||
style={{marginTop: 15}}
|
style={{marginTop: 15}}
|
||||||
onLongPress={() => {
|
onLongPress={() => {
|
||||||
this.setState({showTestConsole: true});
|
this.setState({showTestConsole: true});
|
||||||
|
10
Example/testHotUpdate/update.json
Normal file
10
Example/testHotUpdate/update.json
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"ios": {
|
||||||
|
"appId": 10976,
|
||||||
|
"appKey": "p5q_rPYNOE0WdCf-i9ZCGPw-DUGUCMvY"
|
||||||
|
},
|
||||||
|
"android": {
|
||||||
|
"appId": 10977,
|
||||||
|
"appKey": "bUYKfZgtC9VirZsQbAt8qken2Gq2uxe3"
|
||||||
|
}
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
1. 基于阿里云高速 CDN 分发,对比其他服务器在国外的热更新服务,分发更稳定,更新成功率极高。
|
1. 基于阿里云高速 CDN 分发,对比其他服务器在国外的热更新服务,分发更稳定,更新成功率极高。
|
||||||
2. 基于 bsdiff/hdiff 算法创建的**超小更新包**,通常版本迭代后在几十 KB 级别(其他全量热更新服务所需流量通常在几十 MB 级别)。
|
2. 基于 bsdiff/hdiff 算法创建的**超小更新包**,通常版本迭代后在几十 KB 级别(其他全量热更新服务所需流量通常在几十 MB 级别)。
|
||||||
3. 始终跟进 RN 最新正式版本,第一时间提供支持。支持 hermes 字节码格式。(暂不支持新架构,会待其相对稳定后跟进)
|
3. 始终跟进 RN 最新正式版本,第一时间提供支持。支持 hermes 字节码格式。支持新架构。
|
||||||
4. 跨越多个版本进行更新时,只需要下载**一个更新包**,不需要逐版本依次更新。
|
4. 跨越多个版本进行更新时,只需要下载**一个更新包**,不需要逐版本依次更新。
|
||||||
5. 命令行工具 & 网页双端管理,版本发布过程简单便捷,完全可以集成 CI。
|
5. 命令行工具 & 网页双端管理,版本发布过程简单便捷,完全可以集成 CI。
|
||||||
6. 支持崩溃回滚,安全可靠。
|
6. 支持崩溃回滚,安全可靠。
|
||||||
@@ -33,3 +33,4 @@ $ yarn start
|
|||||||
本组件由[React Native 中文网](https://reactnative.cn/)独家发布,如有定制需求可以[联系我们](https://reactnative.cn/about.html#content)。
|
本组件由[React Native 中文网](https://reactnative.cn/)独家发布,如有定制需求可以[联系我们](https://reactnative.cn/about.html#content)。
|
||||||
|
|
||||||
关于此插件发现任何问题,可以前往[Issues](https://github.com/reactnativecn/react-native-pushy/issues)发帖提问。
|
关于此插件发现任何问题,可以前往[Issues](https://github.com/reactnativecn/react-native-pushy/issues)发帖提问。
|
||||||
|
|
||||||
|
@@ -5,7 +5,15 @@ def safeExtGet(prop, fallback) {
|
|||||||
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def isNewArchitectureEnabled() {
|
||||||
|
return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
|
||||||
|
}
|
||||||
|
|
||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
|
if (isNewArchitectureEnabled()) {
|
||||||
|
apply plugin: 'com.facebook.react'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion safeExtGet('compileSdkVersion', 28)
|
compileSdkVersion safeExtGet('compileSdkVersion', 28)
|
||||||
@@ -17,11 +25,17 @@ android {
|
|||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "1.0"
|
versionName "1.0"
|
||||||
consumerProguardFiles "proguard.pro"
|
consumerProguardFiles "proguard.pro"
|
||||||
|
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
|
||||||
}
|
}
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main {
|
||||||
// let gradle pack the shared library into apk
|
// let gradle pack the shared library into apk
|
||||||
jniLibs.srcDirs = ['./lib']
|
jniLibs.srcDirs = ['./lib']
|
||||||
|
if (isNewArchitectureEnabled()) {
|
||||||
|
java.srcDirs += ['src/newarch']
|
||||||
|
} else {
|
||||||
|
java.srcDirs += ['src/oldarch']
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44,4 +58,12 @@ repositories {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.facebook.react:react-native:+'
|
implementation 'com.facebook.react:react-native:+'
|
||||||
|
implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.0'
|
||||||
|
}
|
||||||
|
if (isNewArchitectureEnabled()) {
|
||||||
|
react {
|
||||||
|
jsRootDir = file("../lib/")
|
||||||
|
libraryName = "update"
|
||||||
|
codegenJavaPackageName = "cn.reactnative.modules.update"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -24,7 +24,7 @@ int hpatch_getInfo_by_mem(hpatch_singleCompressedDiffInfo* out_patinfo,
|
|||||||
mem_as_hStreamInput(&patStream,pat,pat+patsize);
|
mem_as_hStreamInput(&patStream,pat,pat+patsize);
|
||||||
if (!getSingleCompressedDiffInfo(out_patinfo,&patStream,0))
|
if (!getSingleCompressedDiffInfo(out_patinfo,&patStream,0))
|
||||||
return kHPatch_error_info;//data error;
|
return kHPatch_error_info;//data error;
|
||||||
return kHPatch_ok; //ok
|
return kHPatch_ok; //ok
|
||||||
}
|
}
|
||||||
|
|
||||||
static hpatch_TDecompress* getDecompressPlugin(const char* compressType){
|
static hpatch_TDecompress* getDecompressPlugin(const char* compressType){
|
||||||
@@ -68,7 +68,7 @@ static int hpatch_by_stream(const hpatch_TStreamInput* old,hpatch_BOOL isLoadOld
|
|||||||
_check(decompressPlugin,kHPatch_error_compressType);
|
_check(decompressPlugin,kHPatch_error_compressType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{// mem
|
{// mem
|
||||||
size_t mem_size;
|
size_t mem_size;
|
||||||
size_t oldSize=(size_t)old->streamSize;
|
size_t oldSize=(size_t)old->streamSize;
|
||||||
isLoadOldAllToMem=isLoadOldAllToMem&&(old->streamSize<=kMaxLoadMemOldSize);
|
isLoadOldAllToMem=isLoadOldAllToMem&&(old->streamSize<=kMaxLoadMemOldSize);
|
||||||
@@ -76,7 +76,7 @@ static int hpatch_by_stream(const hpatch_TStreamInput* old,hpatch_BOOL isLoadOld
|
|||||||
mem_size=temp_cache_size+(isLoadOldAllToMem?oldSize:0);
|
mem_size=temp_cache_size+(isLoadOldAllToMem?oldSize:0);
|
||||||
temp_cache=malloc(mem_size);
|
temp_cache=malloc(mem_size);
|
||||||
_check(temp_cache,kHPatch_error_malloc);
|
_check(temp_cache,kHPatch_error_malloc);
|
||||||
if (isLoadOldAllToMem){//load old to mem
|
if (isLoadOldAllToMem){//load old to mem
|
||||||
uint8_t* oldMem=temp_cache+temp_cache_size;
|
uint8_t* oldMem=temp_cache+temp_cache_size;
|
||||||
_check(old->read(old,0,oldMem,oldMem+oldSize),kHPatch_error_old_fread);
|
_check(old->read(old,0,oldMem,oldMem+oldSize),kHPatch_error_old_fread);
|
||||||
mem_as_hStreamInput(&_old,oldMem,oldMem+oldSize);
|
mem_as_hStreamInput(&_old,oldMem,oldMem+oldSize);
|
||||||
@@ -95,7 +95,7 @@ _clear:
|
|||||||
}
|
}
|
||||||
|
|
||||||
int hpatch_by_mem(const uint8_t* old,size_t oldsize,uint8_t* newBuf,size_t newsize,
|
int hpatch_by_mem(const uint8_t* old,size_t oldsize,uint8_t* newBuf,size_t newsize,
|
||||||
const uint8_t* pat,size_t patsize,const hpatch_singleCompressedDiffInfo* patInfo){
|
const uint8_t* pat,size_t patsize,const hpatch_singleCompressedDiffInfo* patInfo){
|
||||||
hpatch_TStreamInput oldStream;
|
hpatch_TStreamInput oldStream;
|
||||||
hpatch_TStreamInput patStream;
|
hpatch_TStreamInput patStream;
|
||||||
hpatch_TStreamOutput newStream;
|
hpatch_TStreamOutput newStream;
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
// hpatch.h
|
// hpatch.h
|
||||||
// import HDiffPatch, support patchData created by "hdiffz -SD -c-lzma2 oldfile newfile patchfile"
|
// import HDiffPatch, support patchData created by "hdiffz -SD -c-lzma2 oldfile newfile patchfile"
|
||||||
// Copyright 2021 housisong, All rights reserved
|
// Copyright 2021 housisong, All rights reserved
|
||||||
|
|
||||||
#ifndef HDIFFPATCH_PATCH_H
|
#ifndef HDIFFPATCH_PATCH_H
|
||||||
@@ -41,4 +41,4 @@ int hpatch_by_file(const char* oldfile, const char* newfile, const char* patchfi
|
|||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif //HDIFFPATCH_PATCH_H
|
#endif //HDIFFPATCH_PATCH_H
|
||||||
|
1
android/proguard.pro
vendored
1
android/proguard.pro
vendored
@@ -1,2 +1,3 @@
|
|||||||
-keepnames class cn.reactnative.modules.update.DownloadTask { *; }
|
-keepnames class cn.reactnative.modules.update.DownloadTask { *; }
|
||||||
|
-keepnames class cn.reactnative.modules.update.UpdateModuleImpl { *; }
|
||||||
-keepnames class com.facebook.react.ReactInstanceManager { *; }
|
-keepnames class com.facebook.react.ReactInstanceManager { *; }
|
@@ -1,9 +1,6 @@
|
|||||||
<?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" />
|
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
|
||||||
<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
|
<provider
|
||||||
|
@@ -1,7 +1,5 @@
|
|||||||
package cn.reactnative.modules.update;
|
package cn.reactnative.modules.update;
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -0,0 +1,265 @@
|
|||||||
|
package cn.reactnative.modules.update;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.app.Application;
|
||||||
|
import android.util.Log;
|
||||||
|
import com.facebook.react.ReactApplication;
|
||||||
|
import com.facebook.react.ReactInstanceManager;
|
||||||
|
import com.facebook.react.bridge.JSBundleLoader;
|
||||||
|
import com.facebook.react.bridge.Promise;
|
||||||
|
import com.facebook.react.bridge.ReactApplicationContext;
|
||||||
|
import com.facebook.react.bridge.ReadableMap;
|
||||||
|
import com.facebook.react.bridge.UiThreadUtil;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
|
||||||
|
import org.json.JSONObject;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Optional;
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
public class UpdateModuleImpl {
|
||||||
|
|
||||||
|
public static final String NAME = "Pushy";
|
||||||
|
|
||||||
|
public static void downloadFullUpdate(UpdateContext updateContext, ReadableMap options, Promise promise) {
|
||||||
|
String url = options.getString("updateUrl");
|
||||||
|
String hash = options.getString("hash");
|
||||||
|
updateContext.downloadFullUpdate(url, hash, new UpdateContext.DownloadFileListener() {
|
||||||
|
@Override
|
||||||
|
public void onDownloadCompleted(DownloadTaskParams params) {
|
||||||
|
promise.resolve(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDownloadFailed(Throwable error) {
|
||||||
|
promise.reject(error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void downloadAndInstallApk(UpdateContext updateContext, ReadableMap options, 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) {
|
||||||
|
UpdateModule.installApk(params.targetFile);
|
||||||
|
promise.resolve(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDownloadFailed(Throwable error) {
|
||||||
|
promise.reject(error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void installApk(String url) {
|
||||||
|
File toInstall = new File(url);
|
||||||
|
UpdateModule.installApk(toInstall);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void downloadPatchFromPackage(UpdateContext updateContext, ReadableMap options, Promise promise) {
|
||||||
|
String url = options.getString("updateUrl");
|
||||||
|
String hash = options.getString("hash");
|
||||||
|
updateContext.downloadPatchFromApk(url, hash, new UpdateContext.DownloadFileListener() {
|
||||||
|
@Override
|
||||||
|
public void onDownloadCompleted(DownloadTaskParams params) {
|
||||||
|
promise.resolve(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDownloadFailed(Throwable error) {
|
||||||
|
promise.reject(error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void downloadPatchFromPpk(UpdateContext updateContext, ReadableMap options, Promise promise) {
|
||||||
|
try {
|
||||||
|
String url = options.getString("updateUrl");
|
||||||
|
String hash = options.getString("hash");
|
||||||
|
|
||||||
|
String originHash = options.getString("originHash");
|
||||||
|
|
||||||
|
updateContext.downloadPatchFromPpk(url, hash, originHash, new UpdateContext.DownloadFileListener() {
|
||||||
|
@Override
|
||||||
|
public void onDownloadCompleted(DownloadTaskParams params) {
|
||||||
|
promise.resolve(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDownloadFailed(Throwable error) {
|
||||||
|
promise.reject(error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}catch (Exception e){
|
||||||
|
promise.reject("执行报错:"+e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void reloadUpdate(UpdateContext updateContext, ReactApplicationContext mContext, ReadableMap options,Promise promise) {
|
||||||
|
final String hash = options.getString("hash");
|
||||||
|
|
||||||
|
if(hash==null || hash.isEmpty()){
|
||||||
|
promise.reject("hash不能为空");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
UiThreadUtil.runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
try {
|
||||||
|
updateContext.switchVersion(hash);
|
||||||
|
Activity activity = mContext.getCurrentActivity();
|
||||||
|
Application application = activity.getApplication();
|
||||||
|
ReactInstanceManager instanceManager = updateContext.getCustomReactInstanceManager();
|
||||||
|
|
||||||
|
if (instanceManager == null) {
|
||||||
|
instanceManager = ((ReactApplication) application).getReactNativeHost().getReactInstanceManager();
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
JSBundleLoader loader = JSBundleLoader.createFileLoader(UpdateContext.getBundleUrl(application));
|
||||||
|
Field loadField = instanceManager.getClass().getDeclaredField("mBundleLoader");
|
||||||
|
loadField.setAccessible(true);
|
||||||
|
loadField.set(instanceManager, loader);
|
||||||
|
} catch (Throwable err) {
|
||||||
|
promise.reject("pushy:"+err.getMessage());
|
||||||
|
Field jsBundleField = instanceManager.getClass().getDeclaredField("mJSBundleFile");
|
||||||
|
jsBundleField.setAccessible(true);
|
||||||
|
jsBundleField.set(instanceManager, UpdateContext.getBundleUrl(application));
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
instanceManager.recreateReactContextInBackground();
|
||||||
|
promise.resolve(true);
|
||||||
|
} catch (Throwable err) {
|
||||||
|
promise.reject("pushy:"+err.getMessage());
|
||||||
|
activity.recreate();
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Throwable err) {
|
||||||
|
promise.reject("pushy:switchVersion failed"+err.getMessage());
|
||||||
|
Log.e("pushy", "switchVersion failed", err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void setNeedUpdate(UpdateContext updateContext, ReadableMap options,Promise promise) {
|
||||||
|
try {
|
||||||
|
final String hash = options.getString("hash");
|
||||||
|
if(hash==null || hash.isEmpty()){
|
||||||
|
promise.reject("hash不能为空");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
UiThreadUtil.runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
try {
|
||||||
|
updateContext.switchVersion(hash);
|
||||||
|
promise.resolve(true);
|
||||||
|
} catch (Throwable err) {
|
||||||
|
promise.reject("switchVersionLater failed:"+err.getMessage());
|
||||||
|
Log.e("pushy", "switchVersionLater failed", err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}catch (Exception e){
|
||||||
|
promise.reject("执行报错:"+e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void markSuccess(UpdateContext updateContext,Promise promise) {
|
||||||
|
try {
|
||||||
|
UiThreadUtil.runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
updateContext.markSuccess();
|
||||||
|
promise.resolve(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}catch (Exception e){
|
||||||
|
promise.reject("执行报错:"+e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setBlockUpdate(UpdateContext updateContext, ReadableMap options,Promise promise) {
|
||||||
|
try {
|
||||||
|
final int until = options.getInt("until");
|
||||||
|
final String reason = options.getString("reason");
|
||||||
|
UiThreadUtil.runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
updateContext.setBlockUpdate(until, reason);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
promise.resolve(true);
|
||||||
|
}catch (Exception e){
|
||||||
|
promise.reject("执行报错:"+e.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setUuid(UpdateContext updateContext, String uuid, Promise promise) {
|
||||||
|
try {
|
||||||
|
UiThreadUtil.runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
updateContext.setKv("uuid", uuid);
|
||||||
|
promise.resolve(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}catch (Exception e){
|
||||||
|
promise.reject("执行报错:"+e.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean check(String json) {
|
||||||
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
|
try {
|
||||||
|
mapper.readValue(json, Map.class);
|
||||||
|
System.out.println("String can be converted to Map");
|
||||||
|
return true;
|
||||||
|
} catch (IOException e) {
|
||||||
|
System.out.println("String cannot be converted to Map");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void setLocalHashInfo(UpdateContext updateContext, final String hash, final String info, Promise promise) {
|
||||||
|
UiThreadUtil.runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
if(!check(info)){
|
||||||
|
updateContext.setKv("hash_" + hash, info);
|
||||||
|
promise.reject("校验报错:json字符串格式错误");
|
||||||
|
}else {
|
||||||
|
updateContext.setKv("hash_" + hash, info);
|
||||||
|
promise.resolve(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void getLocalHashInfo(UpdateContext updateContext, final String hash, Promise promise) {
|
||||||
|
String value = updateContext.getKv("hash_" + hash);
|
||||||
|
if(check(value)){
|
||||||
|
promise.resolve(value);
|
||||||
|
}else {
|
||||||
|
promise.reject("校验报错:json字符串格式错误");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -1,34 +1,45 @@
|
|||||||
package cn.reactnative.modules.update;
|
package cn.reactnative.modules.update;
|
||||||
|
|
||||||
import com.facebook.react.ReactPackage;
|
import androidx.annotation.Nullable;
|
||||||
import com.facebook.react.bridge.JavaScriptModule;
|
import com.facebook.react.TurboReactPackage;
|
||||||
import com.facebook.react.bridge.NativeModule;
|
import com.facebook.react.bridge.NativeModule;
|
||||||
import com.facebook.react.bridge.ReactApplicationContext;
|
import com.facebook.react.bridge.ReactApplicationContext;
|
||||||
import com.facebook.react.uimanager.ViewManager;
|
import com.facebook.react.module.model.ReactModuleInfo;
|
||||||
|
import com.facebook.react.module.model.ReactModuleInfoProvider;
|
||||||
import java.util.Arrays;
|
import java.util.HashMap;
|
||||||
import java.util.Collections;
|
import java.util.Map;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by tdzl2003 on 3/31/16.
|
* Created by tdzl2003 on 3/31/16.
|
||||||
*/
|
*/
|
||||||
public class UpdatePackage implements ReactPackage {
|
public class UpdatePackage extends TurboReactPackage {
|
||||||
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
|
public NativeModule getModule(String name, ReactApplicationContext reactContext) {
|
||||||
return Arrays.asList(new NativeModule[]{
|
if (name.equals(UpdateModuleImpl.NAME)) {
|
||||||
// Modules from third-party
|
return new UpdateModule(reactContext);
|
||||||
new UpdateModule(reactContext),
|
} else {
|
||||||
});
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Class<? extends JavaScriptModule>> createJSModules() {
|
|
||||||
return Collections.emptyList();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
|
public ReactModuleInfoProvider getReactModuleInfoProvider() {
|
||||||
return Collections.emptyList();
|
return () -> {
|
||||||
|
final Map<String, ReactModuleInfo> moduleInfos = new HashMap<>();
|
||||||
|
boolean isTurboModule = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
|
||||||
|
moduleInfos.put(
|
||||||
|
UpdateModuleImpl.NAME,
|
||||||
|
new ReactModuleInfo(
|
||||||
|
UpdateModuleImpl.NAME,
|
||||||
|
UpdateModuleImpl.NAME,
|
||||||
|
false, // canOverrideExistingModule
|
||||||
|
false, // needsEagerInit
|
||||||
|
true, // hasConstants
|
||||||
|
false, // isCxxModule
|
||||||
|
isTurboModule // isTurboModule
|
||||||
|
));
|
||||||
|
return moduleInfos;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -0,0 +1,147 @@
|
|||||||
|
package cn.reactnative.modules.update;
|
||||||
|
|
||||||
|
import static androidx.core.content.FileProvider.getUriForFile;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.net.Uri;
|
||||||
|
import android.os.Build;
|
||||||
|
import com.facebook.react.bridge.Promise;
|
||||||
|
import com.facebook.react.bridge.ReactApplicationContext;
|
||||||
|
import com.facebook.react.bridge.ReactContext;
|
||||||
|
import com.facebook.react.bridge.ReadableMap;
|
||||||
|
import com.facebook.react.bridge.WritableMap;
|
||||||
|
import com.facebook.react.modules.core.DeviceEventManagerModule;
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class UpdateModule extends NativeUpdateSpec {
|
||||||
|
UpdateContext updateContext;
|
||||||
|
public static ReactApplicationContext mContext;
|
||||||
|
public UpdateModule(ReactApplicationContext reactContext, UpdateContext updateContext) {
|
||||||
|
super(reactContext);
|
||||||
|
this.updateContext = updateContext;
|
||||||
|
mContext = reactContext;
|
||||||
|
}
|
||||||
|
|
||||||
|
public UpdateModule(ReactApplicationContext reactContext) {
|
||||||
|
this(reactContext, new UpdateContext(reactContext.getApplicationContext()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Map<String, Object> getTypedExportedConstants() {
|
||||||
|
final Map<String, Object> constants = new HashMap<>();
|
||||||
|
constants.put("downloadRootDir", updateContext.getRootDir());
|
||||||
|
constants.put("packageVersion", updateContext.getPackageVersion());
|
||||||
|
constants.put("currentVersion", updateContext.getCurrentVersion());
|
||||||
|
constants.put("buildTime", updateContext.getBuildTime());
|
||||||
|
constants.put("isUsingBundleUrl", updateContext.getIsUsingBundleUrl());
|
||||||
|
boolean isFirstTime = updateContext.isFirstTime();
|
||||||
|
constants.put("isFirstTime", isFirstTime);
|
||||||
|
if (isFirstTime) {
|
||||||
|
updateContext.clearFirstTime();
|
||||||
|
}
|
||||||
|
String rolledBackVersion = updateContext.rolledBackVersion();
|
||||||
|
constants.put("rolledBackVersion", rolledBackVersion);
|
||||||
|
if (rolledBackVersion != null) {
|
||||||
|
updateContext.clearRollbackMark();
|
||||||
|
}
|
||||||
|
constants.put("blockUpdate", updateContext.getBlockUpdate());
|
||||||
|
constants.put("uuid", updateContext.getKv("uuid"));
|
||||||
|
return constants;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return UpdateModuleImpl.NAME;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void downloadFullUpdate(ReadableMap options, final Promise promise) {
|
||||||
|
UpdateModuleImpl.downloadFullUpdate(this.updateContext,options,promise);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void downloadAndInstallApk(ReadableMap options, final Promise promise) {
|
||||||
|
UpdateModuleImpl.downloadAndInstallApk(this.updateContext,options,promise);
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
} 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);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void downloadPatchFromPackage(ReadableMap options, final Promise promise) {
|
||||||
|
UpdateModuleImpl.downloadPatchFromPackage(updateContext,options,promise);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void downloadPatchFromPpk(ReadableMap options, final Promise promise) {
|
||||||
|
UpdateModuleImpl.downloadPatchFromPpk(updateContext,options,promise);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void reloadUpdate(ReadableMap options,Promise promise) {
|
||||||
|
UpdateModuleImpl.reloadUpdate(updateContext, mContext, options,promise);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setNeedUpdate(ReadableMap options,Promise promise) {
|
||||||
|
UpdateModuleImpl.setNeedUpdate(updateContext, options,promise);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void markSuccess(Promise promise) {
|
||||||
|
UpdateModuleImpl.markSuccess(updateContext,promise);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setBlockUpdate(ReadableMap options,Promise promise) {
|
||||||
|
UpdateModuleImpl.setBlockUpdate(updateContext,options,promise);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setUuid(final String uuid, Promise promise) {
|
||||||
|
UpdateModuleImpl.setUuid(updateContext,uuid,promise);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setLocalHashInfo(final String hash, final String info, final Promise promise) {
|
||||||
|
UpdateModuleImpl.setLocalHashInfo(updateContext,hash,info,promise);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getLocalHashInfo(final String hash, final Promise promise) {
|
||||||
|
UpdateModuleImpl.getLocalHashInfo(updateContext,hash,promise);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addListener(String eventName) {
|
||||||
|
// Set up any upstream listeners or background tasks as necessary
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void removeListeners(double count) {
|
||||||
|
// Remove upstream listeners, stop unnecessary background tasks
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* 发送事件*/
|
||||||
|
public static void sendEvent(String eventName, WritableMap params) {
|
||||||
|
((ReactContext) mContext).getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class).emit(eventName,
|
||||||
|
params);
|
||||||
|
}
|
||||||
|
}
|
@@ -66,7 +66,7 @@ public class UpdateModule extends ReactContextBaseJavaModule {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return "RCTPushy";
|
return UpdateModuleImpl.NAME;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ReactMethod
|
@ReactMethod
|
||||||
@@ -169,7 +169,7 @@ public class UpdateModule extends ReactContextBaseJavaModule {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ReactMethod
|
@ReactMethod
|
||||||
public void reloadUpdate(ReadableMap options) {
|
public void reloadUpdate(ReadableMap options, final Promise promise) {
|
||||||
final String hash = options.getString("hash");
|
final String hash = options.getString("hash");
|
||||||
|
|
||||||
UiThreadUtil.runOnUiThread(new Runnable() {
|
UiThreadUtil.runOnUiThread(new Runnable() {
|
||||||
@@ -191,6 +191,7 @@ public class UpdateModule extends ReactContextBaseJavaModule {
|
|||||||
loadField.setAccessible(true);
|
loadField.setAccessible(true);
|
||||||
loadField.set(instanceManager, loader);
|
loadField.set(instanceManager, loader);
|
||||||
} catch (Throwable err) {
|
} catch (Throwable err) {
|
||||||
|
promise.reject(err);
|
||||||
Field jsBundleField = instanceManager.getClass().getDeclaredField("mJSBundleFile");
|
Field jsBundleField = instanceManager.getClass().getDeclaredField("mJSBundleFile");
|
||||||
jsBundleField.setAccessible(true);
|
jsBundleField.setAccessible(true);
|
||||||
jsBundleField.set(instanceManager, UpdateContext.getBundleUrl(application));
|
jsBundleField.set(instanceManager, UpdateContext.getBundleUrl(application));
|
||||||
@@ -198,11 +199,14 @@ public class UpdateModule extends ReactContextBaseJavaModule {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
instanceManager.recreateReactContextInBackground();
|
instanceManager.recreateReactContextInBackground();
|
||||||
|
promise.resolve(null);
|
||||||
} catch (Throwable err) {
|
} catch (Throwable err) {
|
||||||
activity.recreate();
|
activity.recreate();
|
||||||
|
promise.reject(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (Throwable err) {
|
} catch (Throwable err) {
|
||||||
|
promise.reject(err);
|
||||||
Log.e("pushy", "switchVersion failed", err);
|
Log.e("pushy", "switchVersion failed", err);
|
||||||
}
|
}
|
||||||
}
|
}
|
12
e2e/jest.config.js
Normal file
12
e2e/jest.config.js
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
/** @type {import('@jest/types').Config.InitialOptions} */
|
||||||
|
module.exports = {
|
||||||
|
rootDir: '..',
|
||||||
|
testMatch: ['<rootDir>/e2e/**/*.test.js'],
|
||||||
|
testTimeout: 120000,
|
||||||
|
maxWorkers: 1,
|
||||||
|
globalSetup: 'detox/runners/jest/globalSetup',
|
||||||
|
globalTeardown: 'detox/runners/jest/globalTeardown',
|
||||||
|
reporters: ['detox/runners/jest/reporter'],
|
||||||
|
testEnvironment: 'detox/runners/jest/testEnvironment',
|
||||||
|
verbose: true,
|
||||||
|
};
|
23
e2e/starter.test.js
Normal file
23
e2e/starter.test.js
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
describe('Example', () => {
|
||||||
|
beforeAll(async () => {
|
||||||
|
await device.launchApp();
|
||||||
|
});
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
await device.reloadReactNative();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should have welcome screen', async () => {
|
||||||
|
await expect(element(by.id('welcome'))).toBeVisible();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should show hello screen after tap', async () => {
|
||||||
|
await element(by.id('hello_button')).tap();
|
||||||
|
await expect(element(by.text('Hello!!!'))).toBeVisible();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should show world screen after tap', async () => {
|
||||||
|
await element(by.id('world_button')).tap();
|
||||||
|
await expect(element(by.text('World!!!'))).toBeVisible();
|
||||||
|
});
|
||||||
|
});
|
@@ -1,7 +1,10 @@
|
|||||||
#import "RCTPushy.h"
|
#import "RCTPushy.h"
|
||||||
#import "RCTPushyDownloader.h"
|
#import "RCTPushyDownloader.h"
|
||||||
#import "RCTPushyManager.h"
|
#import "RCTPushyManager.h"
|
||||||
|
// Thanks to this guard, we won't import this header when we build for the old architecture.
|
||||||
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
|
#import "RCTPushySpec.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#import <React/RCTConvert.h>
|
#import <React/RCTConvert.h>
|
||||||
#import <React/RCTLog.h>
|
#import <React/RCTLog.h>
|
||||||
@@ -189,29 +192,53 @@ RCT_EXPORT_MODULE(RCTPushy);
|
|||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
RCT_EXPORT_METHOD(setBlockUpdate:(NSDictionary *)options)
|
RCT_EXPORT_METHOD(setBlockUpdate:(NSDictionary *)options
|
||||||
|
resolver:(RCTPromiseResolveBlock)resolve
|
||||||
|
rejecter:(RCTPromiseRejectBlock)reject)
|
||||||
{
|
{
|
||||||
// NSMutableDictionary *blockUpdateInfo = [NSMutableDictionary new];
|
// NSMutableDictionary *blockUpdateInfo = [NSMutableDictionary new];
|
||||||
// blockUpdateInfo[@"reason"] = options[@"reason"];
|
// blockUpdateInfo[@"reason"] = options[@"reason"];
|
||||||
// blockUpdateInfo[@"until"] = options[@"until"];
|
// blockUpdateInfo[@"until"] = options[@"until"];
|
||||||
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
@try {
|
||||||
[defaults setObject:options forKey:keyBlockUpdate];
|
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||||
[defaults synchronize];
|
[defaults setObject:options forKey:keyBlockUpdate];
|
||||||
|
[defaults synchronize];
|
||||||
|
resolve(@true);
|
||||||
|
}
|
||||||
|
@catch (NSException *exception) {
|
||||||
|
reject(@"执行报错", nil, nil);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RCT_EXPORT_METHOD(setUuid:(NSString *)uuid)
|
RCT_EXPORT_METHOD(setUuid:(NSString *)uuid resolver:(RCTPromiseResolveBlock)resolve
|
||||||
|
rejecter:(RCTPromiseRejectBlock)reject)
|
||||||
{
|
{
|
||||||
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
@try {
|
||||||
[defaults setObject:uuid forKey:keyUuid];
|
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||||
[defaults synchronize];
|
[defaults setObject:uuid forKey:keyUuid];
|
||||||
|
[defaults synchronize];
|
||||||
|
resolve(@true);
|
||||||
|
}
|
||||||
|
@catch (NSException *exception) {
|
||||||
|
reject(@"json格式校验报错", nil, nil);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RCT_EXPORT_METHOD(setLocalHashInfo:(NSString *)hash
|
RCT_EXPORT_METHOD(setLocalHashInfo:(NSString *)hash
|
||||||
value:(NSString *)value)
|
value:(NSString *)value resolver:(RCTPromiseResolveBlock)resolve
|
||||||
|
rejecter:(RCTPromiseRejectBlock)reject)
|
||||||
{
|
{
|
||||||
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
NSData *data = [value dataUsingEncoding:NSUTF8StringEncoding];
|
||||||
[defaults setObject:value forKey:[keyHashInfo stringByAppendingString:hash]];
|
NSError *error = nil;
|
||||||
[defaults synchronize];
|
id object = [NSJSONSerialization JSONObjectWithData:data options:0 error:&error];
|
||||||
|
if (object && [object isKindOfClass:[NSDictionary class]]) {
|
||||||
|
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||||
|
[defaults setObject:value forKey:[keyHashInfo stringByAppendingString:hash]];
|
||||||
|
[defaults synchronize];
|
||||||
|
resolve(@true);
|
||||||
|
} else {
|
||||||
|
reject(@"json格式校验报错", nil, nil);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -266,7 +293,9 @@ RCT_EXPORT_METHOD(downloadPatchFromPpk:(NSDictionary *)options
|
|||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
RCT_EXPORT_METHOD(setNeedUpdate:(NSDictionary *)options)
|
RCT_EXPORT_METHOD(setNeedUpdate:(NSDictionary *)options
|
||||||
|
resolver:(RCTPromiseResolveBlock)resolve
|
||||||
|
rejecter:(RCTPromiseRejectBlock)reject)
|
||||||
{
|
{
|
||||||
NSString *hash = options[@"hash"];
|
NSString *hash = options[@"hash"];
|
||||||
|
|
||||||
@@ -287,45 +316,66 @@ RCT_EXPORT_METHOD(setNeedUpdate:(NSDictionary *)options)
|
|||||||
[defaults setObject:newInfo forKey:keyPushyInfo];
|
[defaults setObject:newInfo forKey:keyPushyInfo];
|
||||||
|
|
||||||
[defaults synchronize];
|
[defaults synchronize];
|
||||||
|
resolve(@true);
|
||||||
|
}else{
|
||||||
|
reject(@"执行报错", nil, nil);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RCT_EXPORT_METHOD(reloadUpdate:(NSDictionary *)options)
|
RCT_EXPORT_METHOD(reloadUpdate:(NSDictionary *)options
|
||||||
|
resolver:(RCTPromiseResolveBlock)resolve
|
||||||
|
rejecter:(RCTPromiseRejectBlock)reject)
|
||||||
{
|
{
|
||||||
NSString *hash = options[@"hash"];
|
@try {
|
||||||
|
NSString *hash = options[@"hash"];
|
||||||
if (hash.length) {
|
if (hash.length) {
|
||||||
[self setNeedUpdate:options];
|
[self setNeedUpdate:options resolver:resolve rejecter:reject];
|
||||||
|
|
||||||
// reload 0.62+
|
// reload 0.62+
|
||||||
// RCTReloadCommandSetBundleURL([[self class] bundleURL]);
|
// RCTReloadCommandSetBundleURL([[self class] bundleURL]);
|
||||||
// RCTTriggerReloadCommandListeners(@"pushy reload");
|
// RCTTriggerReloadCommandListeners(@"pushy reload");
|
||||||
|
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
[self.bridge setValue:[[self class] bundleURL] forKey:@"bundleURL"];
|
[self.bridge setValue:[[self class] bundleURL] forKey:@"bundleURL"];
|
||||||
[self.bridge reload];
|
[self.bridge reload];
|
||||||
});
|
});
|
||||||
|
resolve(@true);
|
||||||
|
}else{
|
||||||
|
reject(@"执行报错", nil, nil);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@catch (NSException *exception) {
|
||||||
|
reject(@"执行报错", nil, nil);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RCT_EXPORT_METHOD(markSuccess)
|
RCT_EXPORT_METHOD(markSuccess:
|
||||||
|
resolver:(RCTPromiseResolveBlock)resolve
|
||||||
|
rejecter:(RCTPromiseRejectBlock)reject)
|
||||||
{
|
{
|
||||||
// up package info
|
|
||||||
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
|
||||||
NSMutableDictionary *pushyInfo = [[NSMutableDictionary alloc] initWithDictionary:[defaults objectForKey:keyPushyInfo]];
|
|
||||||
[pushyInfo setObject:@(NO) forKey:paramIsFirstTime];
|
|
||||||
[pushyInfo setObject:@(YES) forKey:paramIsFirstLoadOk];
|
|
||||||
|
|
||||||
NSString *lastVersion = pushyInfo[paramLastVersion];
|
@try {
|
||||||
NSString *curVersion = pushyInfo[paramCurrentVersion];
|
// up package info
|
||||||
if (lastVersion != nil && ![lastVersion isEqualToString:curVersion]) {
|
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||||
[pushyInfo removeObjectForKey:[keyHashInfo stringByAppendingString:lastVersion]];
|
NSMutableDictionary *pushyInfo = [[NSMutableDictionary alloc] initWithDictionary:[defaults objectForKey:keyPushyInfo]];
|
||||||
|
[pushyInfo setObject:@(NO) forKey:paramIsFirstTime];
|
||||||
|
[pushyInfo setObject:@(YES) forKey:paramIsFirstLoadOk];
|
||||||
|
|
||||||
|
NSString *lastVersion = pushyInfo[paramLastVersion];
|
||||||
|
NSString *curVersion = pushyInfo[paramCurrentVersion];
|
||||||
|
if (lastVersion != nil && ![lastVersion isEqualToString:curVersion]) {
|
||||||
|
[pushyInfo removeObjectForKey:[keyHashInfo stringByAppendingString:lastVersion]];
|
||||||
|
}
|
||||||
|
[defaults setObject:pushyInfo forKey:keyPushyInfo];
|
||||||
|
[defaults synchronize];
|
||||||
|
|
||||||
|
// clear other package dir
|
||||||
|
[self clearInvalidFiles];
|
||||||
|
resolve(@true);
|
||||||
|
}
|
||||||
|
@catch (NSException *exception) {
|
||||||
|
reject(@"执行报错", nil, nil);
|
||||||
}
|
}
|
||||||
[defaults setObject:pushyInfo forKey:keyPushyInfo];
|
|
||||||
[defaults synchronize];
|
|
||||||
|
|
||||||
// clear other package dir
|
|
||||||
[self clearInvalidFiles];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -351,6 +401,19 @@ RCT_EXPORT_METHOD(markSuccess)
|
|||||||
// Remove upstream listeners, stop unnecessary background tasks
|
// Remove upstream listeners, stop unnecessary background tasks
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (BOOL) isBlankString:(NSString *)string {
|
||||||
|
if (string == nil || string == NULL) {
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
if ([string isKindOfClass:[NSNull class]]) {
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
if ([[string stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] length]==0) {
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
- (void)doPushy:(PushyType)type options:(NSDictionary *)options callback:(void (^)(NSError *error))callback
|
- (void)doPushy:(PushyType)type options:(NSDictionary *)options callback:(void (^)(NSError *error))callback
|
||||||
{
|
{
|
||||||
@@ -362,7 +425,7 @@ RCT_EXPORT_METHOD(markSuccess)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
NSString *originHash = [RCTConvert NSString:options[@"originHash"]];
|
NSString *originHash = [RCTConvert NSString:options[@"originHash"]];
|
||||||
if (type == PushyTypePatchFromPpk && originHash <= 0) {
|
if (type == PushyTypePatchFromPpk && [self isBlankString:originHash]) {
|
||||||
callback([self errorWithMessage:ERROR_OPTIONS]);
|
callback([self errorWithMessage:ERROR_OPTIONS]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -562,4 +625,13 @@ RCT_EXPORT_METHOD(markSuccess)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Thanks to this guard, we won't compile this code when we build for the old architecture.
|
||||||
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
|
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
|
||||||
|
(const facebook::react::ObjCTurboModule::InitParams &)params
|
||||||
|
{
|
||||||
|
return std::make_shared<facebook::react::NativeUpdateSpecJSI>(params);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
@end
|
@end
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user