File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
1616 private static XCODEBUILD_MIN_VERSION = "6.0" ;
1717 private static IOS_PROJECT_NAME_PLACEHOLDER = "__PROJECT_NAME__" ;
1818 private static IOS_PLATFORM_NAME = "ios" ;
19+ private static PODFILE_POST_INSTALL_SECTION_NAME = "post_install" ;
1920
2021 private get $npmInstallationManager ( ) : INpmInstallationManager {
2122 return this . $injector . resolve ( "npmInstallationManager" ) ;
@@ -330,6 +331,15 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
330331 this . $errors . failWithoutHelp ( "CocoaPods are not installed. Run `sudo gem install cocoapods` and try again." ) ;
331332 }
332333
334+ let projectPodfileContent = this . $fs . readText ( this . projectPodFilePath ) . wait ( ) ;
335+ this . $logger . trace ( "Project Podfile content" ) ;
336+ this . $logger . trace ( projectPodfileContent ) ;
337+
338+ let firstPostInstallIndex = projectPodfileContent . indexOf ( IOSProjectService . PODFILE_POST_INSTALL_SECTION_NAME ) ;
339+ if ( firstPostInstallIndex !== - 1 && firstPostInstallIndex !== projectPodfileContent . lastIndexOf ( IOSProjectService . PODFILE_POST_INSTALL_SECTION_NAME ) ) {
340+ this . $logger . warn ( `Podfile contains more than one post_install sections. You need to open ${ this . projectPodFilePath } file and manually resolve this issue.` ) ;
341+ }
342+
333343 this . $logger . info ( "Installing pods..." ) ;
334344 this . $childProcess . exec ( "pod install" , { cwd : this . platformData . projectRoot } ) . wait ( ) ;
335345 }
You can’t perform that action at this time.
0 commit comments