Skip to content

Commit ce7f017

Browse files
robingenzclaude
andcommitted
docs: the iOS wiring names the file that overrides bundleURL
React Native 0.88 moved it to SceneDelegate.swift. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
1 parent 1cab3c3 commit ce7f017

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ npm install --save-dev https://pkg.pr.new/hotcodepush-team/cli/hotcodepush@<sha>
1313

1414
The module supports React Native 0.82 and later on the New Architecture, iOS 15.1 and Android 7.0 (API 24).
1515

16-
React Native runs the bundle its host hands it, so each app asks the SDK for it. On iOS, `AppDelegate.swift` returns `HotCodePush.bundleURL()` where it returned the embedded `main.jsbundle`:
16+
React Native runs the bundle its host hands it, so each app asks the SDK for it. On iOS, the Swift file that overrides `bundleURL()`, `SceneDelegate.swift` from React Native 0.88 and `AppDelegate.swift` before, returns `HotCodePush.bundleURL()` where it returned the embedded `main.jsbundle`:
1717

1818
```swift
1919
import HotcodepushReactNativeCodePush

‎ios/HotCodePush.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Foundation
22

3-
/// What the app's `AppDelegate` hands React Native as its JavaScript: `bundleURL()` returns `HotCodePush.bundleURL()`.
3+
/// What the app's scene or app delegate hands React Native as its JavaScript: its `bundleURL()` returns `HotCodePush.bundleURL()`.
44
@objc public final class HotCodePush: NSObject {
55
/// The bundle React Native runs: the release the SDK serves, else the `main.jsbundle` the binary ships.
66
@objc public static func bundleURL() -> URL? {

‎ios/HotCodePushRuntime.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import UIKit
1818

1919
private static let contentDidAppearNotification = Notification.Name("RCTContentDidAppearNotification")
2020
private static let missingConfigurationMessage = "HotCodePush is not configured: hotcodepush.json is missing from the app's resources. Run `npx hotcodepush init` and build the app once."
21-
private static let notServedMessage = "React Native did not ask HotCodePush for its bundle, so live updates are off in this run: Metro serves a debug build, and any other build needs `HotCodePush.bundleURL()` in the AppDelegate, which `npx hotcodepush doctor` checks."
21+
private static let notServedMessage = "React Native did not ask HotCodePush for its bundle, so live updates are off in this run: Metro serves a debug build, and any other build needs `HotCodePush.bundleURL()` in the file that overrides `bundleURL()`, which `npx hotcodepush doctor` checks."
2222

2323
private enum Method: String {
2424
case applyUpdate, checkForUpdate, clearUpdates, consumeUpdateRolledBack, downloadUpdate, getChannel, getDevice, getState

0 commit comments

Comments
 (0)