title: Pushwoosh phonegap plugin, retrieving device ID
body: <p>I'm using the pushwoosh phonegap plugin for push notifications.  After successful registration I need to store the device ID that the registration used in the "hwid" parameter so that I can target push notifications that I send with this same device ID.  This works great on Android since it seems the phonegap device.uuid is the same ID that the pushwoosh plugin is sending to their servers.  However, on ios the device.uuid returns a different ID than what is sent to pushwoosh.  I can see from the Xcode console log the hwid that the plugin is sending to pushwoosh but cannot figure out where they are getting this ID from and how to access the same ID within phonegap.</p>
  
  <p>EDIT: I was hoping the getRemoveNotificationStatus function would return this info but it actually returns less than the registerDevice callback.</p>
  
  <p>UPDATE:  Ok, from digging through their plugin code I see where they are constructing this ID that they send to their servers.  Not sure why this ID isn't accessible through the phonegap plugin since this is the ID that I ultimately need to have in order to target a push notification to the specific device.</p>
  
  <p>Their code:</p>
  
  <pre><code>(NSString *) uniqueDeviceIdentifier{
      NSString *macaddress = [self macaddress];
      NSString *bundleIdentifier = [[NSBundle mainBundle] bundleIdentifier];
  
      NSString *stringToHash = [NSString stringWithFormat:@"%@%@",macaddress,bundleIdentifier];
      NSString *uniqueIdentifier = [self stringFromMD5:stringToHash];
  
      return uniqueIdentifier;
  }
  
  - (NSString *) uniqueGlobalDeviceIdentifier{
      // &gt;= iOS6 return identifierForVendor
      UIDevice *device = [UIDevice currentDevice];
  
      if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"6.1")) {
          if ([device respondsToSelector:@selector(identifierForVendor)] &amp;&amp; [NSUUID class]) {
              NSUUID *uuid = [device identifierForVendor];
              return [uuid UUIDString];
          }
      }
  
      // Fallback on macaddress
      NSString *macaddress = [self macaddress];
      NSString *uniqueIdentifier = [self stringFromMD5:macaddress];
  
      return uniqueIdentifier;
  }
  </code></pre>