feat(bundle-update): add resetToBuiltInBundle API and bump to 1.1.37#33
feat(bundle-update): add resetToBuiltInBundle API and bump to 1.1.37#33huhuanming wants to merge 4 commits intomainfrom
Conversation
Add resetToBuiltInBundle() method to clear currentBundleVersion preference, allowing the app to revert to the built-in JS bundle on next restart. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
| OneKeyLog.info("BundleUpdate", "resetToBuiltInBundle: clearing currentBundleVersion preference...") | ||
| let ud = UserDefaults.standard | ||
| if let cbv = ud.string(forKey: "currentBundleVersion") { | ||
| ud.removeObject(forKey: cbv) |
There was a problem hiding this comment.
🔴 iOS resetToBuiltInBundle() erroneously removes unrelated UserDefaults entry keyed by bundle version string
In the iOS resetToBuiltInBundle() implementation, line 1037 calls ud.removeObject(forKey: cbv) where cbv is the value of currentBundleVersion (e.g., "1.0.0-100"). This removes an unrelated UserDefaults entry that was used for legacy signature storage. This line was copy-pasted from clearAllJSBundleData() (ReactNativeBundleUpdate.swift:1058) where it makes sense because that function clears ALL data. However, resetToBuiltInBundle() should only clear the currentBundleVersion preference. The Android implementation at ReactNativeBundleUpdate.kt:1076 confirms this — it only removes "currentBundleVersion" and does not touch any other keys. This extra removal could delete legacy signature data that should be preserved, since the user may want to switch back to that bundle version later via setCurrentUpdateBundleData.
| ud.removeObject(forKey: cbv) | |
| ud.removeObject(forKey: "currentBundleVersion") |
Was this helpful? React with 👍 or 👎 to provide feedback.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Native view component that prevents parent PagerView from intercepting child ScrollView gestures. Uses requireGestureRecognizerToFail on iOS and requestDisallowInterceptTouchEvent on Android. Supports horizontal, vertical, and both directions. Includes example test page.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
Summary
resetToBuiltInBundle()API to react-native-bundle-update that clears thecurrentBundleVersionpreference, allowing the app to revert to the built-in JS bundle on next restartTest plan
resetToBuiltInBundle()clears the bundle preference on AndroidresetToBuiltInBundle()clears the bundle preference on iOSresetToBuiltInBundle()and restarting🤖 Generated with Claude Code