Hi guys, the app generator is pretty cool and the notification demo is working very good for one beacon.
The generated code looks like:
self.beaconNotificationsManager = [BeaconNotificationsManager new];
[self.beaconNotificationsManager enableNotificationsForBeaconID: [[BeaconID alloc] initWithUUIDString:@"B9..."
I changed the line with “enterMessage” and “exitMessage” to call a local function called (enter, exit)
The methods are pretty simple defined as:
When I start the App both methods are called. I realy need to call different methods on enter and exit calls. How can I do that?
self.enter is a short-hand notation for
[self enter], i.e., “call the method
enter on the
self object.” So what you’re really doing is, you’re calling the
exit methods immediately on app start, and passing their return values (in this case,
nil, since you didn’t specify a return value—I actually think this gives a compilation warning) as the strings to use for the enter and exit messages.
If you want to execute custom code on enter/exit, then feel free to simple modify the
didExitRegion methods in the
Thank you. I specified a return value as
NSString *foo = @"enter!";
And there is no compilation warning.
Both methods are called immediately due to this line of code, right?
[self.beaconNotificationsManager enableNotificationsForBeaconID: [[BeaconID alloc]
Can you explain how to modify the code to call custom didEnterRegion/didExitRegion methods?
Because I used your app generator there is not didEnterRegion Method. I tried to remove the enterMessage and exitMessage but I get a compilation error.
Ok. I solved it. I didn’t know that the BeaconNotificationsManager.h and *.m files are available in the estimote folder. I implemented my custom methods directly in didEnterRegion in the Manager-file.
Thanks for helping me!