I have a fairly intense view with two subviews, core location, and Parse.
My Beacon Region cannot get initialized. I have copied the code in the notification example.
I have successfully ran the demos.
I'm using pods.
{pod 'EstimoteSDK', pod 'Parse', '~> 1.4', pod 'ParseFacebookUtils', '~> 1.4', pod 'Facebook-iOS-SDK', '~> 3.19'}
IOS VERSION: 8.1, Xcode 6.1 (6A1052d)
Here is Pseudo Code:
SomethingViewController.h
#import <CoreLocation/CoreLocation.h>
#import <EstimoteSDK/ESTBeacon.h>
#import <MapKit/MapKit.h>
#import <UIKit/UIKit.h>
#import and more....
@interface SomethingViewController : UIViewController <MKMapViewDelegate,
CLLocationManagerDelegate, RNFrostedSidebarDelegate, ESTBeaconDelegate>
- (id)initWithBeacon:(ESTBeacon *)beacon;
@property (nonatomic, weak) id<SomethingControllerDelegate> delegate;
@property (nonatomic, strong) IBOutlet MKMapView *mapView;
@end
SomethingViewController.m
@interface SomethingViewController ()
<SomethingTableViewControllerDataSource,
SomethingCreateViewControllerDataSource,
ESTBeaconManagerDelegate>
@property (nonatomic, strong) ESTBeacon *beacon;
@property (nonatomic, strong) ESTBeaconManager *beaconManager;
@property (nonatomic, strong) ESTBeaconRegion *beaconRegion;
- (id)initWithBeacon:(ESTBeacon *)beacon { self = [super init]; if (self) { self.beacon = beacon; } return self; }
- (id)init
{
self = [super init];
if (self) {
self.title = @"Application Title";
and Two other notifications...
-
(void)viewDidLoad {
[super viewDidLoad];ESTBeacon *beacon = [[ESTBeacon alloc] init]; //Seen in debugger
self.beaconManager = [[ESTBeaconManager alloc] init]; //Seen in Debugger
self.beaconManager.delegate = self; //Seen in Debugger
self.beaconRegion = [[ESTBeaconRegion alloc] initWithProximityUUID:self.beacon.proximityUUID
major:[self.beacon.major unsignedIntValue]
minor:[self.beacon.minor unsignedIntValue]
identifier:@"RegionIdentifier"];
/// Under Self in the debugger, this returns null
self.beaconRegion.notifyOnEntry = TRUE; //Instead of a ui button
self.beaconRegion.notifyOnExit = TRUE; //Instead of a ui button
[self.beaconManager startMonitoringForRegion:self.beaconRegion];
And the Did Enter, Did Exit Routines that I assume are called by the active manager based on a valid region.
Questions:
- Can Core Location conflict with beacons?
- What about the Init above?
- Is my problem delegates?