iOS simulator -- swap from retina iPhone to non-retina iPad in a single step - iphone

I program for both iPhone and iPad. When doing iPhone stuff, I prefer the retina iPhone simulator. When doing iPad stuff, I prefer the non-retina simulator. Swapping between them is a two-step process for me. I have to switch xCode from the "iPhone simulator" target to the "iPad simulator" target. The problem is that when I do this, the simulator switches from retina iPhone to retina iPad. I therefore also have to go into the simulator app and change the hardware to non-retina iPad.
Is there a way to accomplish that in a single step?

Yes! and its super easy. In Xcode 4+ click the dropdown with the name of your target in it in the top menu bar next to the play button. Then click edit scheme.
Click the run action and then click the Options tab. You will see you can specify the type of screen you want to use when you click the play button (build and run) in Xcode.
Then when you switch device target in Xcode it will automatically switch the simulator to the right device and screen type for you.

Also if you're running less than iOS 5.1 the simulator will switch back to non-retina. Set SDK to 5.1+

Related

xcode: blank screen when running with iPad simulator with storyboards

Seems like a basic question but I just can't figure it out:
xcode 5.0 iOS app. Eventually I'll have an iPad-specific storyboard but for now I just want to use the iPhone storyboard on all devices. The simulator runs fine when set to "iPhone 5.0 simulator" but when run as "iPad 5.0 simulator" it just shows a blank white screen.
I have files called MainStoryboard_iPhone.storyboard and MainStoryboard_iPad.storyboard. The iPad storyboard contains nothing specific because I've been working only on the iPhone storyboard. (This of course is why I get the blank screen when running the iPad simulator.) However, I can't seem to find a way to "disable" the iPad storyboard and have it use the iPhone storyboard when running the iPad simulator.
I've tried removing the file (results in compile error) and soft linking the iPhone storyboard to the iPad one (results in an internal error).
Under the project "Summary" I have "Devices" set to "iPhone".
Under my "Build Settings" I have "Targeted Device Family" set to "iPhone".
Any ideas?
under the Project settings change the target of the MainStoryboard from MainStoryboard_iPad.storyboard to MainStoryboard_iPhone.storyboard

XCode 3.2.5, iOS 4.2 - Why does the iPad Simulator launch instead of the iPhone Simulator?

I have an app that is iPhone only (Targeted Device Family == iPhone), Base SDK 4.2, iOS Deployment Target 4.0.
Once in a while, but pretty often, the target switch to iPad Simulator. Is this a bug ? I shouldn't even have this option in the target selection dropdown...
In my eyes is the best way to work arround is to set up the Device in the Simulator under Devices. There you can also choose between iPhone with or without Retina Display.
Once Open, the Simulator-Device will stay.
cheers
To Thomas : I thinkg that you chosed 'iPhone only' on the wrong configuration of the target (ex : 'distribution' instead of 'debug'). If you choose 'iPhone' for the debug configuration, your app should never lanch in the iPad simulator.
To kkend0g187 : choose 'iPhone' for the "targeted device family" in the debug configuration of the target. Otherwise, you will come back to the wrong device not just when you run but when you clean the targets before running.

app icon for retina device

My app's icon is named:
appicon57x57.png
This works great on simulator and device. I don't have a retina device to test on. But if I make a 114x114 version of my app icon and call it:
appicon57x57#2x.png
and put in in the same place as the other icon, will it show on the retina devices?
As long as your Info.plist lists the app icon name as appicon57x57 (as it should since you say it works), and you make sure to add the appicon57x57#2x version to your project (and its build target), then yes, Retina Display devices should detect the appicon57x57#2x version and load that one.

How do you set the default device in the iPhone simulator?

Every time I switch Xcode between debugging on my iPhone and running in the simulator it resets the simulated device. I want to run the simulator as an iPhone device, but it keeps changing back to iPad. Does anyone know how to set the configuration so that the simulator defaults to an iPhone device?
I can switch the hardware to iPhone inside the Simulator, but when I go back to Xcode and run a "Build Debug" it reopens the app inside an iPad. The only way I can get it to switch is by using the Overview menu in Xcode, the choices I see are iPad Simulator 3.2 and iPhone Simulator 4.0
And when I switch between device and simulator then it always goes back to iPad.
I got XCode 4 to launch the iPhone simulator instead of the iPad simulator by doing this:
In the "Product" menu, pick "Edit Scheme".
Single-Click "Run *Your_Project_Name* Debug" from the list on the left of the scheme editing window.
At the top of the window notice that the pull-down above "Destination" is set to "iPad 4.3 Simulator".
Change the pull-down to "iPhone 4.3 Simulator".
Click "OK".
In Xcode 9 you can select multiple devices. However an easy way to default to your favorite device is the following:
Choose your device from simulator-hardware-device-os you are working on
Now go to simulators - windows and turn off “ show device bezel”
Now simply close the ones you don’t want
What is the Base SDK set to in your project (General tab)? If it's not 4.0 then I think it may assume you are writing an iPad app.
If you set it to 3.2 wanting to support iOS 3.x, you need to set the base SDK to 4.0, then go into project build settings tab and change the OS Deployment target to 3.1 (or whatever the earliest version is you want to support).
In the iPhone Simulator, go to Hardware>Device, and select "iPhone". Whatever you choose there is automatically saved.
in iOS simulator go to :
File / Open Device / iOS 'versión' in my case (iOS 13.7) / Select the one you need
next time you open the simulator will be open with the device selected.
had the same problem - that is how i found this thread.
in SDK 4.2 make sure that when you open the a new xcode project you choose Product = 'iPhone' - the default selection is Ipad. Then when you save the project the device settings are saved with it.

No iPad simulator in Xcode 3.2 beta 5

I installed Xcode 3.2 beta 5 and I could not find iPad Simulator. Where do I find it?
You are looking for the program iPhone Simulator.
If not, you can test your website in Safari on iPad using the iPhone Simulator (Hardware -> Device -> iPad).
Above is from Technical Note TN2262
If you can't find it via searchlight, than try looking in /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator
After you install the SDK successfully, Run Xcode and create a new project. Select iPad for product.
When you create an iPhone project for iPhone OS 3.2, you will see that every time you Build and Run it, it appears in the iPad simulator instead of the iPhone simulato
There is not much too see when you run the simulator without a project
Go to spotlight and search iOS Simulator. You run that and up pops an iPhone simulator, go to Hardware > Device and change it to an iPad
The iOS Simulator is in Mac HD > Developer > Platforms > iPhoneSimulator.platform > Developer > Applications > (here)
Nicely squirrelled away
Try creating an iPad project and ask to launch it in the simulator.
When running, go to the dock, right click on the icon and select "options".
In the "Options" menu is "Reveal in Finder", which will show you where the simulator currently lives.
Also be aware that the iPhone and iPad simulator are the same application, in the menu for the iPhone Simulator (the actual name of the app) you can select which device you want to simulate (though XCode will automatically switch this for you when you run in debug).
Perhaps this pertains,
From Xcode release notes found under the download selection:
Known Issues in Xcode 5 developer preview
Simulator
There is no iPad simulator support in this seed.