title: Adding Accessory to Home using HomeKit in iOS 8
body: <p>I was able to create home and add rooms but when trying to add accessory to the home as, </p>
  
  <pre><code>- (IBAction)addAccessory:(id)sender {
      [myHome addAccessory:myAccessory completionHandler:^(NSError *error) {
          if (!error) {
              NSLog(@"%@ accessory successfully added to %@ home",
                    myAccessory.name, myHome.name);
          } else {
              NSLog(@"addAccessory error = %@",[error localizedDescription]);
          }
      }];
  
  }
  </code></pre>
  
  <p>an alert is shown with the message "Enter setup code for bulb" with a textfield and two buttons but the textfield is not allowing to enter the setup code.When clicked on "SetUp" button alert is dismissed without performing any action and when "cancel" is selected,It's going to error block showing the error "The operation couldn’t be completed. (HMErrorDomain error -70890.)".</p>
  
  <p>The delegate method "didFindNewAccessory" is printing the accessory.services as empty. </p>
  
  <pre><code>-(void)accessoryBrowser:(HMAccessoryBrowser*)browser didFindNewAccessory:
  (HMAccessory*)accessory {
      NSLog(@"Accessory discovered is %@",accessory);
      NSLog(@"Accessory services is %@",accessory.services);
  }
  </code></pre>
  
  <p>Example:<br>
  Accessory discovered is [ name = lock, identifier = D8946530-BCD9-4244-AB49-AF507105CC73 ]
  Accessory services is ( )</p>