title: -[UIDragSession loadObjectsOfClass:completion:] completionBlock not being called
body: <p>I'm learning iOS11 new APIs Drag and Drop, but I have some questions.
  I have two collectionViews which share same type (<strong>DataEntity</strong>) of dataSource array. One is for drag and the other is for drop. That means I want to drag item which contains data (<strong>DataEntity</strong>) from one collectionView to another. </p>
  
  <p>Then I have the question in <code>[-(id&lt;UICollectionDropDelegate&gt;)collectionView:performDropWithCoordinator:]</code>. I can't fetch data (<strong>DataEntity</strong>) passed in my first collectionView because <code>-[UIDragSession loadObjectsOfClass:completion:]</code> completionBlock is not being called. However, if I set other class (such as UIImage.class or NSString.class) to parameter <code>loadObjectsOfClass:</code> completion block will get called, however it is not the compatible class so there's no return objects.</p>
  
  <p><strong>Source Code</strong></p>
  
  <p>Drag collectionView</p>
  
  <pre><code>- (NSArray&lt;UIDragItem *&gt; *)collectionView:(UICollectionView *)collectionView itemsForBeginningDragSession:(id&lt;UIDragSession&gt;)session atIndexPath:(NSIndexPath *)indexPath {
  
      DataEntity* entity = self.entities[indexPath.row];
      UIDragItem* item = [[UIDragItem alloc] initWithItemProvider:[[NSItemProvider alloc] initWithObject:entity]];
      return @[item];
  }
  </code></pre>
  
  <p>Drop collectionView</p>
  
  <pre><code>- (void)collectionView:(UICollectionView *)collectionView performDropWithCoordinator:(id&lt;UICollectionViewDropCoordinator&gt;)coordinator {
      NSIndexPath* destinationIndexPath = coordinator.destinationIndexPath;
      dispatch_async(dispatch_get_main_queue(), ^{
          [self.collectionView performBatchUpdates:^{
              [coordinator.session loadObjectsOfClass:DataEntity.class completion:^(NSArray&lt;__kindof id&lt;NSItemProviderReading&gt;&gt; * _Nonnull objects) {
                  [objects enumerateObjectsUsingBlock:^(__kindof id&lt;NSItemProviderReading&gt;  _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
                      [self.mutableEntities insertObject:(DataEntity*)obj atIndex:destinationIndexPath.row];
                      [self.collectionView insertItemsAtIndexPaths:@[destinationIndexPath]];
                  }];
              }];
          } completion:nil];
      });
  }
  - (BOOL)collectionView:(UICollectionView *)collectionView canHandleDropSession:(id&lt;UIDropSession&gt;)session {
      BOOL test = [session canLoadObjectsOfClass:DataEntity.class]; // It's YES
      return test;
  }
  </code></pre>
  
  <p>Data entity</p>
  
  <pre><code>- (NSProgress *)loadDataWithTypeIdentifier:(NSString *)typeIdentifier forItemProviderCompletionHandler:(void (^)(NSData * _Nullable, NSError * _Nullable))completionHandler {
      NSData* data = [NSKeyedArchiver archivedDataWithRootObject:self];
      completionHandler(data, nil);
      return nil;
  }
  + (NSArray&lt;NSString *&gt; *)writableTypeIdentifiersForItemProvider {
      NSString* identifier = NSStringFromClass(self.class);
      return @[identifier];
  }
  + (NSArray&lt;NSString *&gt; *)readableTypeIdentifiersForItemProvider {
      NSString* identifier = NSStringFromClass(self.class);
      return @[identifier];
  }
  + (nullable instancetype)objectWithItemProviderData:(nonnull NSData *)data typeIdentifier:(nonnull NSString *)typeIdentifier error:(NSError * _Nullable __autoreleasing * _Nullable)outError {
      DataEntity* entity = [NSKeyedUnarchiver unarchiveObjectWithData:data];
      return entity;
  }
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p>Ok, I found something.
  First, if I remove the <code>dispatch_async(dispatch_get_main_queue())</code>, I will get an error <strong>unrecoginized selector -[DataEntity encodeWithCoder:]</strong>. And that is the second thing, I forget to make <strong>DataEntity</strong> conform to <strong>NSCoding</strong> protocol.</p>
  
  <p>Now the new question is, why I can't call <code>-[UIDragSession loadObjectsOfClass:completion:]</code> in <strong>dispatch_main_queue</strong> closure, or its completion block won't be called?</p>