Note that there are some explanatory texts on larger screens.

plurals
  1. POCompilation error with Xcode 4.2
    primarykey
    data
    text
    <p>ok, I think I am officially going nuts...trying to run this code on xcode 4.2 with iOS 5.0 simulator and getting all sorts of errors. In this app, all I am trying to do is to run the core location API.</p> <p>My location "controller" class:</p> <p>.h:</p> <pre><code>#import Foundation/Foundation.h #import CoreLocation/CoreLocation.h @protocol locationReceiverDelegate @required - (void)locationUpdate:(CLLocation *)location; - (void)locationError:(NSError *)error; @end @interface locationReceiver : NSObject &lt;CLLocationManagerDelegate&gt; { CLLocationManager *locMgr; id delegate; } @property (nonatomic, retain) CLLocationManager *locMgr; @property (nonatomic, assign) id delegate; @end </code></pre> <p>.m:</p> <pre><code>#import "locationReceiver.h" @implementation locationReceiver @synthesize locMgr, delegate; - (id)init { self = [super init]; if(self != nil) { self.locMgr = [[CLLocationManager alloc] init]; self.locMgr.delegate = self; } return self; } - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation { // if([self.delegate conformsToProtocol:@protocol(locationReceiverDelegate)]) { [self.delegate locationUpdate:newLocation]; // } } - (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error { // if([self.delegate conformsToProtocol:@protocol(locationReceiverDelegate)]) { [self.delegate locationError:error]; // } } @end </code></pre> <p>I am getting an error in the .m file that "@synthesize locMgr, delegate;" that "Existing ivar 'delegate' for assign property 'delegate' must be _unsafe_unretained"</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload