Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 13    Views: 79

Alex@TM
Apple Fan
Profile
Posts: 956
Reg: Dec 20, 2011
London, UK
10,560
09/05/12 02:08 AM (13 years ago)

Depreciations (iOS)

Hi guys, I have upgraded to Mountain lion and had quite a few warnings when packaging the build. I fixed all of these, I just wanted to point out that setStatusBarHidden:animated is now depreciated and causing warnings when achiving. Also getDistanceFrom and locationServicesEnabled Any quick, easy fixes would be useful to all..(and me:)) Many thanks.
 
theMonster
Code is Art
Profile
Posts: 435
Reg: Oct 18, 2011
US
8,050
like
09/05/12 10:03 AM (13 years ago)
Haha it only shows as deprecated if your build level is iOS 4 (I think) or higher. There isn't really a quick fix, but are you using BTv1.5 or BTv2.0?
 
GeGro
Apple Fan
Profile
Posts: 14
Reg: Jul 11, 2012
Mülheim-Kärli...
1,890
like
09/05/12 11:17 AM (13 years ago)
I have the same problem!
 
Alex@TM
Apple Fan
Profile
Posts: 956
Reg: Dec 20, 2011
London, UK
10,560
like
09/05/12 11:30 AM (13 years ago)
V1.5 monster. I've no idea how but they disappeared on their own, well with a bit of tinkering but no changing of the code :) The warnings when packaged can pretty much be sorted with several '%' s
 
theMonster
Code is Art
Profile
Posts: 435
Reg: Oct 18, 2011
US
8,050
like
09/05/12 12:07 PM (13 years ago)
Haha yep, no clue why the build comes with those @"", @"". And the @"Hello @", @"Hi". But easy fix. And the reason why they went away is likely due to you lowering your build target to 3.x or 4.x.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
09/05/12 12:56 PM (13 years ago)
Yup, changing the build target does have complicated implications. We've recommended building for 3.x for a long time. When you do this you should get NO errors or warnings. When iOS 6 comes out we may re-visit this idea and begin recommending 4.x or higher. If this is the case, we'll need to modify some base code to prevent some compiler warnings. "no clue why the build comes with those @"" Not totally sure what you're asking but I'll try to explain some technical stuff. In Objective C, string objects (words, sentences, etc) are created like this: NSString *myString = @"this is my string"; See the 'at' sign, this is required. There are other ways to create a string object but that's the most common. An empty, blank string is... NSString *myString = @""; So far so good. In many parts of the project you'll see method calls that take a few arguments. Oftentimes these arguments are string objects. And, oftentimes these arguments require a string. The trouble is, sometimes a string is not available when the method is called. In these cases, you could see something like... NSString *myString = @"this is my string"; [self.myRandomFunction myString] OR... [self.myRandomFunction @""]; Notice that in the first method call we passed in a string object named myString. In the second case we didn't have a variable to pass so we just passed in an empty string. In Xcode when targeting 4.x or higher, the compiler doesn't like "empty strings" that are not explicitly created before use, this causes compiler warnings. If this... [self.myRandomFunction @""]; caused a compiler warning you could do... NSString *myString = @""; [self.myRandomFunction myString]; See the difference? You're explicitly telling the compiler... "Hey, I have this string object, it's called myString and it's empty. Use it in this method call that requires a string" Hope that helps explain a bit of how Objective C and the Xcode Compiler work together to try to HELP the developer understand what's happening. Remember, warnings are GOOD, they help you discover new things, learn a bit, and see into the inner workings of iOS. Nerdy, totally. Cool. Some think so. LOL
 
MANN
Apple Fan
Profile
Posts: 4
Reg: Sep 03, 2012
California
4,190
like
09/08/12 08:36 AM (13 years ago)
the app won't let me download the source code when i try to download the source code from buzztouch it shows: done<div style='border:1px solid red;padding:10px;margin: 10px;backround-color:#FFFFFF;'>Oops, an error occured trying to access a resource.<div>
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
09/08/12 11:10 AM (13 years ago)
@MANN "the app wont' let me download the source code" What won't let you download source code? What app? How is this related to this post, "Depreciation warnings" I'm confused.
 
Alex@TM
Apple Fan
Profile
Posts: 956
Reg: Dec 20, 2011
London, UK
10,560
like
09/08/12 11:19 AM (13 years ago)
David, thanks for all the above relating to the depreciations. I have managed to successfully code a few apps prior to finding buzztouch but were many soundboards using the very simple ibaction. I also appreciate your comments with regards to warnings helping with understanding code. I enjoyed sorting the warnings when the package contents were downloaded just needed a bit of a steer with the depreciations. All the best.
 
MANN
Apple Fan
Profile
Posts: 4
Reg: Sep 03, 2012
California
4,190
like
09/11/12 05:52 PM (13 years ago)
when i try to download the source code from buzztouch it shows: done<div style='border:1px solid red;padding:10px;margin: 10px;backround-color:#FFFFFF;'>Oops, an error occured trying to access a resource.<div>
 
theMonster
Code is Art
Profile
Posts: 435
Reg: Oct 18, 2011
US
8,050
like
09/11/12 06:47 PM (13 years ago)
Yeah I've gotten that too, I believe it might be a bug.
 
MANN
Apple Fan
Profile
Posts: 4
Reg: Sep 03, 2012
California
4,190
like
09/11/12 07:13 PM (13 years ago)
thats nice too know it is my first app so i though it was my computer
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
09/11/12 10:18 PM (13 years ago)
Check out this thread and see if it helps. It's likely due to your application icon: http://www.buzztouch.com/forum/thread.php?tid=87AA7B142869E21E2898E1A&fid=2C1C22C1EADEDB22F61C5E5 Mark
 
MANN
Apple Fan
Profile
Posts: 4
Reg: Sep 03, 2012
California
4,190
like
09/12/12 02:40 PM (13 years ago)
thank you so much
 

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.