File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 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
335335 // Check availability
336336 try {
337337 this . $childProcess . exec ( "gem which cocoapods" ) . wait ( ) ;
338+ this . $childProcess . exec ( "gem which xcodeproj" ) . wait ( ) ;
338339 } 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." ) ;
340341 }
341342
342343 let projectPodfileContent = this . $fs . readText ( this . projectPodFilePath ) . wait ( ) ;
@@ -351,8 +352,8 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
351352 let pbxprojFilePath = path . join ( this . platformData . projectRoot , this . $projectData . projectName + IOSProjectService . XCODE_PROJECT_EXT_NAME , "xcuserdata" ) ;
352353 if ( ! this . $fs . exists ( pbxprojFilePath ) . wait ( ) ) {
353354 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 ( ) ;
356357 }
357358
358359 this . $logger . info ( "Installing pods..." ) ;
You can’t perform that action at this time.
0 commit comments