Skip to content

Commit ad6ec4f

Browse files
FatmeFatme
authored andcommitted
Merge pull request #218 from NativeScript/fatme/remove-device-option
* Remove device option
2 parents 24f09f5 + 10b23a2 commit ad6ec4f

File tree

3 files changed

+10
-18
lines changed

3 files changed

+10
-18
lines changed

lib/options.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ var knownOpts:any = {
1111
"copy-from": String,
1212
"link-to": String,
1313
"release": Boolean,
14-
"device": Boolean,
1514
"emulator": Boolean,
1615
"symlink": Boolean,
1716
"keyStorePath": String,

lib/services/ios-project-service.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -130,27 +130,27 @@ class IOSProjectService implements IPlatformProjectService {
130130
];
131131
var args: string[] = [];
132132

133-
if(options.device) {
133+
if(options.emulator) {
134+
args = basicArgs.concat([
135+
"-sdk", "iphonesimulator",
136+
"-arch", "i386",
137+
"VALID_ARCHS=\"i386\"",
138+
"CONFIGURATION_BUILD_DIR=" + path.join(projectRoot, "build", "emulator")
139+
]);
140+
} else {
134141
args = basicArgs.concat([
135142
"-xcconfig", path.join(projectRoot, this.$projectData.projectName, "build.xcconfig"),
136143
"-sdk", "iphoneos",
137144
'ARCHS=armv7 arm64',
138145
'VALID_ARCHS=armv7 arm64',
139146
"CONFIGURATION_BUILD_DIR=" + path.join(projectRoot, "build", "device")
140147
]);
141-
} else {
142-
args = basicArgs.concat([
143-
"-sdk", "iphonesimulator",
144-
"-arch", "i386",
145-
"VALID_ARCHS=\"i386\"",
146-
"CONFIGURATION_BUILD_DIR=" + path.join(projectRoot, "build", "emulator")
147-
]);
148148
}
149149

150150
this.$childProcess.spawnFromEvent("xcodebuild", args, "exit", {cwd: options, stdio: 'inherit'}).wait();
151151

152-
if(options.device) {
153-
var buildOutputPath = path.join(projectRoot, "build", options.device ? "device" : "emulator");
152+
if(!options.emulator) {
153+
var buildOutputPath = path.join(projectRoot, "build", "device");
154154

155155
// Produce ipa file
156156
var xcrunArgs = [

lib/services/platform-service.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,7 @@ export class PlatformService implements IPlatformService {
216216

217217
var platformData = this.$platformsData.getPlatformData(platform);
218218

219-
var cachedDeviceOption = options.device;
220-
options.device = true;
221219
this.buildPlatform(platform).wait();
222-
options.device = cachedDeviceOption;
223220

224221
packageFile = this.getLatestApplicationPackageForDevice(platformData).wait().packageName;
225222
this.$logger.out("Using ", packageFile);
@@ -263,11 +260,7 @@ export class PlatformService implements IPlatformService {
263260

264261
var platformData = this.$platformsData.getPlatformData(platform);
265262

266-
// We need to build for device
267-
var cachedDeviceOption = options.device;
268-
options.device = true;
269263
this.buildPlatform(platform).wait();
270-
options.device = cachedDeviceOption;
271264

272265
// Get latest package that is produced from build
273266
var packageFile = this.getLatestApplicationPackageForDevice(platformData).wait().packageName;

0 commit comments

Comments
 (0)