Is the use of storyboards in Xcode 4.2 production ready and recommended? (c.f. previous XIB methods) - iphone

Is the use of storyboards in Xcode 4.2 production ready and recommended?
That is, would iPhone/iPad developers that have used storyboards recommend (for native iPhone/iPad apps) to definitely use storyboards? Or are there some gotchas and issues still with the concept?
P.S. Also do storyboards assist in getting a Universal Application designed/working?

This depends, for the most part, on your target audience. The only potential deal-breaker is the fact that using storyboards requires you to set your app's deployment target to iOS 5.0 or later; a storyboarded app cannot run on any earlier version of iOS.
If you must cater to previous versions of iOS, you have to continue using individual nib files if designing your interface with Interface Builder. I'd also recommend sticking with whatever you're already using in your existing projects. (You can introduce storyboards into your existing projects in steps, but remember that they'll only work in iOS 5. There's a WWDC 2011 presentation that walks you through this process.)
For new projects, storyboards seem to be the way to go, as long as you're sure you won't need to deploy to previous iOS versions.
Also do storyboards assist in getting a Universal Application designed/working?
Not sure what you mean by "assist", but you have to create one storyboard of nibs for each device family. So one for iPhone/iPod touch, and one for iPad.

It would be interesting to know how much of the market you are missing out on by targeting only iOS 5. I have noted that there is a significant percentage of iPhone users who dont upgrade their iOS be it from iOS 3 to iOS 4 or even iOS 5 so any apps targeting iOS 5 will mean they can not download any app you create.
I started out using iOS 5 with storyboard and it's a great feature, but had to pull back and use xibs so that I get backwards compatibility. There's just too much of the market you will miss out on by only targeting iOS 5.
ARC is a great plus, and just for that feature alone I am happy with the transition to iOS 5. Not to mention the new CLGeoCoder class and JSON now included. Anyone who wants to use JSON API have a look at this great tutorial from Ray Wenderlich.

Related

Targeting iOS version, and which features will be available

I am learning iOS development. And I had couple of questions, hope people don't mind
answering them here.
I was reading a chapter about ARC in a book. It seems nice. I've heard it is for iOS 5. Now, my question is, if I want my app to be available for iOS4 - does it mean I can't use ARC? (that would be a shame).
Also, I am not sure yet, for which version of iOS I should target my app. How is this reflected on my code? For example, I suppose if I target iOS5 I can't use features of iOS6 right? But if I target iOS6, then my app won't run on iOS4?
Any tips in this direction appreciated.
I agree with David's comment and you should concentrate on iOS 6, but for information and future you would construct your app using a combination of weak linking and respondsToSelector: so that your app can use features of newer versions of iOS but still be compatible with older versions.
NO Arc can be only for iOS 5 or later but if you want your older code to be ARC enabled then you can Refactor->convert to ARC for that file. Also if you want your code to be Arc disabled then for each file you can write down "-fno-objc-arc" in build settings.
Ya new features wont be compatible for your older versions. So make sure you should be very specific for your requirements. The requirements of your App will make you conclude which iOS version you should target.
Hope this helps :)
You can make individual file non-arc as per your requirement in Project.
It is very simple way to make individual file non-arc.
Follow below steps :
Disable ARC on individual file:
Select desired files at Target/Build Phases/Compile Sources in Xcode
Select .m file which you want make it NON-ARC
PRESS ENTER
Type **-fno-objc-arc**
you can use ARC in ios 5 and above but not in IOS4.
If you targeting your app to IOS 5 then you will be able to use ARC as well. If u target it to iOS 5 then it will work on IOS 6 as well (only the deprecated features wont work on iOS 6).

What iOS version to use when start building an iOS App now and publishing in 1-2 months?

Couldn't find similar questions:
I'm currently designing my app and after that I will build it with Xcode 4.2. My question is what iOS version should I use - iOS4 or iOS5?
I was trying out storyboard and ARC, so it would be great to build the app with iOS5, but I don't know if it will be better to use iOS4 to reach more users?
What are your advices?
Merry XMas! :)
According to this report, about a third of users had updated to iOS 5 in October. The figure has probably increased since then and will continue to increase (especially considering the huge influx of new iOS 5 devices which will enter use after Christmas), so by the time you publish your app it is quite likely that about half of users will have iOS 5.
Whether it's worth losing about half of your potential market for the extra features which are available when developing for iOS 5 is entirely up to you. To some extent, it also depends of what the app is - if it is something targeted at people who make intensive use of their iPhone, chances are they will already have upgraded, so it shouldn't be a problem. If, on the other hand, it's something that is likely to be used by non-techsavvy people, you might be better off making it compatible with iOS 4.
I would say go for IOS 4, you can still use Arc, and StoryBoards are not the end of the world...
I would:
In Xcode, set Base SDK to Latest iOS (iOS 5.0) and set iOS Deployment Target to iOSx.xx where x.x is any version from 3 to 5. The deployment target is where you can decide what is the minimum version of iOS that your app will need in order for it to work. So the lower the number would mean you can reach more targets. Just make sure you do test your app on those versions that you set before submiting to iTunes for review.

