0.2.3 • Published 9 months ago
@expo/repack-app v0.2.3
@expo/repack-app
Repacking tool for Expo apps
API Documentation
CLI Usage
repack-app [options] [project-root]Options
-p, --platform <platform>(required): Platform to repack the app for (androidorios)--source-app <path>(required): Path to the source app file (APK for Android, IPA for iOS)--android-build-tools-dir <path>: Path to the Android build tools directory-w, --working-directory <path>: Path to the working directory-o, --output <path>: Path to the output artifact-v, --verbose: Enable verbose logging
Android-specific Options
--ks <path>: Path to the keystore file--ks-pass <password>: Keystore password (supported formats:pass:<password>,env:<name>,file:<file>)--ks-key-alias <alias>: Keystore key alias--ks-key-pass <password>: Keystore key password (supported formats:pass:<password>,env:<name>,file:<file>)
iOS-specific Options
--signing-identity <identity>: Code signing identity--provisioning-profile <path>: Path to the provisioning profile file(s)--keychain-path <path>: Path to the keychain file for codesign
Bundle Options
--embed-bundle-assets: Force embedding of bundle assets--bundle-assets-sourcemap-output <path>: Generate sourcemap at the specified path (used with --embed-bundle-assets)
Programmatic Usage
import { repackAppAndroidAsync, repackAppIosAsync } from '@expo/repack-app';
// For Android
await repackAppAndroidAsync({
platform: 'android',
projectRoot: '/path/to/project',
sourceAppPath: '/path/to/source.apk',
// Optional configurations
workingDirectory: '/path/to/working/dir',
outputPath: '/path/to/output.apk',
verbose: true,
androidSigningOptions: {
keyStorePath: '/path/to/keystore.jks',
keyStorePassword: 'pass:password', // or 'env:KEYSTORE_PASS' or 'file:/path/to/pass'
keyAlias: 'alias',
keyPassword: 'pass:key-password', // or 'env:KEY_PASS' or 'file:/path/to/key-pass'
},
androidBuildToolsDir: '/path/to/build-tools',
exportEmbedOptions: {
sourcemapOutput: '/path/to/sourcemap',
},
env: {
// Additional environment variables
},
});
// For iOS
await repackAppIosAsync({
platform: 'ios',
projectRoot: '/path/to/project',
sourceAppPath: '/path/to/source.ipa',
// Optional configurations
workingDirectory: '/path/to/working/dir',
outputPath: '/path/to/output.ipa',
verbose: true,
iosSigningOptions: {
signingIdentity: 'Apple Development: Name (Team ID)',
provisioningProfile: '/path/to/profile.mobileprovision',
keychainPath: '/path/to/keychain', // Optional
},
exportEmbedOptions: {
sourcemapOutput: '/path/to/sourcemap',
},
env: {
// Additional environment variables
},
});Configuration Options
The following options are available when using the API programmatically:
Common Options
platform: 'android' | 'ios' - The platform to repack the app forprojectRoot: string - Path to the project root directorysourceAppPath: string - Path to the prebuilt app file (APK/IPA)workingDirectory?: string - Working directory for temporary filesoutputPath?: string - Path to the output app file (defaults toprojectRoot/repacked.apkorprojectRoot/repacked.ipa)verbose?: boolean - Enable verbose loggingexportEmbedOptions?: ExportEmbedOptions - Options for embedding JS bundle. When specified, repack will generate bundle assets.skipWorkingDirCleanup?: boolean - Skip working directory cleanupenv?: Record<string, string | undefined> - Environment variables
Android-specific Options
androidSigningOptions?: AndroidSigningOptions - Options for signing the Android appkeyStorePath: string - Path to the keystore filekeyStorePassword: string - Keystore password (supported formats:pass:<password>,env:<name>,file:<file>)keyAlias?: string - Keystore key aliaskeyPassword?: string - Keystore key password (supported formats:pass:<password>,env:<name>,file:<file>)
androidBuildToolsDir?: string - Path to Android SDK build-tools directory
iOS-specific Options
iosSigningOptions?: IosSigningOptions - Options for signing the iOS appsigningIdentity: string - Code signing identityprovisioningProfile: string | Record<string, string> - Path to provisioning profile file(s)keychainPath?: string - Path to the keychain file for codesign
Environment Variables
ANDROID_SDK_ROOT: Path to the Android SDK root directory (required for Android builds)
0.1.10
10 months ago
0.1.11
10 months ago
0.1.12
10 months ago
0.1.13
10 months ago
0.1.14
10 months ago
0.1.15
10 months ago
0.1.0
1 year ago
0.2.1
9 months ago
0.1.2
1 year ago
0.2.0
10 months ago
0.1.1
1 year ago
0.1.16
10 months ago
0.1.8
1 year ago
0.1.7
1 year ago
0.1.9
10 months ago
0.2.3
9 months ago
0.1.4
1 year ago
0.2.2
9 months ago
0.1.3
1 year ago
0.1.6
1 year ago
0.1.5
1 year ago
0.0.5
2 years ago
0.0.4
2 years ago
0.0.6
2 years ago
0.0.3
2 years ago
0.0.2
2 years ago
0.0.1
2 years ago