title: Pass message to Apple Watch using MMWormhole
body: <p>I'm developing an Apple Watch App, and I need to notify the watch when certain changes occur in the parent application. I'm using the MMWormhole library found on GitHub, but I'm having trouble passing messages from the phone to the watch. Here is my code, do you have any ideas on why this is happening?</p>
  
  <p>My main viewController code looks like this</p>
  
  <p>ViewController.m</p>
  
  <pre><code>- (void)viewDidLoad {
      [super viewDidLoad];
  
      self.wormhole = [[MMWormhole alloc] initWithApplicationGroupIdentifier:@"com.mycompany.myapp"
                                                           optionalDirectory:@"wormhole"];
  
      NSString *myString = [[NSString alloc] initWithFormat:@"Test String"];
  
  
      [self.wormhole passMessageObject:@{@"string" : myString}
                        identifier:@"messageIdentifier"];
  </code></pre>
  
  <p>My <code>InterfaceController</code> from my <code>WatchkitExtension</code> looks like this:</p>
  
  <p>InterfaceController.m</p>
  
  <pre><code>- (void)awakeWithContext:(id)context {
      [super awakeWithContext:context];
  
      // Initialize the wormhole
      self.wormhole = [[MMWormhole alloc] initWithApplicationGroupIdentifier:@"com.mycompany.myapp"
                                                           optionalDirectory:@"wormhole"];
  
      // Obtain an initial value for the selection message from the wormhole
      id messageObject = [self.wormhole messageWithIdentifier:@"messageIdentifier"];
  
      NSString *string = [messageObject valueForKey:@"string"];
  
      if (string != nil) {
          NSLog(string);
          [myLabel setText:string];
      }
  
      // Listen for changes to the selection message. The selection message contains a string value
      // identified by the selectionString key. Note that the type of the key is included in the
      // name of the key.
      [self.wormhole listenForMessageWithIdentifier:@"messageIdentifier" listener:^(id messageObject) {
  
          NSString *string = [messageObject valueForKey:@"string"];
  
          if (string != nil) {
              [self.myLabel setText:string];
          }
      }];                                    
  }
  </code></pre>
  
  <p>Thank you!</p>