Skip to content

Commit 0b767ce

Browse files
committed
fix: formatting of code fragments
1 parent 2d3189d commit 0b767ce

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

proposals/0000-ios-scenedelegate-and-resizing.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ N/A
3030

3131
## Motivation
3232

33-
Support for iOS scene lifecycle APIs that are the current preferred approach for apps. The secondary reason is to remediate the problem when the UIScene lifecycle will become mandatory in a future release of iOS.
33+
Support for iOS scene lifecycle APIs that are the current preferred approach for apps. The secondary reason is to remediate the problem when the `UIScene` lifecycle will become mandatory in a future release of iOS.
3434

3535
As an example, the following key APIs are already deprecated:
3636

@@ -42,7 +42,7 @@ As an example, the following key APIs are already deprecated:
4242

4343
### `SceneDelegate` `RCTReactNativeFactory` entrypoint
4444

45-
To support `SceneDelegate` lifecycle, a new entrypoint for RN application initialization should be provided in `RCTReactNativeFactory`, which would be invoked from `SceneDelegate` lifecycle methods. The existing entrypoint from `AppDelegate` would be kept for backwards compatibility, making this an additive change. An example code snippet of a ``SceneDelegate`` using React Native proposed in this RFC would be:
45+
To support `SceneDelegate` lifecycle, a new entrypoint for RN application initialization should be provided in `RCTReactNativeFactory`, which would be invoked from `SceneDelegate` lifecycle methods. The existing entrypoint from `AppDelegate` would be kept for backwards compatibility, making this an additive change. An example code snippet of a `SceneDelegate` using React Native proposed in this RFC would be:
4646

4747
```objc
4848
@interface SceneDelegate ()
@@ -87,16 +87,16 @@ To support `SceneDelegate` lifecycle, a new entrypoint for RN application initia
8787
8888
### Migration from `AppDelegate` to `SceneDelegate`
8989
90-
Adoption of UIScene lifecycle requires the following actions:
90+
Adoption of `UIScene` lifecycle requires the following actions:
9191
9292
* In application base code
9393
* migration from `AppDelegate` as the primary point of lifecycle-related logic to `SceneDelegate`; for backwards compatibility, RN public API integration points will still be compatible with `AppDelegate` approach for users that may not want to migrate immediately
9494
* invoke RN `RCTLinkingManager` methods from `SceneDelegate`:
9595
* `scene:continueUserActivity:`
9696
* `scene:openURLContexts:`
97-
* update of the app's Info.plist to include a UIApplicationSceneManifest specifying the support and disabling multiple scenes capability
97+
* update of the app's Info.plist to include a `UIApplicationSceneManifest` specifying the support and disabling multiple scenes capability
9898
* In React Native code:
99-
* migration of code that relies on `launchOptions` and deprecated `UIApplicationLaunchOptions`\* keys to UIScene lifecycle and UIScene.ConnectionOptions.userActivities
99+
* migration of code that relies on `launchOptions` and deprecated `UIApplicationLaunchOptions`\* keys to `UIScene` lifecycle and `UIScene.ConnectionOptions.userActivities`
100100
* In React Native code, RN native libraries’ code:
101101
* migration of app lifecycle methods from application\* to scene\* as per [https://developer.apple.com/documentation/technotes/tn3187-migrating-to-the-uikit-scene-based-life-cycle](https://developer.apple.com/documentation/technotes/tn3187-migrating-to-the-uikit-scene-based-life-cycle)
102102
* migration of code that relies on *any* *deprecated* `AppDelegate`-related APIs, which detailed description of is presented below
@@ -110,16 +110,16 @@ To enforce the user not to enable the `UIApplicationSceneManifest`.`UIApplicatio
110110
In case of the RN app template, the iOS boilerplate code is limited only to basic bootstrapping of the application. This implies adjustments to:
111111
112112
* `Info.plist` \- add support for `SceneDelegate`
113-
* ``SceneDelegate`.mm` \- implement the `SceneDelegate`
114-
* ``AppDelegate`.mm` \- move app bootstrap code from here to ``SceneDelegate`.mm`
113+
* `SceneDelegate.mm` \- implement the `SceneDelegate`
114+
* `AppDelegate.mm` \- move app bootstrap code from here to `SceneDelegate.mm`
115115
116116
#### Migration: inspect usages of `RCTReactNativeFactory`
117117
118-
Support methods for initializing React Native from ``SceneDelegate``’s lifecycle methods.
118+
Support methods for initializing React Native from `SceneDelegate`’s lifecycle methods.
119119
120120
#### Migration: `RCTLinkingManager`
121121
122-
The linking manager is using ``AppDelegate`` methods for handling URLs being opened at runtime. This needs to be migrated to `SceneDelegate`. To maintain backwards compatibility, we can implement both approaches and \- to ensure that only one is invoked at a given time \- conditionally check if the app is based on ``AppDelegate`` or has scenes to ensure only one listener handles the event. The Scene lifecycle options (`NSDictionary`) are adapted to the format of ``AppDelegate`` launchOptions (`NSDictionary` as well).
122+
The linking manager is using `AppDelegate` methods for handling URLs being opened at runtime. This needs to be migrated to `SceneDelegate`. To maintain backwards compatibility, we can implement both approaches and \- to ensure that only one is invoked at a given time \- conditionally check if the app is based on `AppDelegate` or has scenes to ensure only one listener handles the event. The Scene lifecycle options (`NSDictionary`) are adapted to the format of `AppDelegate` launchOptions (`NSDictionary` as well).
123123
124124
#### Migration: RCTDevLoadingView
125125

0 commit comments

Comments
 (0)