How to resize the iPhone/iPad Simulator?

58,510

Solution 1

+1 for 100%
+2 for 75%
+3 for 50%

Solution 2

It's more flexible with Xcode 9-Simulator.Just pick & drag any corner of simulator to resize it and set it according to your requirement.

Look at this snapshot:

enter image description here


Note: With Xcode 9.1+, Simulator scale options are changed.



Keyboard short-keys:
According to Xcode 9.1+

Physical Size       ⌘ 1      command + 1
Pixel Accurate      ⌘ 2      command + 2


According to Xcode 9

50% Scale           ⌘ 1      command + 1
100% Scale          ⌘ 2      command + 2
200% Scale          ⌘ 3      command + 3

Simulator scale options from Xcode Menu:

Xcode 9.1+:
Menubar ▶ Window ▶ "Here, options available change simulator scale" (Physical Size & Pixel Accurate)

Pixel Accurate: Resizes your simulator to actual (Physical) device's pixels, if your mac system display screen size (pixel) supports that much high resolution, else this option will remain disabled.

enter image description here

Xcode 9.0
Menubar ▶ Window ▶ Scale ▶ "Here, options available change simulator scale"

enter image description here


Using Terminal Command
Follow these steps to scale simulator using terminal commands

  1. Close/Quit simulator. (if open)
  2. Open Terminal app (using Spotlight search, Press ⌘ + SPACE to open spotlight search)
  3. Copy following text and paste it next to terminal cursor.

defaults write ~/Library/Preferences/com.apple.iphonesimulator SimulatorWindowLastScale "0.3"

  1. Open 'Simulator' (Run your iOS project using Xcode).

You will find simulator scale update.


Solution 3

Xcode 9.x :

  1. Select Simulator
  2. Goto Window tab
  3. Select Physical Size option (cmd + 1)

Screenshot 1

Now if this dosen’t make size as per your interest then follow below steps :

  1. Select Simulator
  2. Goto edge of simulator. This will convert your cursor to resize option (Bidirectional arrow).
  3. Now using this resize option you can change the size as you desire.

Xcode 8 or below :

https://stackoverflow.com/a/30588057/1753005

Solution 4

For Xcode 9, Beta 6: Deselect "Show Device Bezels" under Window menu. Then Cmd + 2 should scale to 100% (Window Menu -> Scale -> 100%).

Tested using 15" Macbook Pro (2017 Model).

Solution 5

For XCode 10 I ended up having to do

defaults delete ~/Library/Preferences/com.apple.iphonesimulator DevicePreferences

I just could not find any other way to reset zoom level. Even using Window->Zoom to toggle zoom, would not restore back to 100% (2042x2732 iPad 12.9-inch).

Deleting device preferences allowed the simulator to open at full resolution again, so I could take the screen shots required for app store submission.

The Physical Size and Pixel Accurate options remain greyed out.

Share:
58,510
Hedge
Author by

Hedge

Updated on November 04, 2020

Comments

  • Hedge
    Hedge over 3 years

    The iPad-simulator is really small (like one third the size of the real iPad screen) on my 23" Full-HD screen (and also on the 15" MacBook Pro).

    Is there a way to resize it?

    I know it must maintain size and dpi-ratio to prevent sub-pixels, but I can hardly see anything withoout a magnifier.

  • Konstantin Salavatov
    Konstantin Salavatov about 13 years
    zoom options are greyed out... stackoverflow.com/questions/5142132/…
  • Pang
    Pang about 9 years
    ⌘+4 and ⌘+5 for 33% and 25% respectively. Requires Xcode 6.3.
  • russbishop
    russbishop almost 7 years
    This answer is incorrect. There is no need to turn off bezels. Just drag to resize to whatever size you want. If your screen is just barely too small to fit at 100% then turning off bezels might allow it to fit but that is not a general answer to the overall question.
  • Arshin
    Arshin over 6 years
    Ah, my apologies! I added another situation in case anyone experiences this. Again, I did specify the version of Xcode which for me did not allow other dorma of resizing.
  • Mogsdad
    Mogsdad over 6 years
    Please edit your answer so the explanation is in text, in the answer itself. That will make it more accessible to future readers. It is best if images simply support answers.
  • dollar2048
    dollar2048 about 3 years
    They are greyed out because "Show device bezels" is unselected, I guess. Try to select that option.