Skip to content

Commit 24bec80

Browse files
committed
Merge pull request #1677 from NativeScript/kerezov/swift-plugins
Pass -destination when building for iOS Simulator
2 parents a65c4c1 + 0ca1d4e commit 24bec80

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/services/ios-project-service.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
3030
private $errors: IErrors,
3131
private $logger: ILogger,
3232
private $iOSEmulatorServices: Mobile.IEmulatorPlatformServices,
33+
private $iOSSimResolver: Mobile.IiOSSimResolver,
3334
private $options: IOptions,
3435
private $injector: IInjector,
3536
$projectDataService: IProjectDataService,
@@ -200,10 +201,10 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
200201

201202
args = args.concat((buildConfig && buildConfig.architectures) || defaultArchitectures);
202203
} else {
204+
let currentSimulator = this.$iOSSimResolver.iOSSim.getRunningSimulator();
203205
args = basicArgs.concat([
204206
"-sdk", "iphonesimulator",
205-
"-arch", "i386",
206-
"VALID_ARCHS=\"i386\"",
207+
"-destination", `platform=iOS Simulator,name=${this.$iOSSimResolver.iOSSim.getSimulatorName(currentSimulator && currentSimulator.name)}`,
207208
"CONFIGURATION_BUILD_DIR=" + path.join(projectRoot, "build", "emulator"),
208209
"CODE_SIGN_IDENTITY="
209210
]);

0 commit comments

Comments
 (0)