Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4245650
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T03:52:07+00:00 2026-05-21T03:52:07+00:00

I work yet on simulator and I am waiting for the test on the

  • 0

I work yet on simulator and I am waiting for the test on the device, while waiting I wish to share with you my code hoping you to help me figure out the causes of 5 warnings
my app is composed from 2 classes : CoreLocationController and GeoLocationViewController .

the CoreLocationController is the class which suppose to act as a Core Location Manager Delegate. This class will receive messages from the Core Location framework containing the raw data and will then pass this to our view controller class later on.
CoreLocationController.h

#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>

@protocol CoreLocationControllerDelegate
@required
-(void)LocationUpdate:(CLLocation*)location;//Our location updates are sent here
-(void)locationError:(NSError*)error;//Any errors are sent here
@end
@interface CoreLocationController : NSObject<CLLocationManagerDelegate> {

    CLLocationManager *locMgr;
    id delegate;
}
@property(nonatomic,retain)CLLocationManager *locMgr;
@property(nonatomic,assign)id delegate;
@end

CoreLocationController.m

 #import "CoreLocationController.h"
    @implementation CoreLocationController

    @synthesize locMgr,delegate;

    -(id)init{

        self=[super init];
        if(self!=nil)   {

            self.locMgr=[[[CLLocationManager alloc] init] autorelease];//create new instance of locMgr
            self.locMgr.delegate=self;//set the delegate as self

        }
        return self;    
    }


    -(void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation*)newLocation fromLocation:(CLLocation*)oldLocation  {   


        if([self.delegate conformsToProtocol:@protocol(CoreLocationControllerDelegate)])    {


            //check if the class assigning itself as the delegate conforms to our protocol. If not,, the message will go now here. Not good
            [self.delegate LocationUpdate:newLocation];

        }

    }


    -(void)LocationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error   {

        if([self.delegate conformsToProtocol:@protocol(CoreLocationControllerDelegate)])    {
        //check if the class assigning it self as the delegate conforms to our protocol.If    not, the message will go now here. Not good
            [self.delegate locationError:error];
        }
    }

    -(void)dealloc  {   
        [self.locMgr release];
        [super dealloc];

    }
    @end

GeoLocationViewController.h :

#import <UIKit/UIKit.h>
#import "CoreLocationController.h"
@interface GeoLocationViewController : UIViewController <CoreLocationControllerDelegate> {

    CoreLocationController *CLController;
    IBOutlet UILabel *locLabel;

}
@property (nonatomic,retain)CoreLocationController *CLController;
@end

GeoLocationViewController.m :

#import "GeoLocationViewController.h"

@implementation GeoLocationViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    CLController=[[CoreLocationController alloc] init];
    CLController.delegate=self;
    [CLController.locMgr startUpdatingLocation];
}

-(void)locationUpdate:(CLLocation *)location    {

    locLabel.text=[location description];

}
-(void)locationError:(NSError *)error   {

    locLabel.text=[error description];
}
- (void)didReceiveMemoryWarning {
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];

    // Release any cached data, images, etc that aren't in use.
}
- (void)dealloc {

    [CLController release];
    [super dealloc];
}

@end

Now for the warnings I got :

warning: property 'CLController' requires method '-CLController' to be defined - use @synthesize, @dynamic or provide a method implementation


 warning: property 'CLController' requires the method 'setCLController:' to be defined - use @synthesize, @dynamic or provide a method implementation


 warning: incomplete implementation of class 'GeoLocationViewController'


 warning: method definition for '-LocationUpdate:' not found


warning: class 'GeoLocationViewController' does not fully implement the 'CoreLocationControllerDelegate' protocol

Last question please, if my build run successufully, but my code doesn’t show any informations about geolocation, should I wait to test my build on device to judge on it ??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T03:52:08+00:00Added an answer on May 21, 2026 at 3:52 am

    The first warning (and the next two, which are the same thing):

    warning: property 'CLController' requires method '-CLController' to be defined - use @synthesize, @dynamic or provide a method implementation
    

    It means, you need to @synthesize CLController in your GeoLocationViewController.m file after @implementation. It will still work, though, because you are not referencing it as a property inside the class (i.e. you are not referencing it with self.CLController but just CLController. So just put @synthesize CLController after @implementation for GeoLocationViewController.m.

    The second error

    warning: incomplete implementation of class 'GeoLocationViewController'
    warning: method definition for '-LocationUpdate:' not found
    

    You did not specify LocationUpdate as a method in your GeoLocationViewController.h file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I personally don't use FxCop yet. We want to work out the unit testing
Work on this small test application to learn threading/locking. I have the following code,
Unfortunately, Devel::Cover does not yet work with threads. It doesn't work with prefork either.
The Maven Buildnumber plugin doesn't appear to work with GIT yet. Is there a
work on asp.net vs 05 C#.Master page header contain the bellow code <script type=text/javascript
How do I test the microphone in my IOs simulator? I don't think it
edited for clarification; why wont this work yet compile? class Member{ public: __int32 PublicInt;
This is supposed to work yet just says no stocks table - supposed lost
work on SQL Server 2000. want to Automated Email Notifications using SQL Server Job
Work on asp.net vs05. I have three type of value Like:IsDesign,IsPrinting,IsInstall they are bit

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.