How to bind to NSManagedObjectContext with Storyboard?

The books says:

Use the bindings inspector to bind the array controller’s managedObjectContext to File’s Owner’s managedObjectContext

I am not trying to do the same thing with a Storyboard. But I can’t find a way to find a managedObjectContext in the storyboard. No file owner for example. No NSPersistenDocument either, as far as I could see.

How am I supposed to bind the array controller MOC?

Thanks,

JD

After researching this, I used the solution outlined in Technical Q&A QA1871 (https://developer.apple.com/library/content/qa/qa1871/_index.html).

This works perfectly well in Objective-C
But it fails with Swift 3, because it requires a Cocoa binding to a property of optional type, which Interface Builder disallows.

Any idea regarding this issue most welcome.

Actually it works with Swift too, with two caveats:

1- Do not forget to declare the properties to use with Cocoa bindings as "dynamic"
2- Disregard the error message from Interface Builder which doesn’t like to bind values to properties of optional types. The type needs to be optional, and it will work at runtime, despite IB’s error message.

(This being with Xcode 8.2.1. I filed a bug report)