title: Xcode watchkit openParentApplication objective-c
body: <p>Hey I have made an application for my phone that can unlock/lock etc my car. Basically the iphone interface is just 4 buttons: lock, unlock, trunk, and connect. When ever I press a button a writes something to my arduino located inside of my car. I was wondering if I could "copy" these four buttons onto my apple watch. What I mean by that is that can I use openParentApplication to do that or is there some other command I could use to simulate so say button presses on my iphone when the button is clicked on my apple watch.</p>
  
  <p>Code for Iphone buttons:</p>
  
  <pre><code>- (IBAction)lockCar:(UIButton *)sender;{
      NSString *string = @"l";
      NSData *data = [string dataUsingEncoding:NSUTF8StringEncoding];
      if (bleShield.activePeripheral.state == CBPeripheralStateConnected) {
          [bleShield write:data];
      }
  }
  
  - (IBAction)trunkCar:(UIButton *)sender;{
      NSString *string = @"t";
      NSData *data = [string dataUsingEncoding:NSUTF8StringEncoding];
      if (bleShield.activePeripheral.state == CBPeripheralStateConnected) {
          [bleShield write:data];
      }
  
  }
  
  - (IBAction)unlockCar:(UIButton *)sender;{
      NSString *string = @"u";
      NSData *data = [string dataUsingEncoding:NSUTF8StringEncoding];
      if (bleShield.activePeripheral.state == CBPeripheralStateConnected) {
          [bleShield write:data];
      }
  }
  </code></pre>
  
  <p>Code for Apple Watch so far:</p>
  
  <pre><code>- (IBAction)carConnect {
  }
  
  - (IBAction)carUnlock {
  }
  
  - (IBAction)carLock {
  }
  
  - (IBAction)carTrunk {
  }
  </code></pre>