title: Send a global touch event on iOS 6
body: <p>I wanna build a automatic iOS app test framework. I can record the touch event by IOHIDFamily, so any way to replay this?</p>
  
  <p>I tried GSEvent like this</p>
  
  <pre><code>void sendclickevent(){     
      mach_port_t thePortOfApp = GSCopyPurpleNamedPort("com.fuckyou.fuck");     
  
      GSEventRecord header;     
      GSHandInfo click;     
      GSPathInfo pathInfo = {2,2,2,1,1,{50,50}, NULL};     
  
      bzero(&amp;header, sizeof(header));     
      bzero(&amp;click, sizeof(click));     
  
      header.type = kGSEventHand;     
      header.subtype = kGSEventSubTypeUnknown;     
      header.location.x = 50;     
      header.location.y = 50;     
      header.windowLocation.x = 50;     
      header.windowLocation.y = 50;     
      header.infoSize = sizeof(GSHandInfo)+sizeof(GSPathInfo);     
      header.timestamp = mach_absolute_time();     
  
      click.type = kGSHandInfoTypeTouchDown;     
      click.deltaX = 1;     
      click.deltaY = 1;     
      click.pathInfosCount = 1;     
  
      struct    
      {     
          GSEventRecord record;     
          GSHandInfo hand;     
          GSPathInfo path;     
      } record = {header, click, pathInfo};     
  
      GSSendEvent(&amp;record, thePortOfApp);     
  }
  </code></pre>
  
  <p>thePortOfApp return Non-Zero. But at end of this function, such as press a button, nothing happpend. So something wrong? or I need another way to send touch event to iOS UI?</p>