No simulator option while running the code - iphone

I am not able to see Simulator option in my XCODE for one of my project (Only device is there) but it is coming for other one. What setting I need to do?

This was because I was trying to build the app on IOS 4.0 which was missing in my XCODE.

Related

Xcode 4.5 Doesn't Recognize My Device iphone 5 (6.1.3)

I am using Xcode 4.5. When I plug my device in, it is not showing up on run button, and I have a message that it can't run using the selected device.. The Problem is this two days to go its working very well and i am installed many application before with this xcode 4.5 and iphone 5 (6.1.3) Dont know whats going on today Any idea Thanks in Advance
Open your Xcode organizer (Shift+Cmd+2), go to Devices tab, select your device in the list and press "Use for development" button
Check that your deployment target is set low enough for your device OS.
Xcode 4.5 supports till iOS 6.0 for iOS 6.1.3 you need to upgrade your Xcode to 4.6.0 version.
I would venture that your device isn't included in the provisioning profile you're trying to compile the code with. Check organizer and see if your device has your target provisioning profile listed. If it does, unplug the iPhone, restart XCode and the phone and try again.
EDIT
#Armaan Stranger also brings up a good point about XCode 4.5 and iOS 6.1.3 however I'm a bit confused as to how you had it working previously.

App runs on iphone only once then xcode cannot find the Iphone anymore

So this is the issue I am having. When I plug in my iphone xcode recognizes the iphone and everything checks out fine. I can then build my project and run it on the device. It works fine, for the first time. If I build the project again and try to run it again xcode gives this error:
No provisioned iOS devices are available with a compatible iOS version. Connect an iOS device with a recent enough version of iOS to run your application or choose an iOS simulator as the destination.
Also instead of my phone name in the top left it changes to iOS device.
Any ideas?
thanks
This is caused by your versionnumber of your iPhone/iPod/iPad. If you've set up the Deploeyment target to high like if you have an iPhone with IOS5 and the target is IOS6 this error occurs. You may had simply to decrease the value to something under your device IOS versionnumber or the same BUT not above the value otherwise it won't work.
Go to your project > traget> deployment target > set to something that you want.
Thats all you need to do.
I figured out my issue. It turns out that my Cord was bad. Once I switched out the cord everything worked great.
Thanks for any help anyone gave.

Where to find iOS Simulator on SDK/Xcode4 download?

I need to use the iOS Simulator for a iPad website I'm working on.
I have downloaded Xcode4(http://developer.apple.com/devcenter/ios/index.action)
I'm now looking for the iOS Simulator and can't find it anywhere. Do I have to launch it via Xcode if so how?
EDIT:
I'm not seeing any Developer Folder. Someone on the App store said this on a rating of Xcode...
"Is the Developer folder put somewhere other than the top level of the hard drive?"
The easiest way to launch it is via Xcode, running an application you’ve just built. If you want to open it manually, though—for testing a website or whatever—it’s in /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/.
In the spotlight search for "iOS Simulator" - once it is found, launch it.
It'll probably open as an iPhone simulator so select from simulators' menu "Hardware -> Device -> iPad"
I found mine here:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk
Could be they moved it in the latest version of Xcode - I'm running 4.5.2.
You can download the XCode4 package from App Store application in your Mac. it must have the Simulator application and you can find it in > /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/.

Why does XCode say that my iPhone app is only able to run on iPad?

I have a project in XCode with two targets. One target is for the iPhone only and the other is for iPad only.
The iPad target works as expected, but the iPhone target does not.
If I try to run it in the simulator, it starts the iPad simulator every time, but in iPhone compatibility mode with the 2x button.
If I try to run in on my iPhone 4 device, I get this message:
Can’t install application. The application at /Users/jacob/Documents/code/Projects/TVGuide/build/Debug-iphoneos/TVGuidePlus.app can only be installed on iPads.
This is XCode 3.2.6 and the iOS 4.3 SDK.
I have TARGETED_DEVICE_FAMILY defined at the target level and it looks like it is set correctly. The problem is the same for debug/release/...
have you selected the simulator as iphone?
most iphone apps are supposed to work on ipad too.
otherwise you may need to go to the project tab and go to project settings. there are some setting involving the choice of ios. i have not tried this since i havent recieved the error but i hope that it works.
Actually it turned out that I had Armv7 selected as architecture for my iPhone build. After changing that to armv6, I can now install and run the build on my device.

iPad App Keeps Running as an iPhone App?

I recently upgraded XCode to run iOS 4.2 from iOS 3.2. However, now, when I try to run my iPad app, it appears as an iPhone app in the simulator! It appears as the smaller box with the option to expand 2x. Does anyone know why this would be so?
In addition, although the application builds and runs (albeit incorrectly), XCode still says that the Base SDK is missing. I have gone into the Build Info for the target and the project and set the following:
Base SDK: Latest iOS (currently set to iOS 4.2)
Targeted Device Family: iPad
iOS Deployment Target: iOS 3.2
Edit Thanks a lot for the comments; now there is no longer a Base SDK missing, but unfortunately, the app still runs as an iPhone app...
When I load a UISplitViewController, I get an exception 'UISplitViewController is only supported when running under UIUserInterfaceIdiomPad'.
This all seems very strange to me. Any help is greatly appreciated.
Thanks
The installed app could be broken.
What happens when you delete the app from the Simulator and do a clean build and run?
The Simulator could be broken.
What happens when you create a new different iPad app from an Xcode template?
You configuration could be broken, or you could have different settings for different targets and builds than you want, or the wrong plist or plist keys, or the wrong xib. If the new template app works, compare these one by one.
I eventually was able to fix this problem. I attempted all the methods outlined by the other answerers, but none of them worked. However, when I upgraded to XCode 4, the problem fixed itself.
I honestly don't know what changes to my app were made by this upgrade, and I am still baffled at why the project was not compiling before. I suppose upgrading your environment is one (somewhat unsatisfying) way to fix this sort of bug....
Check that you have set the appropriate settings for the current build target as well as the base project. So from the project menu:
Edit Project Settings
Edit Active Target blah
I have often forgotten to check the settings for the current target and had a similar experience.