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

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.

Related

Xcode 4.2.1: universal app runs on iPad but not on iPhone

I am working on a universal application where I am stuck at one point. I was able to successfully launch my application both on iPhone and iPad but since 2-3 days, I am not able to launch my application on neither iPhone nor iPhone simulator but it runs smoothly on iPad/iPad simulator.
Also when I run my app choosing iPhone device it shows message like Running the App on iPhone simulator but I am not able to see any effect on my simulator. I am using Xcode 4.2.1 and I guess the issue is pertains to the same.
I don't know whether it is a solution or not but got a way out by reinstalling the iOS Simulator.
I have faced same problem. This probably happens when you replace the application with the newScheme/EditScheme by mistake.
Just carefully check when you run your application is there your application name appear. This will be immediate left at where you choose iPhone simulator or iPad simulator version.

No provisioned iOS devices are available with a compatible iOS version

I'm trying to test my app on an iPhone 3G, however I'm getting 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.
Note that:
The 3G has version 4.2.1 of iOS installed
The iOS deployment target is set to version 4.2
The device has valid development profiles installed
I'm using the latest Xcode 4
I'm at a loss. Can anyone help?
Tim
Solved this problem by closing and re-opening xcode.
Xcode... it's the new Windows.
Try clicking "Use for Development" on your device in the Xcode Organizer. I got this same error and that was the only way I fixed it.
I finally found a solution to this.
If anyone else has this problem then it might be useful to know that Xcode now creates applications for ARM7 by default.
To support the iPhone 3G and other arm6 devices, you need to specify arm6 and arm7 in in the Architectures list, and set the device requirements to only arm6 in the plist.
Another observation for anyone who still has the problem after adding armv6: I found that Xcode was still listing "iOS Device" in the Scheme dropdown rather than filling in the name of my 3G. When I clicked on the dropdown, I saw that there was another slot that listed my 3G. (Presumably the "iOS Device" slot only applies to my other development device, an iPhone 4). I'm curious whether this is intended functionality, so leave a comment if you develop with multiple phones and have seen this.
I have Xcode 5.0, and try to build for my iPad with iOS 5.1.1. And I get the message: 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.
The solution you can see in 4 step:
(1) Select project settings > project settings > Info. Choose deployment target instead of 7.0 i.e. 6.1.
(2) Select project settings > project settings > Build Settings. Change architecture . Don't compile for 64bit.
(3) Select project settings > target settings > General. Set Deployment Target according your device iOS version. Afterwards the device name IPad appear after IOS Device to run on.
(4) Finally I selected IPad.
Maybe you have set the minimum required iOS to a higher version than your 3G has. Could you try to change the iOS Deployment Target in the build settings to the version of your 3G?
I develop on multiple devices and multiple generations of each device. Look at the scheme. In the case of an iOS 5 device, at least, if it does not have the specific device name, but instead shows iOS Device, then eject the device in iTunes and unplug the device. Plug it back in and try to run/install. The device name should show up and the device should have a green dot in Organizer and everyone will be happy. I believe the 3G iPhone just shows up as iOS Device, and I'm not sure about the 3GS, but an iPhone 4 or 4S will show its device name. This is what I get for trying to continue supporting old iPod Touches and 3G phones with 4.2.1. At some time I'll just cut them off and move on.
Not sure, i understand your settings right. But, the rules are:
Base SDK Version >= Development device iOS version
Deployment Target version = Lowest iOS version to be supported.
Hence, i guess, setting base SDK version equal or above 4.2.1 might help.
i also get this case:
when i reset iphone, plugin to xcode again, xcode dont recognized iphone in schema, iphone still have full provision
I go to Organizer window, check device again and see that my iphone dont have green light and have button that ask to use this device for development. Click on button and all work well again
When I changed my app from iPhone to Universal, automatically xCode changed the Deployment Target from 4.3 to 6.1, my device had 6.0 so it wasn't recognized.
Changing the value back to 4.3 solved the problem.
When the first time , your new test iOS connected to you Mac, you can't see it in the pop-up menu. only "IOS Device"
You may try From menu: Window->Organizer->Devices ; then Choose you connected iPad and click “Use for development" ; So it appears .
In Organizer, I had to copy (drag and drop) the provisioning profile from the general 'Profiles' section to the device's 'Profile' section.
This can also happen because you've started to use your device on a computer that's never used it before. Once you've plugged in your device via USB, you'll need to choose to "trust" the device. You'll see a message like the following on the device itself:
Your settings and data will be accessible from this computer when
connected via USB or Wi-Fi
Choose "Trust" when prompted, and then XCode will be able to use the device.
More info here at Apple's site:
http://support.apple.com/kb/HT5868
"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."
I had this same problem when trying to build on my device.
Then I realised I was using an aftermarket lead.
Changed the lead to the original iPhone lead and... Hey Presto!
I solve this problem just change iOS Device of the following image to iPhone Retine ....,
I had a similar problem, with this error message: "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."
I solved it by simply going to the "jump bar" and changing it from "iOS device" to iPad 6.0 Simulator."

