Can I have two separate applications for iPhone and iPad? - ios

I have completed an iPad app which only available on iPad iTune store.
But client wants to have different design but similar functionality application for iPhone as well. Some of new feature must be added to iPhone version. I can use most of the functionalities in iPad version and have a new project and build iPhone from scratch!
My requirements will be change during time. New requirements could be for both or either of them. Therefore, I need to add new features in both applications time to time and maintain both applications as well. This app is pretty much complex with more than 150 classes. I need some advice to know is it better to have only one application to works on both devices or it is better practice to have separate project for each iPhone and iPad?
EDIT
I want to use split view controller and vertical menu bar in iPad and side menu and horizontal menu bar in iPhone.

if you want to have two separate iPhone/iPad apps on the store, just make two targets of your application. This will mean you'll probably will use two different storyboards, but that's up to you. Go to your project settings and make two separate targets - one for iPad, one for iPhone. Edit the target general settings where one should only deploy for iPad while the other for iPhone. Posted some pictures below:
You'll want to also go to Manage Schemes, remove the current schemes you have and add the targets you just made. Then set these macros in your iPhone build so you can just edit one code base without needing to edit both the phone and tablet code -
Some example Code:
// Just for Phone Target
#ifdef PHONE
- (void)somePhoneMethod;
#endif
// For both phone and tablet device
- (void)aMethod;
I'd like to add to what everyone has said and if there isn't too much difference just make a universal app.

Use Auto layout and maintain in a single storyboard.
If you know about classes ,Autolayout Strong then my preference is
AutoLayout.
It will reduce your time and easiest handling.
this is Classes here if you like to do vertical layout only for ipad means ,you need to select like this
like this you can choose only for ipad,iphones,portrait,landscape like this :),Its upto your decision.

If UI is same for both so its better to use existing just check in classes for iPad and iPhone.

Related

Different versions of app for different devices - iPhone to iPad

I'd like to take my existing iPhone app and modify its layout/number of screens for an iPad.
I began by duplicating the Target with "Duplicate and Transition to iPad".
But I'm unsure where to go after that. I'll need a new Storyboard and some of the functions/viewControllers/views will need to be modified. Where/how do I do that?
All I can find are very old solutions that are no longer valid or leave too much out:
How to convert iPhone app to iPad app
This is the best one I've found, but again not current and still leaves a lot out:
http://innovationm.co/convert-iphone-application-to-universal-application/
I no longer see a "Universal" option. I am guessing that selecting all of these accomplish the same thing?
First, edit your target to make sure it is set for both iPhone and iPad:
Second, using two different storyboards is unusual nowadays, but you can easily do it. In your Info.plist configure two entries (using Raw Keys and Values): UIMainStoryboardFile and UIMainStoryboardFile~ipad. The result is that your app will load one storyboard for an iPhone and a different storyboard for an iPad.
Note that with a newer created project that uses window scenes under iOS 13 and later, you would configure UIApplicationSceneManifest and UIApplicationSceneManifest~ipad to specify different UISceneStoryboardFile values.
Here's a downloadable project that demonstrates the newer structure:
https://github.com/mattneub/Programming-iOS-Book-Examples/tree/master/bk1ch09p358universal

How can I make my iphone app suited to iPad?

Currently I was designed and developed my app in iPhone . Now I wanted make my app universal(iphone and iPad).Please guide me what will be the efforts and challenges on design and development ? could you please explain the steps.
While developing a app and want to makeit a universal app you should have to -
Make sure the design compatible for both iPhone and iPad. you can check it
from physical devices or form the simulator.
Make sure all the fields are ok (not breaking down while switching the
devices).
Make sure all the scrolling are working for both iPhone and iPad.
The main efforts will be on the following areas.
UI
You will need to obtain a new design suited for iPad depending on what you already have. If it is a simple interface, you port it to be viewed on iPad without a new design. But usually you need a iPad specific design.
You will have to change the layout of most screens to make it look good on the iPad. If auto layout is already used, it will be a little bit simpler. Otherwise I guess you will need to start thinking about separate storyboards and xibs for iPad specific screens.
Code
Assuming there is no additional functionality specific to the iPad, the main areas of change in code will be the those handling view presentation logic, navigation and animation. It all depends on the design you need to implement, but generally I would say you will need to change code that handles animation, presents new view controllers, handles storyboards etc.
Resources
You will need to provide resources specific to your iPad design.
Testing
Obviously you will need to do a LOT of testing :).
Eg: For example, location handling. There are no modern iPhones without GPS hardware, but iPads without cellular capabilities do not have GPS. So you location handling code might have to be rechecked. (It broke for me :))
AppStore
You will need to provide app store screenshots for the iPad screens.

Choose custom iOS compatibility

I have an app that recently got rejected because it doesn't work well on iPhone 4/4s or iPad. Is there a way in Xcode to say that it's only for certain models?
I dont think so, try to optimize your application for those devices
You don't define models as such; you define capabilities. You can sometimes use these to cull models as well, but only if your app legitimately uses whatever it is you're testing for.
An example: Bluetooth LE is only available 4s+. You can set your app to require this (or other certain hardware options) via plist keys (UIRequiredDeviceCapabilities - https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html) but only if your app actually uses BTLE. You will very likely get rejected if you "require" something you're not using.
Between iPad and non-iPad devices, you control that directly by what you select in the Deployment Info:Devices section of your project.
As annoying as it may be, you should totally modify your UI to be compatible, at least, with all iPhone models.
I assume you've built a layout that is made to fit exactly to the 4" screen. An easy solution would be to put your views into a scrollView instead of just on your view controller's view directly. Then you can at least scroll the UI to see it more easily on the iPhone 4.
But really, your solution should be to adopt auto layout and size classes, and make your UI completely compatible with all iOS devices. It's well worth the effort because it opens your audience to more users, and reduces the risk of poor ratings like "looks bad on iPad even though its not made for iPad. One Star."

ios - how do I make an app which I developed on the iPhone storyboard also work on the iPad?

I have an app that is nearing completion. So far I have just been using the iPhone storyboard to map out the navigation, but I would also like the app to work on the iPad. Is there a way to just "make it work" or do I have to re-do by hand the entire app flow on the iPad's storyboard?
Thanks!
Considering they have different resolutions, and aspect ratios, you really just have to grin and bear it, and convert it all manually. You can at least copy the storyboard file to a new one, and adjust the views one by one to be ipad-sized
If you made it a universal app, I'd suggest creating another storyboard targeted for iPad and work from scratch. You can still use all the controllers and methods therein for your new views (considering there's nothing very specific) with some slight modifications to adjust for the iPad.

Principles for creating universal app

I am in process of creating a new universal application.
Would it be "bad" or against guidelines to create separate classes to control the iPad version?
I am using a tabbarcontroller for the iPhone version and a splitview for the iPad version.
It seems easier in my case to create new classes to handle all the iPad stuff.
Thank you for your time!
Nope, not bad or against guidelines at all.
In my own universal apps, I use separate XIB's for iPad versus iPhone interfaces. And sometimes different (or additional) classes for iPads as well.
Probably one of the more important things is that the functionality is roughly the same between iPad & iPhone versions... will the tab bar view do the same thing the split view do, for example?

Resources