iPhone 3GS iOS 5 support (nibs to storyboards) - ios

I have an iOS project that supports iPhone 3GS and on and requires iOS 5 or later.
This project is using nibs instead of storyboards and is using ivars and properties the "old" way (i.e declaring ivars and the appropriate properties).
I would like to work hard and convert this project to a "new" way, i.e to storyboards and clean up the redundant ivars and the synthesise things). It does use ARC, though.
My question is first: will I still be able to support iPhone 3GS?
And second, is there any convenient way to transform this project to the new-fashioned way besides just manually copying the nibs to storyboards and managing all the IBOutlets and IBActions and so on?
Thanks!

will I still be able to support iPhone 3GS? NO
Apple doc clearly says
Storyboards are supported in iOS 5 and later and are enabled by default for new projects. If your app must run on earlier versions of iOS, though, you cannot use storyboards and should continue to use nib files
Is there any convenient way to transform?
There is no shortcut(single step)to convert an existing application to use storyboards.
Converting to Storyboards

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

Developing iOS user interfaces programmatically

I've been developing iOS apps for the past 3 years and learned to do so without the use of nibs and storyboards. With the release of iOS 8 and the new iPhones there are ALOT of factors to take into account when developing for iPhone and even iPad devices (Resolution, Screen size, etc.).
The first problem I ran into with Xcode 6 is you can't create a empty project anymore. The closest option is a single view application. I found the following answer here.
Now it seems that apple is really pushing auto-layout, the use of the size classes and the use of storyboards and Interface builder. Is there any way to support the native resolutions of the iPhone 5, 6 and 6 plus and do this programmatically? The only option I can see is defining the frame of each UI element for each device which will lead to a ton of code.
Auto layout IS programmatic. Apple has given the necessary API's to handle size classes entirely in code if you don't want to use interface builder or storyboards and there has always been ways of adding constraints in code too.
You might think IB is a silly tool for noob developers or is only for basic apps and you need more power or whatever your reason, but maybe trying to do every thing yourself in code is a bet you have now lost. Give tools a try.
It's referred to as VFL or Visual Format Language.
VFL Tutorial

storyboard and apple recommendations

im starting a new project now and I would like to build it with nibs and not with storyboard, apple removed the option in xcode 5 to build an app without storyboard, my question is that is there any recommendations by apple that developers should develop with storyboard and other xib files will not be allowed in the future? or its ok and apple will always support nib files without storyboard projects and allow it to be submitted in the future
thanks
Apple certainly seem to be pushing people to use Storyboards, but there's nothing to stop you removing Storyboards from a project and just using Xibs. I only use Storyboards sometimes, occasionally use Xibs, and often write entire apps programmatically (no Xibs or Storyboards at all). There are a number of important use cases which are only possible using Xibs, so they won't be going anywhere any time soon.
The only change Apple made was that project templates always include a Storyboard - but you can still remove it once you've created a new project.

Upgrading an iPad app from 3.2 to 6.1 on Xcode

I am starting to work on iPad application which was created in 2011 for iOS 3.2. Now I would like to upgrade the application to be able to work properly on iOS 6.1 and also add some new features. What are your advices to do these tasks? Main points that I capture so far as:
Add storyboard
Remove xibs
Fix .m/.h missing file errors
Do you know when I add the storyboard if it is going to be updated with my app screens automatically? Or do I have to introduce the screen all the properties one by one?
You'd have to add your screens into the storyboard one-by-one yourself. But you can carry on using XIBs just fine - there's absolutely no reason you have to have a Storyboard, unless there's some specific reason you need it. I generally don't use them very much, even in iOS 7-only apps.

Convert Storyboard to XIB

I created an app using the iOS 5 Storyboard feature, and have decided I would like it to also run on iOS 4. How can I convert my Storyboard (Which only contains one ViewController) into an XIB? Also, will ARC compile for iOS 4?
I don't think there is an automatic way to go from storyboard to xib. i think you will need to make the nibs and copy paste.
ARC will run on iOS 4. The compiler inserts the necessary extra code to free memory for you. ARC works from 4.0 on.

Resources