How to use NSCollectionViewItem without subclassing it?
<p>I am writing a very simple macOS application that I'd like to show a few images in a collection view. I don't need any special behavior for how they are displayed. The <a href="https://developer.apple.com/reference/appkit/nscollectionviewitem" rel="nofollow noreferrer">docs for NSCollectionViewItem</a> say:</p>

<blockquote>
  <p>The default implementation of this class supports the creation of a simple item that displays a single image or string.</p>
</blockquote>

<p>That is what I want. However, I can't find any information on how to create a default <code>NSCollectionViewItem</code>. </p>

<p>The <a href="https://developer.apple.com/reference/appkit/nscollectionview?language=objc" rel="nofollow noreferrer">documentation for NSCollectionView</a> states:</p>

<blockquote>
  <p>Every data source object is required to implement the following methods:</p>
  
  <p>collectionView:numberOfItemsInSection:</p>
  
  <p>collectionView:itemForRepresentedObjectAtIndexPath:</p>
</blockquote>

<p>The second method above returns an <code>NSCollectionViewItem</code>. From reading examples I gather that the traditional way of creating an <code>NSCollectionViewItem</code> in this case is to call:</p>

<pre><code>NSCollectionViewItem*   newCollectionViewItem   = [imageCollectionView makeItemWithIdentifier:&lt;some identifier&gt;
                                                                                     forIndexPath:indexPath];
</code></pre>

<p>The problem is that I don't understand what <code>&lt;some identifier&gt;</code> should be. I don't have a nib that contains an <code>NSCollectionViewItem</code> because I'm not subclassing it or customizing it in any way. I've tried adding the following to my data source:</p>

<pre><code>- (void)awakeFromNib
{
    [imageCollectionView registerClass:[NSCollectionViewItem class]
                 forItemWithIdentifier:@"Image"];
}
</code></pre>

<p>where <code>imageCollectionView</code> is the <code>NSCollectionView</code> in question. And then in my <code>- (NSCollectionViewItem *)collectionView:itemForRepresentedObjectAtIndexPath:</code> method, I call:</p>

<pre><code>NSCollectionViewItem*   newCollectionViewItem   = [imageCollectionView makeItemWithIdentifier:@"Image"
                                                                                     forIndexPath:indexPath];
</code></pre>

<p>But this throws an exception and prints this to the console:</p>

<blockquote>
  <p>2016-12-19 17:51:27.463 MyApp[28177:3926764] -[NSNib _initWithNibNamed:bundle:options:] could not load the nibName: NSCollectionViewItem in bundle (null).</p>
</blockquote>

<p>followed by a stack trace.</p>

<p>So how do I go about creating and using an <code>NSCollectionViewItem</code> that isn't subclassed or modified in any way?</p>