App: [HOLD for payment 2023-09-18] [$250] Make default simulator a newer iPhone than the old iPhone SE

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

Run npm run ios

Expected Result:

The iOS app should open in a newer simulator, say an iPhone 14 at this moment in time.

Actual Result:

By default XCode opens an older iPhone SE simulator, which isn’t really representative of are most common target audiences.

Workaround:

  • Find the deviceID of the simulator you want in XCode then run npm run ios -- --device="deviceID"
  • Open XCode, select the target device and run the app with the play button in the UI.

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • iOS / native

Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1692316899451739

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01edc466f02992ba23
  • Upwork Job ID: 1696550567204483072
  • Last Price Increase: 2023-08-29
  • Automatic offers:
    • b4s36t4 | Contributor | 26393688

About this issue

  • Original URL
  • State: closed
  • Created 10 months ago
  • Comments: 22 (13 by maintainers)

Most upvoted comments

Selecting a device is pretty cool. We’ll have a new iPhone very soon, so there is no need to change the script every time.

People selecting their own devices would also mean that contributors are using a diverse set of devices. Which means there is a higher chance to catch OS specific / device specific bugs. @GItGudRatio what do you think?

Sorry @GItGudRatio, but I think that @b4s36t4’s proposal is a superior DX because it offers greater flexibility and also makes it easy to use whatever sim you want.

Proposal

Please re-state the problem that we are trying to solve in this issue.

Make default simulator a newer iPhone than the old iPhone SE

What is the root cause of that problem?

No RC

What changes do you think we should make in order to solve the problem?

Instead of adding a default platform why not let the developer choose the device they want to work.

Sometimes some devices give different layout depends on dimensions of device.

To solve this we need to add a parameter --list-devices which shows the list of available iOS devices that user can select and open with.

Parameter need to be added here https://github.com/Expensify/App/blob/4675db5348e305daca320f91066476344191d8d2/package.json#L14.

What alternative solutions did you explore? (Optional)

NA

Screenshot 2023-08-29 at 9 27 49 PM

This would show all the available devices.

My slack handle is @Anjana.

Proposal

Please re-state the problem that we are trying to solve in this issue.

When I run npm run ios, the simulator launched is iPhone SE, which is super old and not good for testing.

What is the root cause of that problem?

Since we do not explicitly mention the simulator, the first simulator is used to launch iOS app, which is an outdated iPhone SE

What changes do you think we should make in order to solve the problem?

For the npm run ios command, explicitly mention that the simulator used should be iPhone 14. This can be done by adding the argument --simulator=\"iPhone 14\" to the ios script in package.json

What alternative solutions did you explore? (Optional)

N/A