1

I am trying to use

[self.peripheralManager startAdvertising:self.myBeaconData];

to advertise UUID and beacon’s identifying information and also monitoring same UUID with different minor and major using

[self.locationManager startMonitoringForRegion:self.myBeaconRegion];

but I am not able to fulfill this requirement of using same Device(iPhone) as receiver as well as broadcaster(advertiser)

Can anyone help me to create a iPhone Device to behave as a Broadcaster(Advertise an UUID, for example "A77A1B68-49A7-4DBF-914C-760D07FBB87B") and at same time behave as Receiver to Monitor same region for other beacon having same UUID "A77A1B68-49A7-4DBF-914C-760D07FBB87B".

Mrug
  • 4,963
  • 2
  • 31
  • 53
  • check this :- http://www.appcoda.com/ios7-programming-ibeacons-tutorial/ – Rushabh Jul 22 '14 at 13:17
  • I checked this one. but they have shown two apps, one for Broadcasting and another one as Receiver. I am trying to make One app performing both tasks simultaneously. – Mrug Jul 22 '14 at 14:27
  • Try this approuch to get that working: http://stackoverflow.com/questions/19351856/ios-corebluetooth-ibeacon-advertise-an-ibeacon-and-a-peripheral-service-concu/20228897#20228897 – Sandro Machado Jul 22 '14 at 16:43
  • @Sandro I tried this one and it is working until the app is active, in other states it is not giving desired result – Mrug Jul 23 '14 at 08:41
  • 1
    Did you enable background location? – Sandro Machado Jul 23 '14 at 10:09

1 Answers1

0

Currently you cannot broadcast an iBeacon and simultaneously monitor for iBeacons. This is current as of iOS 7 and iOS 8 Beta 4. This is not likely to change any time soon. This is also why all tutorials show 2 apps and 2 devices usually.

Bill Burgess
  • 14,054
  • 6
  • 49
  • 86
  • Actually it is working simultaneously as per solution provided as per @Sandro. but sometime its failing. – Mrug Jul 23 '14 at 08:38
  • If the limitation is that the device can't detect itself, it essentially doesn't work correctly. To do anything with that setup, still requires a 2nd device to trigger any of the events. – Bill Burgess Jul 23 '14 at 12:39
  • No Brother I just Implemented this thing and its working fine without any issue. I will share the Demo app if you want. – Mrug Jul 23 '14 at 14:35
  • Could you show a demo app Mrug. I am trying to do similar thing. – Janusz Chudzynski Mar 23 '15 at 14:25