title: UIActivityViewController Crash on presentViewController:
body: <p>It's fine last week,but today when i use the use the UIActivtyViewController ,the uiactivityviewcontroller crash.</p>
  
  <pre><code>- (void)shareThePrice
  {
      UIImage *screenShotImg = [self screenShot];
      NSString *string = NSLocalizedString(@"shareString", nil);
  
      UIActivityViewController *activityViewController = [[UIActivityViewController alloc]
          initWithActivityItems:@[string,screenShotImg] applicationActivities:nil];
  
      [activityViewController setCompletionWithItemsHandler:
      ^(NSString *activityType, BOOL completed, NSArray *returnedItems, NSError *error)
      {
          if ( completed ) {
              //  TODO error handling
              NSLog(@"share complete");
              //            NSExtensionItem* extensionItem = [returnedItems firstObject];
              //            NSItemProvider* itemProvider = [[extensionItem attachments] firstObject];
          } else {
              NSLog(@"canceld");
          }
      }];
  
      [self presentViewController:activityViewController animated:YES completion:^{
          NSLog(@"complete");
      }];
  }
  </code></pre>
  
  <p>when the method presentViewController: used,it crashes.
  I dont't know what's wrong?</p>
  
  <pre><code>Communications error: &lt;OS_xpc_error: &lt;error: 0x107f39b10&gt; { count = 1, contents =
      "XPCErrorDescription" =&gt; &lt;string: 0x107f39f18&gt; { length = 22, contents = "Connection interrupted" }
  }&gt;
  
  *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSMutableArray removeObjectsAtIndexes:]: index set cannot be nil'
  *** First throw call stack:
  (
      0   CoreFoundation                      0x0000000105209f35 __exceptionPreprocess + 165
      1   libobjc.A.dylib                     0x000000010476cbb7 objc_exception_throw + 45
      2   CoreFoundation                      0x0000000105142278 -[NSMutableArray removeObjectsAtIndexes:] + 536
      3   UIKit                               0x0000000106b23dd8 _UIApplicationExtensionDiscoveryGetPostprocessedExtensions + 188
      4   UIKit                               0x0000000106b23a33 -[_UIActivityApplicationExtensionDiscovery activitiesMatchingInputItems:sourceIsManaged:error:updateBlock:] + 1032
      5   UIKit                               0x0000000106a13cea -[UIActivityViewController _availableActivitiesForItems:applicationExtensionActivities:] + 464
      6   UIKit                               0x0000000106a14cc4 -[UIActivityViewController viewDidLoad] + 157
  </code></pre>