how can I run a iPad project on a iPhone or touch - iphone

I build a iPad project,i want to run the project on iPhone with auto-resize and it's run successful on iPhone 4.1 simulator,but it's always alert 'can only installed on ipads' when i run it with my iPhone,how can I run a iPad project on a iPhone or touch,what can i do?

You should set Targeted Device Family to iPhone/iPad in your project settings.Hope it works for you..

It doesnt make sense to install an iPad app in iPhone at all.
iPad has its own UI controls.You can install iPhone apps to iPad is just because iPad supports all the controls that iPhone has.
Reverse is not possible.

Related

iOS - White screen when testing on iPad

I'm building an iPhone app, and it works fine when I test it in the simulator. I don't have an iPhone for testing, but my app is configured to be iPhone only, so I'm trying to run it in the iPad. When I run it either in the iPad simulator or the iPad itself all I get is a blank screen, any idea what could be happening?
My app use to be a Universal app, but I switched it to iPhone only to test on the iPad since I don't have an iPhone to test.
Check your build settings.
Change "Targeted Device Family" from "iPhone/iPad" to "iPhone" and you will see it in your small iPhone "simulator" on your iPad.
Check my screenshot:

Problems with Universal iPhone/ipad app build

I have created a Universal (iPhone/ipad) application .I have created separate Xib designs for iPhone and iPad both works well. When i build the app it should give a single .APP(build).I installed in iPhone and iPad tested correctly.
Now i want to give a two separate builds (for user to test), one for iPhone and another one for iPad.So in project settings i changed a target device family (iPhone/ipad -> into iPhone) and (iPhone/ipad -> into iPad). So it gives two separate builds.One for iPhone and another one for iPad.
My problem is when i build with iPhone(as target device family) and installed in iPad means it loads a iPad design not an iPhone design.What could be the mistake i did here ? I search a lot and could not find any solution.
If any one did like this? or do it for me?(testing)
Thanks in advance.....
It's because (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) if you run iPhone-designed app on iPad. And thats why iPad version of xib file is selected. So you need to attach correct .xib file manually, or exclude iPad version of it from iPhone resources.
The tester can install the same build in both iPhone and iPad. The concept of universal build is that, the same app will work on both iPad and iPhone.

change iphone project to work in both iphone and ipad

I already have an application which i have built for iphone only. I need to change it to work in both iphone and ipad.the upgrade to ipad application option in project tab of xcode is faded.. which I means I cant do that... I tried to run the project in ipad simulator but it gets automatically run in iphone simulator.
What are the proper steps to change my project to work in iphone and ipad.
Initially change the build setting,ie change the Targeted Device Family field to iPhone/iPad. To write logic for iPad use "UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad" this condition.

Setting Xcode's target to iPhone NOT iPad

I just upgraded to iPhone SDK 3.2 Beta 4. Since doing so, I have not been able to get the app to launch in the iPhone simulator - it keeps launching in the iPad simulator. I have tried option-clicking the drop-down menu in the top left-corner of Xcode and setting 'Active Executable' to iPhone simulator 3.1.3 but it keeps going back to iPad simulator instead.
What gives? I have no interest in my app running on the iPad and I don't want to test it in the 2X mode in the simulator.
Thanks,
You can't really launch an iPhone app in 3.2.x - sometimes it will pop up - but basically right now it is only for iPad development.
Update for release version of Simulator.
First of all, the title of this question doesn't match the description: Xcode target isn't the same as the simulator hardware device.
If you are writing an app targeting 3.2, it can run on both iPad (using OS 3.2) and lower OS versions on the iPhone. You do this by setting the Base SDK to iPhone Device 3.2, the Targeted Device Family to iPhone/iPad, and the iPhone OS Deployment Target to 3.1 (lower than 3.2).
The iPhone simulator has a menu option for Hardware->Device, which can be set to iPhone or iPad. However, you can only run a 3.2 SDK target in iPad mode, and a Universal app that supports iPad can only use the 3.2 SDK to build.
You can of course set the simulator to iPhone mode and launch your app from Springboard, but that will lose the debugger connection. Switching mode during installation of your app will cause it to crash.
So the short answer is still the same: you can't run a Universal iPad app in the iPhone mode simulator while debugging.
Upper-left corner of the IDE find a dropdown list of Simulator versions - flipped to 3.2 - try to put it back to 3.1.3
and relaunch your app.
This was driving me nuts too, but the answer is right here:
http://quatermain.tumblr.com/post/517122761/running-universal-ipad-iphone-apps-in-the-simulator
In short, tell Xcode to Build for the 3.2 SDK, then switch the build menu to the 3.1 SDK and tell Xcode to Run the app. Presto, the app starts in the iPhone simulator!
From Apple's documentation: "iPhone OS 3.2 does not support iPhone and iPod touch devices. It runs only on iPad." There's no way to target 3.2 for iPhone, so there's no Simulator. Ergo, you'll have to wait for iOS 4. Fortunately, that's only 4 days away now... of course it won't support the first generation of iPhone devices, but for all other iPhone users it's a free upgrade. Not sure about iPod Touches.
You should be able to change your target platform in your Project Settings.
Changing the target platform and device makes no difference. It always launches the iPad simulator.
If you switch the simulator to iPhone mode, the app just disappears.
This dev environment is a mess.
Short answer: You can change the hardware setting in the simulator. Hardware->Device
Go to Project
Set Active Executable
There are 2 options: Ipad Simulator 3.2 or Iphone Simulator 4.0.
If you choose the Iphone simulator, then it will launch Iphone simulator.
If you choose the Ipad simulator, then it will launch Ipad simulator.
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!

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.