Closed onskulis closed 9 years ago
Hi @onskulis, everyting is fine looking at the code. Is ranging not working for you as well? where is your startAds method invoked?
Hello, thanks for the answer. I got things to work, done with code and everything works great. But I still have few questions. I have implemented estimote beacon code directly in the ViewController. It works perfectly, I used strong atomic properties to keep BeaconManager, BeaconRegion and Beacon. Since iOS 7.1 I was even able to detect beacons when app was in the background or completely closed. I could leave my iPhone lay for a few days and if I come with a beacon it sends me a notification.
Now... I moved all my code from ViewController to static cocoa library.... And it works only when: -app is in background, -bluetooth turned off and on again after app is completely closed, -im actively using iPhone/unlock the screen.
It doesn't work anymore if: -I close the app completely -I lock the screen.
How comes such a behavior?
Hi onskulis: Was your problem solved?
I have the same problem
@alejogamboa yes. As you can see in 5th line of code @interface ads (), I forgot to add < ESTBeaconManagerDelegate > right after ().
Seems like everything's sorted out here, so I'm closing this one. If you feel otherwise, please feel free to re-open the issue.
Hello,
I'm trying to use Estimote SDK in static library. Everything seems to be fine, but none of the methods are firing up (didEnterRegion, didExitRegion, didStart, didFail, etc) when I'm trying to start to monitore a region. I have included every framework that Estimote needs, every header file(headers are found for sure) and set under Capabilities: Background Modes ON, checked Location Updates, Acts as a Bluetooth LE accessory and Uses Bluetooth LE accessories. All of this I've done as well in my static library as in test app. Im sure my start() method is being fired up, checked it already with NSLog(@"started"); But the following code:
import "ads.h"
import "ESTBeaconManager.h"
import "ESTBeaconRegion.h"
@interface ads ()
@property (nonatomic, strong) ESTBeaconManager* BeaconManager; @property (nonatomic, strong) ESTBeacon* Beacon; @property (nonatomic, strong) ESTBeaconRegion* BeaconRegion;
@end
@implementation ads
-(void)startAds { NSLog(@"Started"); self.BeaconManager = [[ESTBeaconManager alloc] init]; self.BeaconManager.delegate = self;
}
@end
Is absolutely dead. It does absolutely nothing. May I know is it impossible to use SDK in static library or is it iOS issue? Or where is the problem? Im testing on Iphone 5S, iOS version 7.1, Bluetooth ON, Locations ON. Tried to restart the phone many times, turn on flight mode, off, restart and etc etc.
Best Regards.