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
16
16
private static XCODEBUILD_MIN_VERSION = "6.0" ;
17
17
private static IOS_PROJECT_NAME_PLACEHOLDER = "__PROJECT_NAME__" ;
18
18
private static IOS_PLATFORM_NAME = "ios" ;
19
+ private static PODFILE_POST_INSTALL_SECTION_NAME = "post_install" ;
19
20
20
21
private get $npmInstallationManager ( ) : INpmInstallationManager {
21
22
return this . $injector . resolve ( "npmInstallationManager" ) ;
@@ -330,6 +331,15 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
330
331
this . $errors . failWithoutHelp ( "CocoaPods are not installed. Run `sudo gem install cocoapods` and try again." ) ;
331
332
}
332
333
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
+
333
343
this . $logger . info ( "Installing pods..." ) ;
334
344
this . $childProcess . exec ( "pod install" , { cwd : this . platformData . projectRoot } ) . wait ( ) ;
335
345
}
You can’t perform that action at this time.
0 commit comments