ios5 storyboard application for ios4

I am creating a new application and am planning to start with ios5 as it supports storyboards. However, I am not sure if the app that is compiled with ios5 runs on ios4 as we are looking at kind of a forward compatibility. Since ARC is a compile time feature, I am guessing that is not a problem. However, the calls like prepareForSegue or performSegueWithIdentifier depend on ios5 api's. However as the code is built, I am wondering if the executable assembly is capable of running on ios4 devices. Can some please shed some light on this?
Also, if the answer is a strict NO, do I need to go back with traditional NIB's for the app? Are there any selective features that may work and that may not?
The UIStoryboardSegue is iOS 5 only, thus the app will not run on iOS 4. Since it not a compile time feature, you will have to go back to using NIB's.
Any methods you use that are only available in iOS 5 will not work in iOS 4, thus meaning that any methods that deal with the storyboard will not work in iOS 4.

iOS storyboard on iOS 4?

Well, I got the new XCode and I saw it's nice new storyboard features. It's really nice and I LOVE IT. I spent about 2 or so weeks making a new app that I wanted to update. However, when submitted it through xcode, it gave me this error
The Bundle is invalid. The key UIRequiredDeviceCapabilities in the Info.plist may not contain values that would prevent this Application from running on devices that were supported by previous versions.
So I went back and set the deployment target to 4.0, but it wouldn't let me build. Soon after I realized storyboards were only compatible on iOS 5. Is there anyway I could get it working on iOS 4 by converting them to XIB's somehow?
I really don't want to just submit a new app that's iOS 5 compatible, because most people don't have iOS 5...
Thanks.
According to this, storyboards are absolutely not compatible with iOS4 as they rely on new runtime classes.

iPhone and SDK different version compatibility issues

I am a beginner Apple developer and I have some issues I would like to resolve.
First of all, I am curently working on Xcode 3.2.6 because I haven't enrolled for the developer program yet. I would like to know if Apple only accepts apps (for the App Strore) compiled on SDK 4.
Secondly, I want my apps to work both on iPhone 3 and 4. What would you advice me to do? I have read in several developer forums that in order to achieve this I have to build my application with 3.1 iOS as a target. Is this correct?
Finally, is there any problem due to the difference in resolution between iPhone 3 and iPhone 4? Which resolution do you think I should use?
Thank you in advance,
Cherry
Set Base SDK to latest (4.3).
Set Target SDK to 3.1.
Avoid features available only in iOS 3.2 or later (e.g., don't use blocks, don't frameworks introduced in iOS 3.2 or later, always check availability of methods). Later, when you get more experience with Objective-C, you may try to combine features of more modern iOS, but still keep compatibility with older iOSes.
Don't worry about resolution. It affects only images – if you want to take full advantage of Retina display, then you will need to create images for both resolutions (std. and hi-res).
P.S. I suggest you to avoid support for iOS 3.2 or earlier. iOS 4 introduces a lot of nice and helpful features. And I pretty sure, Apple will revoke support for iOS 3.x soon after iOS 5 release.
If you are aiming for iOS 3, you will end up not using the features of iOS 4, which is the majority.
This is Apple's statement.
Target the latest iOS release.
Targeting the latest release allows you to take advantage of all the features
available in the latest version of iOS. However, this approach may offer a smaller
set of users capable of installing your application on their devices because your
application cannot run on iOS releases that are earlier than the target release.`
Target an earlier iOS release.
Targeting an earlier release lets you publish your application to a larger set of
users (because your application runs on the target OS release and later releases),
but may limit the iOS features your application can use.`
But I would suggest that you target the iOS 4 as people are now targeting iOS 5, and in another 8 months, I am sure Apple would release iOS 6 (They are very quick with their updates), and I personally feel that targeting iOS 3 is not going to give you great results in the long run.