Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
iOS Development
How To Get Rid Of Unused Variable Warning?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Loon3y" data-source="post: 1396042" data-attributes="member: 217795"><p>basically i have this warning, its nothing big, it just bothers me that its there.</p><p></p><p>heres my code:</p><p></p><p></p><p></p><p>[CODE]- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions</p><p>{</p><p> GlobalStrings* theDataObject = [self theGlobalClass];</p><p> theDataObject.deviceUDID = [[UIDevice currentDevice] name];</p><p> </p><p> self.locationManager = [[CLLocationManager alloc] init];</p><p> locationManager.desiredAccuracy = kCLLocationAccuracyBest;</p><p> locationManager.delegate = self;</p><p> [locationManager startUpdatingLocation];</p><p> </p><p></p><p> NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:5.0 target:self selector:@selector(sendGPS) userInfo:nil repeats:YES];</p><p> </p><p></p><p> </p><p> return YES;</p><p>}[/CODE]</p><p></p><p></p><p>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.</p><p></p><p></p><p>so i had to get rid of it from crashing.</p><p></p><p></p><p>is there anything i can just put in here that useless that'll get rid of it?</p></blockquote><p></p>
[QUOTE="Loon3y, post: 1396042, member: 217795"] 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; }[/CODE] 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]
Verification
Post reply
Forums
macOS & iOS Developer Playground
iOS Development
How To Get Rid Of Unused Variable Warning?
Top