Creating a new Xcode 4 project targeted to iPad only - ipad

I'm attempting to create a new iPad project for an app I'm working on, prior to version 4 of Xcode you could select in the new project assistant what device family you are targeting. In Xcode this appears to have been removed and all I can create is an iPhone project. I can go to the project info and change the device to iPad, and Xcode converts it, but how do I just create an iPad project ?

It depends on your application template. Some (Tab Bar, Navigation) are tied to iPhone devices only, some such as Split View are tied to iPad devices only, while the "Window based" template allows you to pick iPhone, iPad, Universal.

Select the type under new project, and press next. Under device family you choose iPad.

You can set this in the target. Look at the screenshot:
The Devices dropdown allows you to select
iPhone
iPad
Universal

Related

How to publish an app only for iPhone and not to iPad?

I know couple of similar questions are asked before. But they are outdated with the XCode versions, as the XCode now seems to provide different / better features .
I have developed a Flutter app for both Android and iOS. My app target is mobile users and not tab or iPad users.
When I am publishing my app to Apple App Store, I am being asked to submit iPad 3rd Gen and 2nd Gen screenshots.
The app works in iPad, but the layout is not great. Alignment issues and similar UI matters are there.
I'm on XCode 11, is there a way to avoid publishing to iPad? I saw a tick box to uncheck iPad in XCode, maybe unchecking this will save me?
If there is no way to protect from being published to iPad, can I provide the not so good layout screenshots for now? Will they pass the review? In this case I can fix the layouts in next release.
In Xcode
Choose your project from the Project Navigator
Choose your app target
Choose the "General" tab
In the "Deployment Info" section, check only the iPhone device (uncheck iPad)
Xcode 12.4 Update
Project -> App -> Deployment -> Targeted Device Families -> Select iPhone

How to transition from an iPhone only App to an iPhone AND iPad App?

I know this question might have been asked before...
But since Apple is changing their ecosystem for developers as well as their AppStore policies so rapidly (and sometimes with breaking-changes), I would like to know reliable answers to the following questions. i.e. answers that are valid for the end of 2019 and also what the predictions are for 2020 (SwiftUI) to that respect.
The questions are:
What do you have to do in order to get an iPhone-only app also to iPad ?
(I am not speaking of an App that shows iPhone-like on iPad - but a real native iPad App)
a) is it enough to just select both iPhone and iPad under General in Xcode ?
b) do you have to create another extra AppStore App that is done for iPhone AND iPad ? Or can the existing iPhone-only App mutate to a iPhone-AND-iPad App without App Store submission issues ?
c) will a) and b) be identical for the new SwiftUI world ?
d) My current App is iOS11,12 & 13 compatible, does this cause any issue to the iPhone to iPhone-AND-iPad App transition ?
e) Is there anything else to consider for the iPhone to iPhone-AND-iPad transition ?
a)
1. Choose Project Navigator, Select your Project Target.
2. Deployment Info section, choose Devices. You will see 3 options – iPhone, iPad and Universal. Change from iPhone to Universal.
3. In the alert, Copy “Main” to use as main iPad interface. Select copy.
4. Under the new iPad group created, add new Storyboard file in Project Navigator. Name it Main_iPad.storyboard.
5. Change name of iPhone storyboard as Main_iPhone.storyboard from Main.storyboard.
6. Update entry in plist. Main storyboard file base name – Main_iPhone
7. Add entry in plist. Main storyboard file base name (iPad) – Main_iPad.
8. Add controller, outlet, action to Main_iPad.storyboard.
9. Make proper changes to Main_iPad.storyboard to make it utilize the complete screen. Make changes in position, height and width of components.
10. Also, provide images for iPad.
Now application will be universal (iPhone and iPad).
Thank You !!

Convert from Universal App to iPhone?

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;

Setting the Destination to iOS Device in Xcode 4.2

Yet, I have Xcode 4.2 open and my source code.
In the top left scheme dropdown, I have the scheme set but on the right hand side of that dropdown, its got my device set there.
I don't want my device set there because I'm not testing anymore.
I want to build/archive for distribution.
I want to see iOS Device in that target but I don't see it there.
Any idea how I can get iOS Device to be listed in that destination dropdown?
Currently, it has ipad and iPhone simulators and my own iPhone name.
Just select your iPhone name and go to Product -> Archive.
Or unplug all your iOS devices and then there will be shown iOS Device label.

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