expo-plugin-ios-static-libraries
Version:
Expo Config Plugin to set specific iOS libraries to use static build type
37 lines (36 loc) • 1.23 kB
TypeScript
import { ConfigPlugin } from '@expo/config-plugins';
/**
* Configuration for a single library with optional modular headers
*/
export interface LibraryConfig {
name: string;
modularHeaders?: boolean;
}
/**
* A library entry can be a simple string (pod name) or an object with options
*/
export type LibraryEntry = string | LibraryConfig;
/**
* Plugin configuration
*/
export interface PluginConfig {
libraries: LibraryEntry[];
}
/**
* Normalizes the library entries into separate arrays for static libraries and modular headers
*/
export declare function normalizeLibraries(libraries: LibraryEntry[]): {
allLibraries: string[];
modularHeaderLibraries: string[];
};
/**
* Patches a Podfile string to add static library configuration for specified libraries
* This function is exported for testing purposes
*/
export declare function patchPodfile(podfileContent: string, libraries?: string[], modularHeaderLibraries?: string[]): string;
/**
* Config plugin that adds pre_install hook to the iOS Podfile to set
* specific libraries to use static build type and optionally enable modular headers
*/
declare const withIosStaticLibraries: ConfigPlugin<PluginConfig>;
export default withIosStaticLibraries;