Remove iPad sources in XCode.

In xCode, I switched my target settings to universal out of curiousity. Then I switched it back to iPhone. When I load up my app in the iPad under universal and iPhone targets, the app crashes. I suspect it might have something to do with the added files for iPad support. How can i remove the iPad target entirely from my app? The only devices I want to support is the iPhone and the iPod.
Have you tried cleaning your project, then building?

iPhone Build SDK 4.0 With 3.2 Target Won't Install on iPad OS 3.2

I'm building an app for iPhone/iTouch that I also want to run on iPads (not a universal app, but one that just runs on on iPad with the 1x/2x button in the lower right hand corner).
I'm using iPhone SDK 4.0 and setting the following:
Base SDK: 4.0
iPhone OS Deployment Target: 3.2
When I do this, I can build an app just fine and run it on an iPhone/iTouch, but when I try to install it on my iPad I get the following error: The Info.plist for application specifies a minimum OS version of 4.0
In addition, if I package up the binary and submit it to Apple and it becomes available on the iTunes store, it shows that it's only available for iPhone (not the iPad). When I go to the App Store icon on my iPad, it doesn't even list the app as available (because Apple thinks it won't run on iPad, I assume).
Now I'm really confused, because I thought I understood the difference between the Base SDK and the Deployment Target, but Xcode is telling me I don't.
Can anyone help explain this to me?
As an aside but related question, if I build with Base SDK = "iPhone Device 3.2" it works fine on my iPad, but by doing so would I lose the Base SDK 4.0 built-in multi-tasking feature?
Check the 'Targeted Device Family' setting in your target's build settings. It needs to be set to iPhone/iPad if you want to be able to deploy to both devices.
This build setting automatically sets the UIDeviceFamily entry in the app's Info.plist (You shouldn't update this yourself, though—use the build setting instead.)
UIDeviceFamily

How do I use the iPhone Simulator in 3.2 (not iPad Simulator)

I'm fixing my app to be a universal binary. Testing on the simulator seems to default to the iPad. For small corrections like checking orientations and small UI updates, the only way I can find to get the iPhone version is to plug in my iPhone and build and run on device.
Loading the debugger takes valuable time, when running on simulator is so much faster for this kind of work. Can I set the simulator to default to iPhone for this? Setting it to 3.1.3 doesn't work because of the 3.2 code I have in the binary for the iPad.
EDIT:
The Hardware -> Device, and ->Version menu choices in the simulator quits my app. When I relaunch, it goes back to the iPad. The app is not installed in the simulator
If you don't have the latest xcode, get it.
Set the project info to build for 3.2, but in the build drop down pick iPhone Simulator 4.0 and it will open in the iPhone simulator instead of the iPad simulator.
That is the dilemma: if you want to use OS 4 on the iPhone, you have to use iPhone SDK 4, which comes with XCode 3.2.3.
Previously I used iphone_sdk_3.1.3_with_xcode_3.2.1__snow_leopard__10m2003a, where the simulator was fine, but now after I update the iPhone to OS 4 (which is by iTunes), I cannot use the SDK 3.1.3 any more, and the simulator 3.2 which comes with SDK 4 actually does not work for iPhone at all!
Even when you specify the "iPhone OS Deployment Target" to "OS 3.1.3", and an iPhone-frame shows up in the iPad simulator, many functions are not responding at all.
Does Apple have an official answer to this dilemma?
I finally solved this problem myself.
First, install new version of xCode, which is xCode 4.
Then set project scheme to iphone simulator and run app in xCode several times.
And re-install xCode 3 and the problem will be gone away!