File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -335,8 +335,9 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
335
335
// Check availability
336
336
try {
337
337
this . $childProcess . exec ( "gem which cocoapods" ) . wait ( ) ;
338
+ this . $childProcess . exec ( "gem which xcodeproj" ) . wait ( ) ;
338
339
} catch ( e ) {
339
- this . $errors . failWithoutHelp ( "CocoaPods are not installed. Run `sudo gem install cocoapods` and try again." ) ;
340
+ this . $errors . failWithoutHelp ( "CocoaPods or ruby gem 'xcodeproj' is not installed. Run `sudo gem install cocoapods` and try again." ) ;
340
341
}
341
342
342
343
let projectPodfileContent = this . $fs . readText ( this . projectPodFilePath ) . wait ( ) ;
@@ -351,8 +352,8 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
351
352
let pbxprojFilePath = path . join ( this . platformData . projectRoot , this . $projectData . projectName + IOSProjectService . XCODE_PROJECT_EXT_NAME , "xcuserdata" ) ;
352
353
if ( ! this . $fs . exists ( pbxprojFilePath ) . wait ( ) ) {
353
354
this . $logger . info ( "Creating project scheme..." ) ;
354
- let createScheme_rb = `echo \ "require 'xcodeproj'; xcproj = Xcodeproj::Project.open('${ this . $projectData . projectName } .xcodeproj'); xcproj.recreate_user_schemes; xcproj.save\" | ruby ` ;
355
- this . $childProcess . exec ( createScheme_rb , { cwd : this . platformData . projectRoot } ) . wait ( ) ;
355
+ let createSchemeRubyScript = `ruby -e "require 'xcodeproj'; xcproj = Xcodeproj::Project.open('${ this . $projectData . projectName } .xcodeproj'); xcproj.recreate_user_schemes; xcproj.save" ` ;
356
+ this . $childProcess . exec ( createSchemeRubyScript , { cwd : this . platformData . projectRoot } ) . wait ( ) ;
356
357
}
357
358
358
359
this . $logger . info ( "Installing pods..." ) ;
You can’t perform that action at this time.
0 commit comments