MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
07/10/12 01:29 PM (13 years ago)

deprecated warnings in Xcode

What are deprecated warnings, and how to deal with them? The app still builds. Thanks
 
DannyH
Apple Fan
Profile
Posts: 122
Reg: Nov 30, 2011
location unknow...
2,220
like
07/10/12 03:06 PM (13 years ago)
It will be useful to know the warnings. Set the minimum build as 3.0 and they will go away.
 
MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
like
07/10/12 03:20 PM (13 years ago)
Thank, that solved. But what do they mean? I don't even know what deprecated means in this content. Thank you
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
07/10/12 04:26 PM (13 years ago)
Deprecated code is code that is no longer being developed in favor of newer, better code. It'll still work, but it's advised to use the newer code instead. In the case of buzztouch, some of the v1.4 and v1.5 code is deprecated with newer versions of iOS. For the moment, it'll work, until Apple decides not to support it at all. Then David will have to either stop supporting that version of buzztouch, or modify the code. In the meantime, though, you're good to go! Mark
 
the_oilman
Apple Fan
Profile
Posts: 38
Reg: Jul 01, 2012
SW Wyoming
10,880
like
07/10/12 06:23 PM (13 years ago)
I am using v2.0 and I ran into some deprecated code a week ago. I had to re-look it up, but this is what I was getting as deprecated: [[UIApplication sharedApplication] setStatusBarHidden:NO animated:YES]; This is the new code: setStatusBarHidden:withAnimation: is the new method, which takes a UIStatusBarAnimation instead of a BOOL, so you can choose what animation is used to hide the status bar. I had to make a change in the code manually. I had another instance while playing with Dropbox's API code (I think that's what its called) - actually quite a bit, which is weird since its their most updated version of their SDK file. Anyways, there were over 20 errors, some of which SDK readily recommended new code for and most which were not fixable by me (yet). I wish I could remember where I got the StatusBar error at... but I solved it easily by Googling the message and immediately finding the new code. Fred
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
07/10/12 10:45 PM (13 years ago)
iOS and Xcode do both a GREAT job and a HORRIBLE job of helping developers understand warnings and error messages as they relate to depreciated code. As good as Apple does, it's challenging for them because there are lots of different version of Xcode, lots of different versions of iOS and lots of different ways to choose the "build target" and other various settings when compiling an app. It's hard to say what the best method is but we generally... a) Make sure we have the latest build of Xcode running. b) Make sure we set the minimum build to iOS 3.0 to ensure the largest number of devices will be able to run the app. When deprecated warnings show up, for whatever reason (lots of possible combinations) it's important to find them and fix them. Fixing them is normally as easy as finding the newly named method (iOS / Apple renamed or replaced the deprecated method call with something else) and updating the source with the new method and syntax. Googling' the deprecated method generally shows a ton of examples on the subject you're dealing with. Nobody is alone and lots of folks in iOS Land will see the same deprecated warnings you're seeing (these are the folks that have their dev. environment setup just like yours is).
 
MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
like
07/11/12 09:02 AM (13 years ago)
Thank you guys.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.