I'm pulling my bundle url and class name from a string, and I'd like to instantiate an object.
The code looks like this:
var cocoaViewBundleURL = cocoaViewInfo.mCocoaAUViewBundleLocation.takeRetainedValue();
var factoryClassName = cocoaViewInfo.mCocoaAUViewClass?.takeRetainedValue();
var bundle = NSBundle(URL: cocoaViewBundleURL);
var factoryClass = bundle?.classNamed(factoryClassName!);
var factory = factoryClass();It doesn't compile.
What is the proper way to do this with swift?