Skip to main content
The expo-build-properties plugin lets you configure native build settings for iOS and Android without writing custom config plugins. It’s the recommended way to set SDK versions, optimization flags, and other build properties.

Installation

Basic usage

Add the plugin to your app.json or app.config.js:
app.json

Android properties

SDK versions

Configure Android SDK versions:
From the source:
pluginConfig.ts

Kotlin version

Set the Kotlin version:

Optimization settings

Enable code minification and resource shrinking:
enableMinifyInReleaseBuilds - Enable R8 in release builds to obfuscate Java code and reduce app size. enableShrinkResourcesInReleaseBuilds - Enable shrinkResources to remove unused resources. Must be used with enableMinifyInReleaseBuilds. enablePngCrunchInReleaseBuilds (default: true) - Optimize PNG files. Disable if you do your own PNG optimization.

ProGuard rules

Add custom ProGuard rules:

Packaging options

Configure native library packaging:
From the types:
pluginConfig.ts

Network configuration

Allow cleartext HTTP traffic:
For Android 8 and below, the default is true. For Android 9+, the default is false.

Maven repositories

Add custom Maven repositories:
Supported authentication types:
  • basic - HTTP Basic authentication
  • digest - HTTP Digest authentication
  • header - Custom HTTP headers
Credential types:
pluginConfig.ts

Build architectures

Specify which ABIs to build:
Default: ["armeabi-v7a", "arm64-v8a", "x86", "x86_64"] Building fewer architectures reduces app size but limits device compatibility.

Manifest queries

Specify apps your app intends to interact with (Android 11+):

Legacy packaging

Use legacy native library packaging:

Day/Night theme

Enable dark mode support:

Network Inspector

Control Network Inspector:
Default: true

Bundle compression

Enable JavaScript bundle compression:
Results in smaller APK but may have slower startup.

Exclusive Maven mirror

Use a single Maven repository for all dependencies:
Useful for organizations with internal Maven mirrors.

iOS properties

Deployment target

Set minimum iOS version:
This affects:
  • CocoaPods projects
  • Xcode project build settings
  • All native targets

Use frameworks

Configure CocoaPods to use frameworks:
Options:
  • "static" - Use static frameworks
  • "dynamic" - Use dynamic frameworks
  • undefined - Use default (static libraries)
This adds use_frameworks! :linkage => :static to Podfile.

Force static linking

Force specific pods to link statically:
Useful when dynamic frameworks cause modular header issues.

Extra CocoaPods

Add additional CocoaPods:
Full pod configuration:
pluginConfig.ts

Ccache

Enable C++ compiler cache:
Speeds up C++ compilation by caching results.

Privacy manifest aggregation

Aggregate Privacy Manifests from CocoaPods:
Merges all PrivacyInfo.xcprivacy files from pods into a single manifest.

Network Inspector

Control Network Inspector:
Default: true

Shared properties

These properties can be set at the top level or per-platform. Platform-specific values take precedence.

Build React Native from source

From the source:
pluginConfig.ts

React Native release level

Options:
  • "stable" (default)
  • "canary"
  • "experimental"

Use Hermes V1

Enable experimental Hermes V1 engine:
From the validation:
pluginConfig.ts

Complete configuration example

app.json

Validation

The plugin validates your configuration:
pluginConfig.ts

Using in custom plugins

Import types from expo-build-properties:

Debugging

Enable debug output:

Best practices

1. Use minimal SDK versions

Don’t set SDK versions higher than necessary:

2. Enable optimizations for release

3. Use environment variables for credentials

4. Test build property changes

Always test after changing build properties:

5. Document custom settings

Add comments in app.config.js:
app.config.js

Next steps