diff --git a/docs/dependencies.md b/docs/dependencies.md index bfd20cbdb..afdc4f198 100644 --- a/docs/dependencies.md +++ b/docs/dependencies.md @@ -56,6 +56,7 @@ The following settings are available on iOS and Android: ```ts type DependencyParamsIOST = { project?: string, + podspec?: string, sharedLibraries?: string[], }; @@ -71,6 +72,10 @@ type DependencyParamsAndroidT = { Custom path to `.xcodeproj` +#### platforms.ios.podspec + +Custom `podspec` name to use when auto-linking (without the file extension). Your `podspec` file must be located in the root of the dependency package. + #### platforms.ios.sharedLibraries An array of shared iOS libraries to link with the dependency. E.g. `libc++`. This is mostly a requirement of the native code that a dependency ships with. diff --git a/packages/cli/src/tools/config/schema.js b/packages/cli/src/tools/config/schema.js index f5575fce5..548a0f242 100644 --- a/packages/cli/src/tools/config/schema.js +++ b/packages/cli/src/tools/config/schema.js @@ -49,6 +49,7 @@ export const dependencyConfig = t ios: t .object({ project: t.string(), + podspec: t.string(), sharedLibraries: t.array().items(t.string()), libraryFolder: t.string(), }) diff --git a/packages/platform-ios/src/config/index.js b/packages/platform-ios/src/config/index.js index fd3e3a6b3..258d4afb1 100644 --- a/packages/platform-ios/src/config/index.js +++ b/packages/platform-ios/src/config/index.js @@ -53,7 +53,7 @@ export function projectConfig( folder, pbxprojPath: path.join(projectPath, 'project.pbxproj'), podfile: findPodfilePath(projectPath), - podspec: findPodspecName(folder), + podspec: userConfig.podspec || findPodspecName(folder), projectPath, projectName: path.basename(projectPath), libraryFolder: userConfig.libraryFolder || 'Libraries', diff --git a/types/index.js b/types/index.js index b0fa6d58f..313d0e5ed 100644 --- a/types/index.js +++ b/types/index.js @@ -66,6 +66,7 @@ type ProjectParamsAndroidT = { */ type ProjectParamsIOST = { project?: string, + podspec?: string, sharedLibraries?: string[], libraryFolder?: string, plist: any[], @@ -221,7 +222,7 @@ type ProjectConfigIOST = { folder: string, pbxprojPath: string, podfile: null, - podspec: null, + podspec: null | string, projectPath: string, projectName: string, libraryFolder: string,