title: CoreBluetooth, using CBAdvertisementDataServiceUUIDsKey: to advertise time of last update
body: <p>I am working on an app that shares information peer to peer. Both devices act as central and peripheral simultaneously.</p>
  
  <p>when iOS device A  connects to iOS device B, they exchange information and then the centrals disconnect , and start scanning, again . if a device acquires any new information, i would like to update the  a second   service UUID in the <code>CBAdvertisementDataServiceUUIDsKey</code> with a new serial date(and deviceID) reflecting the update time. In this way other iOS devices can tell from the advertisement whether they should connect or not. The code to update the broadcast is below. The UUIDs it produces are valid, but once I revise the advertisement, my centrals no longer find the peripheral. i know that the advertisement is cached, but I had assumed that removing the service and re-adding it, I could get around this. </p>
  
  <pre><code>-(void)updateBroadcast{
      [self.peripheralManager stopAdvertising];
      if (self.pmIsConnected) {
          NSLog(@"PM connected-&gt;Can't update advertising");
          dispatch_async(dispatch_get_main_queue(), ^{
              [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(updateBroadcast) userInfo:nil repeats:YES];
          });
          return;
      }else{
          [self.peripheralManager removeService:self.infoService];
          [self setupInfoService];
          [self startBroadcasting];
  
          NSArray *services=@[self.tNetService.UUID,[self createAdvertiseUUID];
          NSDictionary *advertisingDict = 
                @{CBAdvertisementDataLocalNameKey:self.deviceNameKey,
                  CBAdvertisementDataServiceUUIDsKey:services};
          [self.peripheralManager startAdvertising:advertisingDict];
      }
  
  }
  </code></pre>
  
  <p>Is it possible to update this key? Or have I made some other mistake?</p>