@@ -204,26 +204,13 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
204
204
205
205
args = args . concat ( ( buildConfig && buildConfig . architectures ) || defaultArchitectures ) ;
206
206
} else {
207
- let currentSimulator = this . $iOSSimResolver . iOSSim . getRunningSimulator ( ) ;
208
207
args = basicArgs . concat ( [
209
208
"-sdk" , "iphonesimulator" ,
209
+ "-arch" , "i386" ,
210
+ 'VALID_ARCHS="i386"' ,
210
211
"CONFIGURATION_BUILD_DIR=" + path . join ( projectRoot , "build" , "emulator" ) ,
211
212
"CODE_SIGN_IDENTITY="
212
213
] ) ;
213
-
214
- let additionalArgs : string [ ] = [ ] ,
215
- xcodeVersion = this . $xcodeSelectService . getXcodeVersion ( ) . wait ( ) ;
216
-
217
- xcodeVersion . patch = xcodeVersion . patch || "0" ;
218
- // passing -destination apparently only works with Xcode 7.2+
219
- if ( xcodeVersion . major && xcodeVersion . minor &&
220
- helpers . versionCompare ( xcodeVersion , "7.2.0" ) < 0 ) {
221
- additionalArgs = [ "-arch" , "i386" , 'VALID_ARCHS="i386"' ] ;
222
- } else {
223
- additionalArgs = [ "-destination" , `platform=iOS Simulator,name=${ this . $iOSSimResolver . iOSSim . getSimulatorName ( currentSimulator && currentSimulator . name ) } ` ] ;
224
- }
225
-
226
- args = args . concat ( additionalArgs ) ;
227
214
}
228
215
229
216
if ( buildConfig && buildConfig . codeSignIdentity ) {
@@ -677,6 +664,13 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
677
664
let cocoapodsVer = this . $sysInfo . getSysInfo ( this . $staticConfig . pathToPackageJson ) . wait ( ) . cocoapodVer ,
678
665
xcodeVersion = this . $xcodeSelectService . getXcodeVersion ( ) . wait ( ) ;
679
666
667
+ if ( ! semver . valid ( cocoapodsVer ) ) {
668
+ // Cocoapods betas have names like 1.0.0.beta.8
669
+ // These 1.0.0 betas are not valid semver versions, but they are working fine with XCode 7.3
670
+ // So get only the major.minor.patch version and consider them as 1.0.0
671
+ cocoapodsVer = _ . take ( cocoapodsVer . split ( "." ) , 3 ) . join ( "." ) ;
672
+ }
673
+
680
674
xcodeVersion . patch = xcodeVersion . patch || "0" ;
681
675
let shouldUseXcproj = semver . lt ( cocoapodsVer , "1.0.0" ) && ~ helpers . versionCompare ( xcodeVersion , "7.3.0" ) ;
682
676
0 commit comments