Skip to content

Commit 369b172

Browse files
Update images.md
1 parent 310c938 commit 369b172

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

docs/images.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Note that image sources required this way include size (width, height) info for
6767

6868
### Bundling images in an asset catalog (iOS)
6969

70-
By default the bundler copies each required image, along with every `@2x` and `@3x` variant, into your iOS app as a loose file next to the JavaScript bundle. On iOS you can instead have them compiled into an [asset catalog](https://developer.apple.com/documentation/xcode/managing-assets-with-asset-catalogs), so the system ships and loads only the scale a device needs and resolves each image in a single named lookup.
70+
By default the bundler copies each required image, along with every `@2x` and `@3x` variant, into your iOS app as a loose file next to the JavaScript bundle. On iOS you can instead have them compiled into an [asset catalog](https://developer.apple.com/documentation/xcode/managing-assets-with-asset-catalogs), so the system ships only the scale a device needs.
7171

7272
To opt in, set the `RCTUseAssetCatalog` key to `true` in your app's `Info.plist`:
7373

@@ -76,9 +76,9 @@ To opt in, set the `RCTUseAssetCatalog` key to `true` in your app's `Info.plist`
7676
<true/>
7777
```
7878

79-
With this enabled, the iOS build script (`react-native-xcode.sh`) compiles your bundled images into an `RNAssets.bundle` asset catalog at build time, and the native image loader resolves them from it by name. Your `require('./my-icon.png')` calls stay exactly the same, and no changes to your Xcode project are needed. Apps that don't set the key are unaffected.
79+
With this enabled, the iOS build script compiles your bundled images into an `RNAssets.bundle` asset catalog at build time. Your `require('./my-icon.png')` calls stay exactly the same, and no changes to your Xcode project are needed.
8080

81-
After changing this setting, do a clean build. Incremental builds don't remove the image assets a previous build copied in with the other setting, so they would otherwise be shipped as unused dead weight.
81+
After changing this setting, make sure to do a clean build.
8282

8383
## Static Non-Image Resources
8484

0 commit comments

Comments
 (0)