Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
e9ae173
feat(background-thread): add SharedBridge JSI HostObject for cross-ru…
huhuanming Mar 21, 2026
9747116
feat(background-thread): implement Android with second ReactHost and …
huhuanming Mar 21, 2026
5c27e6f
refactor(background-thread): restructure Android to match iOS archite…
huhuanming Mar 22, 2026
ca50a26
feat(background-thread): replace SharedBridge with SharedStore + Shar…
huhuanming Mar 22, 2026
2562371
collapse identical consecutive messages into [N repeat]
huhuanming Mar 30, 2026
16ee6a4
commit
huhuanming Mar 30, 2026
ebed0cb
feat(background-thread): improve bridge messaging and apply react-nat…
huhuanming Mar 30, 2026
16d68ae
feat(shared-rpc): add onWrite cross-runtime notification, remove lega…
huhuanming Mar 30, 2026
9e23499
fix(shared-rpc): rename RuntimeExecutor to RPCRuntimeExecutor to avoi…
huhuanming Mar 30, 2026
43f85ea
fix(shared-rpc): prevent crash on JS reload by deduplicating listener…
huhuanming Mar 30, 2026
92ce34a
fix(shared-rpc): leak stale jsi::Function callback on reload to preve…
huhuanming Mar 30, 2026
700ea1b
fix: initialize Android shared bridge at app startup
huhuanming Mar 30, 2026
e10c79c
fix: stabilize background thread runtime init
huhuanming Mar 30, 2026
6556814
Update package.json
huhuanming Mar 30, 2026
e90945b
1.1.47
huhuanming Mar 30, 2026
205d051
feat: support background bundle pair bootstrap
huhuanming Mar 30, 2026
d393581
1.1.48
huhuanming Mar 30, 2026
3f8756d
feat: add registerSegmentInBackground for late HBC segment loading (P…
huhuanming Mar 31, 2026
827b4ba
feat: expose loadSegmentInBackground from TurboModule API
huhuanming Apr 1, 2026
6652edd
feat: add react-native-split-bundle-loader TurboModule
huhuanming Apr 1, 2026
f33a914
1.1.49
huhuanming Apr 1, 2026
ac4cafd
feat: enhance split-bundle-loader with bridgeless support and robustn…
huhuanming Apr 1, 2026
9d37806
fix: resolve Android registerSegmentInBackground race condition
huhuanming Apr 1, 2026
1088bfc
feat: add resolveSegmentPath API and path traversal protection
huhuanming Apr 1, 2026
19a0e10
1.1.51
huhuanming Apr 1, 2026
bc8ed7d
feat: add split-bundle common+entry loading strategy
huhuanming Apr 2, 2026
6a07497
1.1.52
huhuanming Apr 2, 2026
68ad1ff
feat: add comprehensive timing logs for three-bundle split verification
huhuanming Apr 2, 2026
b406d7c
feat: add split-bundle timing instrumentation and update PGP public key
huhuanming Apr 2, 2026
b650153
1.1.53
huhuanming Apr 2, 2026
16cbb2c
1.1.54
huhuanming Apr 2, 2026
ed223fb
feat: add TurboModule replacements for legacy bridge modules
huhuanming Apr 2, 2026
5c5384b
chore: bump all packages to 1.1.55
huhuanming Apr 2, 2026
bad5ca5
feat: add Android TurboModule implementations + fix tcp-socket types
huhuanming Apr 2, 2026
cc57b52
chore: bump all packages to 1.1.56
huhuanming Apr 2, 2026
1208b11
fix: add missing release scripts for cloud-fs, ping, zip-archive
huhuanming Apr 2, 2026
c2f878f
chore: bump all packages to 1.1.57
huhuanming Apr 2, 2026
dbb0abb
fix: set cloud-fs version to 3.0.0 (npm has 2.6.5, can't publish lower)
huhuanming Apr 2, 2026
69bdab6
chore: bump all packages to 1.1.58
huhuanming Apr 2, 2026
369f39e
fix: correct TcpSocket header import to match codegenConfig name
huhuanming Apr 3, 2026
d92f0a4
chore: bump all packages to 1.1.59
huhuanming Apr 3, 2026
f7761c2
fix: correct reflection class name for BundleUpdateStore in SplitBund…
huhuanming Apr 3, 2026
31b6be4
fix: correct codegen class names to match TS spec file names
huhuanming Apr 3, 2026
8c0aab9
chore: bump all packages to 1.1.60
huhuanming Apr 3, 2026
4acfaba
chore: bump all packages to 3.0.4
huhuanming Apr 3, 2026
8f2e592
fix: fix compilation errors in ping, pbkdf2, network-info
huhuanming Apr 3, 2026
d5c7863
chore: bump all packages to 1.1.61
huhuanming Apr 3, 2026
da8a769
feat(async-storage): add AsyncStorageStatic compatibility layer
huhuanming Apr 3, 2026
7e100d2
fix: align Android implementations with upstream originals
huhuanming Apr 3, 2026
972ff8b
chore: bump all packages
huhuanming Apr 3, 2026
a2b898d
fix: sync aes-crypto patch changes - use Hex encoding for all I/O
huhuanming Apr 3, 2026
854ee5b
chore: bump all packages
huhuanming Apr 3, 2026
a100443
fix: add CFDataRef cast in DnsLookup.mm
huhuanming Apr 3, 2026
82cd10a
fix: iOS compilation fixes verified with local build
huhuanming Apr 3, 2026
7029299
chore: bump all packages
huhuanming Apr 3, 2026
128799f
chore: gitignore lib/ build output and exclude .map from npm publish
huhuanming Apr 3, 2026
66995d8
3.0.11
huhuanming Apr 3, 2026
ff6be4c
chore: bump all packages to 3.0.12
huhuanming Apr 3, 2026
18d93ca
add web NativeAsyncStorage
huhuanming Apr 7, 2026
185c152
3.0.13
huhuanming Apr 7, 2026
69e48c1
fix: resolve type errors in web NativeAsyncStorage
huhuanming Apr 7, 2026
bb6a14d
chore: patch bump workspaces and fix async-storage module files
huhuanming Apr 9, 2026
3ef80d2
feat: align react-native-cloud-fs types and native implementations wi…
huhuanming Apr 9, 2026
81de6e3
3.0.15
huhuanming Apr 9, 2026
975245e
Update RNCAsyncStorageModule.kt
huhuanming Apr 9, 2026
8b35bed
3.0.16
huhuanming Apr 9, 2026
8cc2257
fix specs
huhuanming Apr 9, 2026
2bdbdfc
fix specs
huhuanming Apr 9, 2026
22fcb2a
fix specs
huhuanming Apr 9, 2026
40ddd41
3.0.17
huhuanming Apr 9, 2026
718498d
Update cpp-adapter.cpp
huhuanming Apr 10, 2026
a234170
Update cpp-adapter.cpp
huhuanming Apr 10, 2026
f56d3f0
Update cpp-adapter.cpp
huhuanming Apr 10, 2026
90c9801
3.0.18
huhuanming Apr 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,7 @@ test-report.html
# Ignore tamagui config file
.tamagui
scripts/nitro-view/template/android/.gradle

# generated by react-native-builder-bob
native-modules/*/lib/
native-views/*/lib/
34 changes: 34 additions & 0 deletions .yarn/patches/react-native-npm-0.83.0-577d0f2d83.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
diff --git a/third-party-podspecs/RCT-Folly.podspec b/third-party-podspecs/RCT-Folly.podspec
index 8852179b6ce2ef6ae64e0239edb2594925ff8bc1..040c4f0ca82e6a7342d5b3ed54e556431e5853d2 100644
--- a/third-party-podspecs/RCT-Folly.podspec
+++ b/third-party-podspecs/RCT-Folly.podspec
@@ -25,7 +25,7 @@ Pod::Spec.new do |spec|
spec.dependency "DoubleConversion"
spec.dependency "glog"
spec.dependency "fast_float", "8.0.0"
- spec.dependency "fmt", "11.0.2"
+ spec.dependency "fmt", "12.1.0"
spec.compiler_flags = '-Wno-documentation -faligned-new'
spec.source_files = 'folly/String.cpp',
'folly/Conv.cpp',
diff --git a/third-party-podspecs/fmt.podspec b/third-party-podspecs/fmt.podspec
index 2f38990e226c13f483aaf1b986302d4094243814..a40c5755e049974e98a4038c177661d2bdc5681f 100644
--- a/third-party-podspecs/fmt.podspec
+++ b/third-party-podspecs/fmt.podspec
@@ -8,14 +8,14 @@ fmt_git_url = fmt_config[:git]

Pod::Spec.new do |spec|
spec.name = "fmt"
- spec.version = "11.0.2"
+ spec.version = "12.1.0"
spec.license = { :type => "MIT" }
spec.homepage = "https://github.com/fmtlib/fmt"
spec.summary = "{fmt} is an open-source formatting library for C++. It can be used as a safe and fast alternative to (s)printf and iostreams."
spec.authors = "The fmt contributors"
spec.source = {
:git => fmt_git_url,
- :tag => "11.0.2"
+ :tag => "12.1.0"
}
spec.pod_target_xcconfig = {
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
126 changes: 126 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,132 @@

All notable changes to this project will be documented in this file.

## [3.0.4] - 2026-04-03

### Bug Fixes
- **split-bundle-loader**: Fix stale reflection class name for `BundleUpdateStore` in Android `getOtaBundlePath()` — updated from `expo.modules.onekeybundleupdate.BundleUpdateStore` to `com.margelo.nitro.reactnativebundleupdate.BundleUpdateStoreAndroid`
- **native-logger**: Fix dedup logic suppressing error logs — comparison now includes level, tag, and message instead of message-only
- **background-thread**: Fix JNI GlobalRef leak on each `nativeInstallSharedBridge` call — wrap in `shared_ptr` with custom deleter
- **background-thread**: Fix `SharedRPC::reset()` crash from destroying `jsi::Function` on wrong thread — use intentional leak pattern
- **background-thread**: Fix `nativeDestroy` not resetting `SharedStore`, leaving stale data across restarts
- Correct codegen class names to match TS spec file names

### Chores
- Align all package versions to 3.x line (cloud-fs cannot use 1.x since npm already has 2.6.5)
- Bump all packages to 3.0.4

## [1.1.59] - 2026-04-03

### Bug Fixes
- **tcp-socket**: Correct header import to match codegenConfig name

### Chores
- Bump all packages to 1.1.59

## [1.1.58] - 2026-04-03

### Bug Fixes
- **cloud-fs**: Set version to 3.0.0 (npm already has 2.6.5, cannot publish lower)

### Chores
- Bump all packages to 1.1.58

## [1.1.57] - 2026-04-03

### Bug Fixes
- Add missing release scripts for cloud-fs, ping, zip-archive

### Chores
- Bump all packages to 1.1.57

## [1.1.56] - 2026-04-03

### Features
- **aes-crypto / async-storage / cloud-fs / dns-lookup / network-info / ping / tcp-socket / zip-archive**: Add Android TurboModule implementations for legacy bridge module replacements
- **tcp-socket**: Fix type definitions

### Chores
- Bump all packages to 1.1.56

## [1.1.55] - 2026-04-03

### Features
- **aes-crypto / async-storage / cloud-fs / dns-lookup / network-info / ping / tcp-socket / zip-archive**: Add TurboModule replacements for legacy React Native bridge modules (iOS + JS)

### Chores
- Bump all packages to 1.1.55

## [1.1.54] - 2026-04-02

### Chores
- Bump all packages to 1.1.54

## [1.1.53] - 2026-04-02

### Features
- **split-bundle-loader**: Add split-bundle timing instrumentation and update PGP public key
- **split-bundle-loader**: Add comprehensive timing logs for three-bundle split verification

### Chores
- Bump all packages to 1.1.53

## [1.1.52] - 2026-04-02

### Features
- **background-thread**: Add split-bundle common+entry loading strategy for background runtime

### Chores
- Bump all packages to 1.1.52

## [1.1.51] - 2026-04-01

### Features
- **split-bundle-loader**: Add `resolveSegmentPath` API and path traversal protection

### Bug Fixes
- **split-bundle-loader**: Resolve Android `registerSegmentInBackground` race condition
- **split-bundle-loader**: Enhance bridgeless support and robustness improvements

### Chores
- Bump all packages to 1.1.51

## [1.1.49] - 2026-04-01

### Features
- **split-bundle-loader**: Add `react-native-split-bundle-loader` TurboModule with `getRuntimeBundleContext` and `loadSegment` APIs
- **split-bundle-loader**: Expose `loadSegmentInBackground` from TurboModule API
- **bundle-update**: Add `registerSegmentInBackground` for late HBC segment loading

### Chores
- Bump all packages to 1.1.49

## [1.1.48] - 2026-03-31

### Features
- **bundle-update**: Support background bundle pair bootstrap — add `getBackgroundJsBundlePath`, metadata validation for `requiresBackgroundBundle` and `backgroundProtocolVersion`, and bundle pair compatibility checks

### Chores
- Bump all packages to 1.1.48

## [1.1.47] - 2026-03-31

### Features
- **background-thread**: Add SharedBridge JSI HostObject for cross-runtime data transfer between main and background JS runtimes
- **background-thread**: Implement Android background runtime with second ReactHost and SharedBridge
- **background-thread**: Replace SharedBridge with SharedStore + SharedRPC architecture
- **background-thread**: Add onWrite cross-runtime notification, remove legacy messaging
- **native-logger**: Add dedup for identical consecutive log messages

### Bug Fixes
- **background-thread**: Stabilize background thread runtime initialization
- **background-thread**: Initialize Android shared bridge at app startup
- **shared-rpc**: Rename `RuntimeExecutor` to `RPCRuntimeExecutor` to avoid React Native conflict
- **shared-rpc**: Prevent crash on JS reload by deduplicating listeners with runtimeId
- **shared-rpc**: Leak stale `jsi::Function` callback on reload to prevent crash

### Chores
- Bump all packages to 1.1.47

## [1.1.46] - 2026-03-19

### Bug Fixes
Expand Down
1 change: 1 addition & 0 deletions example/react-native/.ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.4.4
141 changes: 141 additions & 0 deletions example/react-native/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.8)
activesupport (7.2.3.1)
base64
benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1, < 6)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
addressable (2.8.9)
public_suffix (>= 2.0.2, < 8.0)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
atomos (0.1.3)
base64 (0.3.0)
benchmark (0.5.0)
bigdecimal (4.1.0)
claide (1.1.0)
cocoapods (1.15.2)
addressable (~> 2.8)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.15.2)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 2.1, < 3.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.6.0, < 2.0)
cocoapods-try (>= 1.1.0, < 2.0)
colored2 (~> 3.1)
escape (~> 0.0.4)
fourflusher (>= 2.3.0, < 3.0)
gh_inspector (~> 1.0)
molinillo (~> 0.8.0)
nap (~> 1.0)
ruby-macho (>= 2.3.0, < 3.0)
xcodeproj (>= 1.23.0, < 2.0)
cocoapods-core (1.15.2)
activesupport (>= 5.0, < 8)
addressable (~> 2.8)
algoliasearch (~> 1.0)
concurrent-ruby (~> 1.1)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
netrc (~> 0.11)
public_suffix (~> 4.0)
typhoeus (~> 1.0)
cocoapods-deintegrate (1.0.5)
cocoapods-downloader (2.1)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.1)
cocoapods-trunk (1.6.0)
nap (>= 0.8, < 2.0)
netrc (~> 0.11)
cocoapods-try (1.2.0)
colored2 (3.1.2)
concurrent-ruby (1.3.3)
connection_pool (3.0.2)
drb (2.2.3)
escape (0.0.4)
ethon (0.18.0)
ffi (>= 1.15.0)
logger
ffi (1.17.4)
ffi (1.17.4-aarch64-linux-gnu)
ffi (1.17.4-aarch64-linux-musl)
ffi (1.17.4-arm-linux-gnu)
ffi (1.17.4-arm-linux-musl)
ffi (1.17.4-arm64-darwin)
ffi (1.17.4-x86-linux-gnu)
ffi (1.17.4-x86-linux-musl)
ffi (1.17.4-x86_64-darwin)
ffi (1.17.4-x86_64-linux-gnu)
ffi (1.17.4-x86_64-linux-musl)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
httpclient (2.9.0)
mutex_m
i18n (1.14.8)
concurrent-ruby (~> 1.0)
json (2.19.3)
logger (1.7.0)
minitest (5.27.0)
molinillo (0.8.0)
mutex_m (0.3.0)
nanaimo (0.3.0)
nap (1.1.0)
netrc (0.11.0)
public_suffix (4.0.7)
rexml (3.4.4)
ruby-macho (2.5.1)
securerandom (0.4.1)
typhoeus (1.6.0)
ethon (>= 0.18.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
xcodeproj (1.25.1)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (>= 3.3.6, < 4.0)

PLATFORMS
aarch64-linux-gnu
aarch64-linux-musl
arm-linux-gnu
arm-linux-musl
arm64-darwin
ruby
x86-linux-gnu
x86-linux-musl
x86_64-darwin
x86_64-linux-gnu
x86_64-linux-musl

DEPENDENCIES
activesupport (>= 6.1.7.5, != 7.1.0)
benchmark
bigdecimal
cocoapods (>= 1.13, != 1.15.1, != 1.15.0)
concurrent-ruby (< 1.3.4)
logger
mutex_m
xcodeproj (< 1.26.0)

RUBY VERSION
ruby 3.4.4p34

BUNDLED WITH
2.6.9
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ import android.app.Application
import com.facebook.react.PackageList
import com.facebook.react.ReactApplication
import com.facebook.react.ReactHost
import com.facebook.react.ReactInstanceEventListener
import com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative
import com.facebook.react.bridge.ReactContext
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
import com.backgroundthread.BackgroundThreadManager
import com.margelo.nitro.nativelogger.OneKeyLog

class MainApplication : Application(), ReactApplication {
Expand All @@ -25,5 +28,25 @@ class MainApplication : Application(), ReactApplication {
super.onCreate()
OneKeyLog.info("App", "Application started")
loadReactNative(this)

// Mirror iOS AppDelegate's hostDidStart: — install SharedBridge and start
// background runner as soon as the main React context is ready.
reactHost.addReactInstanceEventListener(object : ReactInstanceEventListener {
override fun onReactContextInitialized(context: ReactContext) {
val manager = BackgroundThreadManager.getInstance()
val reactAppContext = context as com.facebook.react.bridge.ReactApplicationContext
manager.setReactPackages(PackageList(this@MainApplication).packages)
manager.installSharedBridgeInMainRuntime(reactAppContext)

val bgURL = if (BuildConfig.DEBUG) {
// Use the same host detection as React Native (emulator vs device)
val host = com.facebook.react.modules.systeminfo.AndroidInfoHelpers.getServerHost(this@MainApplication, 8082)
"http://$host/background.bundle?platform=android&dev=true&lazy=false&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true"
} else {
"background.bundle"
}
manager.startBackgroundRunnerWithEntryURL(reactAppContext, bgURL)
}
})
}
}
Loading
Loading