| iOS Development Discussion on developing apps for the iOS platform. |
| Post Reply | New Thread | Subscribe |
|
|
Thread Tools |
![]() Member Since: Oct 11, 2011
Posts: 38
![]() Mac Specs: 13" MacBook Pro 2.4 GHz 8 GB Ram 250 GB HD, iPhone 4/S 64 GB, iPhone 3GS 16 GB, iPad 16 GB Wi-Fi
|
basically i have this warning, its nothing big, it just bothers me that its there.
heres my code: Code:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
GlobalStrings* theDataObject = [self theGlobalClass];
theDataObject.deviceUDID = [[UIDevice currentDevice] name];
self.locationManager = [[CLLocationManager alloc] init];
locationManager.desiredAccuracy = kCLLocationAccuracyBest;
locationManager.delegate = self;
[locationManager startUpdatingLocation];
NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:5.0 target:self selector:@selector(sendGPS) userInfo:nil repeats:YES];
return YES;
}
i used to have "timer release" at the bottom, but it had errors as this method is connected with another method in the app delegate. so i had to get rid of it from crashing. is there anything i can just put in here that useless that'll get rid of it? |
| QUOTE Thanks | |
![]() Member Since: Aug 13, 2011
Location: West Sussex, UK
Posts: 143
![]() |
Not sure exactly what your question is, but if it's about not getting warnings for your unused
timer variable you have two obvious options. first you can disable the warnings for unused variables in the project build settings, under the Apple LLVM compiler 3.0 - warnings heading, make sure you only switch these off for the project, and not for the target app, but be warned this is not advised as you will not get any warnings about unused variables throughout any your project files. Second you could use the timer variable in an NSLog statement to get rid of the warnings, even though the log statement has no other debug purposes, like this. [CODE] NSLog(@"time interval = %f", [timer timeInterval]); [/CODE Hope this is of some help. Regards mark |
| QUOTE Thanks | |
| Post Reply | New Thread | Subscribe |
| Thread Tools | |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
|
|||||||
Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| llvm gcc 4.2 install? | wfs123 | OS X - Development and Darwin | 16 | 01-24-2012 04:13 PM |
| Building Mac-On-Linux | Dreamcast270mhz | Running Windows (or anything else) on your Mac | 3 | 04-03-2010 10:04 AM |
| first mac , i'm not pleased | lilmill | Switcher Hangout | 34 | 12-17-2007 09:05 PM |
| error message during weekly maintenance | ajresovsky | Schweb's Lounge | 0 | 06-18-2006 05:11 PM |
All times are GMT -4. The time now is 09:46 PM.
Powered by vBulletin