Skip to main content
Assets and resources include images, icons, fonts, sounds, and other files that your app needs. Config plugins can automate copying these files to the correct native project locations.

Types of assets

iOS assets

  • Images: PNG, JPEG files in asset catalogs or Resources folder
  • Icons: App icon and alternate icons
  • Fonts: TTF, OTF font files
  • Sounds: Audio files for notifications and UI
  • Plists: Configuration files
  • Storyboards: XIB/Storyboard files

Android assets

  • Drawables: Images in res/drawable-* folders
  • Icons: App launcher icons in res/mipmap-* folders
  • Fonts: Font files in assets/fonts/
  • Raw resources: Files in res/raw/
  • XML resources: Strings, colors, styles in res/values/

Adding assets with dangerous mods

Use withDangerousMod to copy files during prebuild:

Managing iOS assets

Adding images to Resources folder

Adding fonts to iOS project

Adding sound files

Managing Android assets

Adding images to drawable folders

Adding fonts to Android

Adding raw resources

Managing XML resources

Adding string resources

Resources.ts

Adding color resources

Colors.ts

Validating asset filenames

Android has strict naming requirements for resource files.
validations.ts
Usage:

Platform-specific assets

Create a unified plugin that handles both platforms:
Usage:
app.json

Best practices

1. Organize assets in source directory

2. Validate filenames before copying

3. Check file existence

4. Use glob for bulk operations

5. Make plugins idempotent

Copy operations are idempotent by default (overwriting existing files), but be careful with append operations.

6. Document required asset structure

Include a README explaining the expected asset organization:

Debugging asset issues

Add logging to verify assets are copied:
Enable debug mode:

Next steps