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

chore: add help text to assist when no Simulators are available #237

Merged
merged 2 commits into from
Sep 28, 2023
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
6 changes: 4 additions & 2 deletions lib/simulator.js
Original file line number Diff line number Diff line change
Expand Up @@ -771,11 +771,13 @@ function findSimulators(options, callback) {
}

if (!simHandle) {
const helpText = '\n\nPlease open Xcode, navigate to "Window > Devices and Simulators" and create a new Simulator with your preferred configuration.';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to check the Xcode version and only show this additional help for Xcode 15?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If no Simulator is available, this can also mean that a Simulator was deleted or corrupted (even in earlier Xcode versions). That way, we can show this message for all cases where a Simular does not exist.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, good point!


// user experience!
if (options.simVersion) {
return callback(new Error(__('Unable to find an iOS Simulator running iOS %s.', options.simVersion)));
return callback(new Error(__(`Unable to find an iOS Simulator running iOS %s. ${helpText}`, options.simVersion)));
} else {
return callback(new Error(__('Unable to find an iOS Simulator.')));
return callback(new Error(__(`Unable to find an iOS Simulator. ${helpText}`)));
}
} else if (options.watchAppBeingInstalled && !watchSimHandle) {
return callback(new Error(__('Unable to find a watchOS Simulator that supports watchOS %s', options.watchMinOSVersion)));
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ioslib",
"version": "1.7.34",
"version": "1.7.35",
"description": "iOS Utility Library",
"keywords": [
"appcelerator",
Expand Down