xcode switch between simulator and hardware - ios

I'm using XCode 4.4 (recently upgraded from 4.2). Just got my individual iOS developer program license set up today and managed to get my app provisioned and running on a physical iPad. Now I'd like to be able to switch back to the simulator (IOW be able to choose to either run on hardware or on the simulator).

In the top left theres a drop down which will say something like 'iPhone 5.1 Simulator', 'iPad 5.1 Simulator' and 'My iPhone'.
Just choose what you want to run your app on and press play :)
(You can also install other versions of the simulator from the bottom option in the menu which is useful to test your apps)

In the left hand corner, you have your run button, stop button, and a third option. It will be a two part button with yourappname>youripad.
click on the youripad part, and a dropdown menu will show. Click iPhone 5.0 Simulator, and press the run button. It should rebuild your project, and it will open and run the project.

Related

Xcode 7.2.1 only shows 'Generic Device' when I want to run my app, instead of the list of iPhones and iPads

I am a beginner in Xcode and I just updated it to 7.2.1. Before I did this I never had a problem with running my app, but now it only shows me 'Generic Device', instead of the regular simulators I use. Anyone know how I can solve this?
Sure, you can add any simulator you like. Just open Xcode and under the "Window" menu, click "Devices".
Then, you can click the little plus in the lower left to add a Simulator.
Just select the one you want, and name it, and you should be all set!
You may also need to actually download the simulators, if for some reason they're no longer on your computer. Go to the Xcode preferences, and then in the downloads tab you'll see simulators listed.

how to run app on xcode 7 simulator or device?

Before I updated from xcode 6 to 7, it was just right next to the run and stop button.
When i just click on the run button, it opens the iphone 5 simulator and from the simulator's menu, if i choose Hardware > device > iphone 6 plus, it's just completely black. If I try to run the app again, it just says that it's running on iphone 5 in Xcode.
How do I choose a different simulator?? or run on a physical device connected to the macbook?
This worked seamlessly on xcode6 with the use of the device dropdown menu beside the run and stop button. but now, that menu is gone.
Another question: I am unable to find ios9 simulator under preferences > downloads
In one of the pre-versions of Xcode 7 I had the same issue. The problem was, that there were no simulators installed.
Go to Xcode -> Window -> Devices a window will pop up. Click on the plus button in the bottom left corner and configure some devices.
The device selector should show up in Xcode.
Turns out Xcode did not finish downloading. There was an error when I checked the update. I made it complete the download and xcode is okay again

iOS simulator version

I tried Appium iOS tutorial and ran the example successfully. I noticed the UICatalog6.1.app runs on iOS simulator with title "iPhone 6/iOS 8.2" on the top of the simulator.
However the title is "iPhone 6/iOS 9.0" when I run the app developed by myself from Xcode. I am wondering which part controls to use different version of iOS simulator?
When you install Xcode, you automatically get the most recent version of the simulators. However, if you would like to define additional simulators with older iOS versions, you can.
In Xcode, go to Window (on the tool bar), and select Devices. There, you can see a list of all of your current devices and all of your currently setup simulators. If you click the plus on the lower left corner of the screen, you'll get to this screen:
Here, you can select the device you'd like to use for the simulator and its iOS version. By default, you'll only have the most recent version of iOS, but if you'd like to add older versions, just select 'Download more simulators' and you'll be given the option to download older versions and use them for testing.
Once you've set up the new simulator, you'll be able to select it from the list of available devices to run your app on. Good Luck!

iOS simulator issue

I downloaded xcode 4 and created a single view application with storyboard.
I added two views to the segue and tied them back to the home screen. After that I must have done something weird. The only thing I can think of is that I put the iOS simulator on the dock. I've updated the project and the changes are not being reflected on the simulator.
What I think is the issue is that I have two iOS simulators on the computer. For some reason whenever I try to find one in spotlight or in the applications it only shows one. When I click on it it is the old iOS simulator from Xcode 3. So what I did was I looked at stackoverflow and it suggested cleaning and running the project. That did not work.
After that I looked harder and found that I should reset content and settings on my new iOS simulator. That's what I did and now when I build and run it it is saying that it can't find my storyboard.
Generally you don't run simulator separately, but let Xcode fire it up for you. So, in Xcode, in the upper left corner you can select your scheme (and you select whether you want it on the simulator or the device). You can then select the simulator and then press the "Run" button and it should fire up the simulator for you. No need to fire the simulator up separately.
If Xcode is not behaving well (i.e. there are no error messages but the simulator never comes up automatically when you tell Xcode to run it on you simulator), I'd suggest (a) quitting and restarting Xcode (sometimes it gets in a weird state); (b) cleaning your project; and (c) try running it again.
In terms of not finding the simulator in Spotlight, it's now part of the Xcode.app bundle, so Spotlight won't find it. But if you want to dock it (not sure why, but feel free), just fire it up from Xcode by running an app on the simulator and when it appears in your dock, control-click on it and select "Options > Keep in Dock".

How to Run the App in iPad Simulator?

I'm developing an application and I seem to have set something so it only runs in iPhone Simulator and not in iPad simulator (when I try to change the device in the Simulator from iPhone to iPad it simply opens it again in iPhone Simulator mode; in the iPad Sim the app doesn't show in the applications list).
How do I add the iPad run capability to my app?
Make sure you've set
iPhone/iPad
in your project's build settings (Deployment: "Targeted Device Family").
Select your target (i.e. not the target menu, but the target inside the menu.)
Click on the Project menu & choose "Upgrade Current Target for iPad."
In the dialog box that comes up, you're given two choices. Select "One Universal Application."
And that should be it. Previously, you had to roll back the deployment target for iOS to 3.2 since that was the latest version running on iPad. You would do this by right-clicking on the target, selecting getInfo from the popup menu, and looking through the Build Tab of the popup window for the deployment target. That should no longer be necessary as iPad now runs on iOS 4.3. But, if you have not updated your Xcode, the iPad simulator may still run only on version 3.2 or earlier.
Hope this works for you.

Resources