Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return focus to terminal #25

Closed
skypanther opened this issue Jul 23, 2014 · 8 comments
Closed

Return focus to terminal #25

skypanther opened this issue Jul 23, 2014 · 8 comments
Milestone

Comments

@skypanther
Copy link
Contributor

When launching triple, focus is given to the simulator that's opened. Instead, focus should be returned to your terminal window so that you can more easily start entering commands.

@tonylukasavage
Copy link
Owner

I'll need to talk to @cb1kenobi about that. That's part of the ios sim launch process, but perhaps there's a clean way to avoid it.

@tonylukasavage tonylukasavage added this to the 0.2.0 milestone Jul 23, 2014
@jhaynie
Copy link

jhaynie commented Jul 25, 2014

@tonylukasavage
Copy link
Owner

I'm actually working on a PR right now to add a titanium CLI option to skip the activation step, found here: https://github.com/appcelerator/titanium_mobile/blob/master/iphone/cli/hooks/run.js#L125

That'll be easier than pulling in the activation code.

@tonylukasavage
Copy link
Owner

created a TIMOB ticket and submitted PRs to both master and 3_3_X: https://jira.appcelerator.org/browse/TIMOB-17397

Since this is non-critical behavior, I'm OK with requiring TiSDK 3.3.1+ for it. I don't to add special iOS sim handling in here just for the sake of 3.3.0.

@tonylukasavage
Copy link
Owner

In the meantime, if you're up for a quick and dirty hack, you can comment out this small section in your target SDK, my case my 3.3.0.GA SDK:

~/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.GA/iphone/cli/hooks/run.js
/*
// focus the simulator
logger.info(__('Focusing the iOS Simulator'));
exec([
    'osascript',
    '"' + path.join(build.titaniumIosSdkPath, 'iphone_sim_activate.scpt') + '"',
    '"' + path.join(build.xcodeEnv.path, 'Platforms', 'iPhoneSimulator.platform', 'Developer', 'Applications', 'iPhone Simulator.app') + '"'
].join(' '), function (err, stdout, stderr) {
    if (err) {
        logger.error(__('Failed to focus the iPhone Simulator window'));
        logger.error(stderr);
    }
});
*/

@jhaynie
Copy link

jhaynie commented Jul 25, 2014

i'm not sure if we can skip activation step without some timeout or something. FWIW

@tonylukasavage
Copy link
Owner

@jhaynie everything works fine skipping that step, it just doesn't focus the simulator. That activate script does nothing more than bring the sim to the foreground.

Also, if you look in the code for the run.js hook, the focus step there is executed asynchronously, but not in any kind of series, meaning nothing in the rest of the execution path is contingent on its completion.

@jhaynie
Copy link

jhaynie commented Jul 25, 2014

OK, i missed understand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants