Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion lib/simulator.js
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ function findSimulators(options, callback) {

// loop through each xcode simulators
for (var j = 0; !simHandle && j < simVers.length; j++) {
if (!options.simVersion || simVers[j] === options.simVersion) {
if ((!options.simVersion || simVers[j] === options.simVersion) && simInfo.simulators.ios[simVers[j]]) {
var sims = simInfo.simulators.ios[simVers[j]].sort(compareSims).reverse();

// loop through each simulator
Expand Down Expand Up @@ -782,6 +782,12 @@ function launch(simHandleOrUDID, options, callback) {
return callback(err);
}

if (!selectedXcode.eulaAccepted) {
var eulaErr = new Error(__('Xcode must be launched and the EULA must be accepted before a simulator can be launched.'));
emitter.emit('error', eulaErr);
return callback(eulaErr);
}

var crashFileRegExp,
existingCrashes = getCrashes(),
findLogTimer = null,
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ioslib",
"version": "0.8.1",
"version": "0.8.2",
"description": "iOS Utility Library",
"keywords": [
"appcelerator",
Expand Down Expand Up @@ -37,16 +37,16 @@
"lib": "./lib"
},
"dependencies": {
"always-tail": "0.1.1",
"async": "1.4.2",
"always-tail": "0.2.0",
"async": "1.5.0",
"bplist-parser": "0.1.0",
"mkdirp": "0.5.1",
"node-appc": "0.2.32",
"node-ios-device": "0.5.2"
"node-appc": "0.2.33",
"node-ios-device": "0.6.0"
},
"devDependencies": {
"mocha": "^2.3.2",
"should": "^7.1.0"
"mocha": "^2.3.3",
"should": "^7.1.1"
},
"scripts": {
"test": "mocha --require test/init --reporter spec --check-leaks test/",
Expand Down
8 changes: 6 additions & 2 deletions test/test-simulator.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ function build(app, iosVersion, defs, done){
return done(new Error('No selected Xcode'));
}

if (!xc.eulaAccepted) {
return done(new Error('Xcode must be launched and the EULA must be accepted before the iOS app can be compiled.'));
}

var args = [
xc.executables.xcodebuild,
'clean', 'build',
Expand Down Expand Up @@ -702,7 +706,7 @@ describe('simulator', function () {
});
});

(process.env.TRAVIS ? it.skip : it.only)('should be able to launch simulator and log basic logs', function (done) {
(process.env.TRAVIS ? it.skip : it)('should be able to launch simulator and log basic logs', function (done) {
this.timeout(60000);
this.slow(60000);

Expand Down Expand Up @@ -1015,4 +1019,4 @@ describe('simulator', function () {
});
});

});
});
4 changes: 3 additions & 1 deletion test/test-xcode.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ describe('xcode', function () {
should(results.xcode).be.an.Object;
should(results.issues).be.an.Array;

checkXcode(results.selectedXcode);
if (results.selectedXcode !== null) {
checkXcode(results.selectedXcode);
}

Object.keys(results.xcode).forEach(function (ver) {
checkXcode(results.xcode[ver]);
Expand Down