I have a MonoTouch project from a year ago which was created as a universal app (but only programmed like a iPhone app. Just in case...) When I uploaded it on an iPad it was shown in this iPhone simulator.
I changed the Target from Universal to iPhone/iPod in the IPhone Application Settings in MonoDevelop to achieve this. This seems not to work anymore.
Now, when I updated to the latest verion of iOS and MonoTouch the iPad stays white nothing is shown. Which is traceable because i have no code in the AppDelegateIPad.
So my current project exists of the files:
AppDelegateIPad.cs
AppDelegateIPhone.cs
MainWindowIPad.xib
MainWindowIPad.xib.designer.cs
MainWindowIPhone.xib
MainWindowIPhone.xib.designer.cs
Main.cs
MainWindowIPhone.xib contains a NavigationController which will be added with window.AddSubview in AppDelegateIPhone.cs
What is the best, easiest way to convert the project to a iPhone only project. So it runs in the iPhone simulator on iPad?
Thanks in advance!
You can still keep it as a universal app and target iPhone or iPad only. I'm doing this too.
In Monodevelop go to Project Settings -> iPhone Application
In the "Devices" drop down select "iPhone".
In the section "iPhone Deployment Info" you will have to select the correct main interface. Pick your MainWindowIPhone.xib
That should be all.
If you really want to convert it and remove the code for iPad, follow the steps above, then start removing all iPad related stuff.
One more side note: you should not use window.AddSubview(rootController.View) anymore. Instead use window.RootViewController = rootController;
Related
)
Hello all :-)
I want to release an iPhone/iPod Touch only app. However, I know iPad users can still download the app from the app store, which is fine by me. I was simulating my app on simulator to see how it would look like on an iPad. When I simulated it, the app looked terrible: the layout was not the same as the iPhone version, some labels were colliding and buttons were "cut" out of the screen.
I want iPad users to have the same view as an iPhone. I believe a 1x/2x button would appear on the screen in that case. How can I do that?
Any help/advice would be really appreciated!
Thank you :-)
When you upload your app to the App Store it will also allow iPad users to download the iPhone version of the app. This will have the 1x/2x button you are looking for.
However if you test your project on the iPad simulator before you upload the app, it will not be the same iPhone version of the app that the iPad users will see. Instead the simulator will run an actual iPad version of the app which is not what your looking for.
In your project settings, set your target device to iPhone only. Upload the app. When iPad users download the app they will get the iPhone only version with the 1x/2x button for the iPad.
In your project settings, make sure the "Devices" settings is "Universal" (this is under "Deployment Info"). If it was not before, you may have to make some layout adjustments.
Use Autolayout for fixing the design issues
in storyboard right pane -> attribute inspector -> simulated metrics-> select inferred in size for all controllers
You should be seeing this in the simulator (note the letterboxing on all sides):
And your build settings should show 1 as the target device family:
If not, you are iPad-native and that's the source of the trouble.
when i create a new cordova project using the cordova cli, it creates a clean project presetting the target device to iphone, but still adding ipad resources.
I can also install the app on iPad, even if i select iPhone on the Device select box.
I compared the cordova project with a new project i created in xCode6 selecting iPhone. I see differences, for example in cordova i can still see "Supported interfaces orientations (iPad)" and also the icons and splash screens for iPad. But in my new default xCode6 project, i can only see iphone related stuff.
How can i make cordova created ONLY for iPhone, no ipad files at all?
UPDATE: The reason is NOT to disable iPad support, i know it has to run fine on iPads compatible mode, but i have scaling issues, because the project seems to have iPads related resources and settings i dont see because its set to iPhone only. I had to switch to iPad and untick the unwanted orientations because on iPad it was allowing landscape even if i build for iPhone only. Very strange.
When you launch the app, just launch it for iPhone alone if you don't want to support iPads.
Go through this thread.
Here's the final accepted answer there:
The final answer is:
Once you added iPad support in App submission, there is no way to
remove it.
You have to block the access in iPad during App launch by checking
UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPad
Other then that every iPhone app will always launch on iPad even without support but will open in an smaller window.
I am using XCode 5.
I am properly setting up all app-icons in proper size and resolution.
When I run the app in iPhone Simulator, the app-icon displays correctly. But, when I change the simulator from iPhone to iPad, then the app-icons does not appear.
What could be the root cause of issue ?
Few Tests
Make sure you have set the icons for iPad as well.
If you have, you can probably stop the project, quit the simulator manually, clean, build and run the project by selecting iPad Simulator.
Make sure you have all the icons set -ie- iPhone and iPad specific. Following is the checklist for the same:
App Icons
Splash Screens
Hope this helps !!!
Icon size for iphone and ipad differs. Check here for apple's documentation
Click on project name.On the right side click General Tab and check whether you have added icons of correct resolution or not.
Icons for Universal Apps
Universal applications use the following icons. Items marked with "Required" must be included.
In addition to the above icons, universal applications with a deployment target of iOS 6.1 or earlier use the following icons. Items marked with "Required" must be included if the application's deployment target is iOS 6.1 or earlier.
more detail https://developer.apple.com/LIBRARY/IOS/qa/qa1686/_index.html
Ever since i upgraded to xcode5, the iOS simulator only displays as an iPad even though the project is targeted for iPhone. The Run button also shows it's set to iPhone and I've tried switching between the different iPhone types in simulator. But no matter what, my iPhone project opens as an iPad simulation. Anybody encounter this problem or know how to fix it?
I believe I've downloaded all the relevant libraries and tools from apple as well. I'll double check that now but I'm pretty sure I have all the accessory downloads up to date.
Edit
I found the answer! Due to the changes with resolution of the retina display, the simulator was loading without the bezel. Turns out the best way to solve this problem without a large screen or retina display is to deploy target in navigator=>General menu=> to iOS 6.1 and make sure iOS simulator=>Hardware=>Devices=>is set to iOS 6.1 as well.
Have you tried changing the simulator device? Go to iOS Simulaotr.app -> hardware -> devices?
Download the extra components/simulators..
If you find your iOS simulator is showing a large iPad like display since upgrading, it's because of the change in resolution for the retina display. In order to view the simulator as a regular looking iPhone follow these steps:
Deploy your project target for iOS 6.1 or earlier. In the navigator menu (far left), top folder (your project folder), click it. Make sure "General" is selected in the menu in the centre of the screen. In 'deployment Info' set it to iOS 6.1 and 'devices' to iPhone.
Open iOS simulator: Click 'XCODE' in the top left of the screen => Open Developer Tools => iOS Simulator.
In iOS simulator, go to => Hardware => Devices => select iPhone => iOS 6.1. Make sure not to select any of the hardware devices that are listed as retina displays, thats the major key.
Finally, make sure the deployment next to the run button is also showing 'iPhone iOS 6.1' AND NOT 'iPhone Retina...'
And enjoy seeing the iPhone simulator properly again! :)
I made iOS application first as universal , then some how i deleted MainStoryBoard_iPad because the client said that application required is only for iphone not for ipad. Now client asked me that he wants to run the same app on iPad with 2x button at the right bottom of the screen. Now when i run on iPad it crashes. What are the possible solutions to run the application smoothly on iPad.
If your client want the app to run on the iPad with a 2x button, they do not want a universal app; they want an iPhone app.
You do this in your project properties. Switch the type from "Universal" to "iPhone". You'll probably also want to remove some of the extra lines in the Info.plist that refer to the iPad version.
1) Even when you're the only person doing the development, always, ALWAYS use source control.
2) Go to your target, Summary tab, change the Devices to Universal, XCode should if you want to generate the iPad files - then modify the new files to fit your needs.