I'm using some methods in some apps that are now marked as deprecated since iOS5. I'd like to know when these updates will become urgent.
So, usually, when does a deprecated method becomes obsolete ? Is there a chance that this will be with iOS 5.1 ? Or is this always with a major version like iOS 6.0 ?
This depends and changes from method to method and property to property. If you look at something like the
cell.textColor
it has been deprecated since iOS 3.0 and can still be used. So unfortunately there's not a specific answer to the general thing about stuff being deprecated.
As far as I know, no published API has actually been removed from iOS yet, but that's no reason to be complacent. There's no reason to keep using deprecated methods as long as the replacement is available in all the versions of iOS that you need to support.
As for when they'll actually be removed, that's entirely speculation. Keep an eye on the release notes for new versions as they become available. My guess is that they'd only remove them in a major release but there are no guarantees...
For the most part, its in Apple's favor to keep backward-compatibility with older apps.
So when they finally do cut something out, it will be because maintaining it has gotten too expensive or because maintaining it would make adding some new feature difficult or impossible. (And that reasoning might include cutting deprecated code out because the system is getting too big to fit into the device.)
A better reason to avoid using deprecated methods is the app approval process. Apple may require new submissions to avoid deprecated code well in advance of actually cutting out that code.
Related
I'm currently maintaining legacy code project that requires me to resolve deprecation warnings for outdated iOS versions. Looking through documentation as well as Xcode warnings, I'm able to determine which methods are deprecated and recommendations on which methods should be used to replace deprecated code.
Out of curiosity, is there a way we can determine why a specific code was deprecated? Is there a system design explanation that tells us devs why this deprecation was needed? Thanks in advance.
There isn't anything built into the documentation. But by looking at the header and the replacement, and/or by watching the relevant WWDC video, you can usually get the point. (I've certainly never had any difficulty with this.)
I'm using GLKit's GLKView in one of my projects. As per Apple's documentation it is deprecated. I can still use it in my app and it is fully functional (for what I want it to do) with latest iOS versions. I'm using it because of an older SDK that I'm using has good functionality for it. What are reasons not to use it anymore?
If something is deprecated, that means they may remove it in future versions. If you continue to use it, your code may break next time you update the library.
They left it in despite being deprecated to give you an opportunity to switch to a new solution.
A function being deprecated means that it is still supported for now, but they are planning on deleting it. Often times this is because there is other better ways to achieve the same. A reason to not use it anymore is because it will very probably be deleted eventually.
You can use it now,but maybe can't in the future.Such as UIWebView just like Apple said:
Apple will stop accepting submissions of apps that use UIWebView APIs.
It's the same.
In iOS development, deprecated methods can be used until they are "removed".
I understand deprecated methods are not suggested to be used but does that mean they might not work properly or can cause fatal problem?
What are deprecated methods:
Deprecated methods or classes that are outdated one which will eventually be removed.
Apple deprecates some methods/ classes, when they introduce a superior replacement, usually because they want to take advantage of new hardware, OS or language features (e.g. blocks) that were’t around when the original method was conceived.
When a deprecated method will be removed:
It depends according to the severity of method/property. For example:
cell.textColor
This property has been deprecated since iOS 3.0 and we can still use it. So unfortunately there's no any tight deadline of removing the stuff being deprecated.
soon I found out that viewWillAppear has been deprecated since iOS 6. I am pretty upset because
it was used in all the tutorials that I learned from. So what should I do now when I want to develop apps for later versions and when I want to call this method. Is there some kind of substitution for it?
Thanks
Is NOT depracated as you can see in Apple doc here. Maybe you are talking about viewDidUnload. Apple changed the view controllers lifecycle and is not needed anymore. If you want to relese memory during memory warning you can still use the method -didReceiveMemoryWarning
I know this is a well known and discussed issue. And I've already search here for what I want to know and couldn't get any conclusion.
UniqueIdentifier is still working in iOS6.0.1 (although it's deprecated since 5.0, I know). But is it possible that it can be returning some different (or nil) string than in older OS versions? And possibly only in some specific devices? I've managed to test in 5.1 and the returned string is equal to the one in 6.0.1.
I've read a lot saying that it doesn't work anymore, but fact is it still works. Now the question is, does it still work exactly as before? Could something have changed due to deprecation? I know I shouldn't depend on uid anymore, but I'm just trying to analyze and debug some strange behaviors I'm having in an app lately.
Thanks,
Francisco
For iOS 6 and above you should use NSUUID:
http://developer.apple.com/library/ios/#documentation/Foundation/Reference/NSUUID_Class/Reference/Reference.html
I realize that doesn't answer your actual question. Apple doesn't want you to use the older method anymore for whatever reason and there have been cases of applications being rejected for using it. So whether or not it works is probably a lesser issue if you won't even be able to submit it ;). I don't think the mechanism has changed though.