Expose an interface of a class loaded from a framework at runtime
问题 I want to load and manipulate SKUIImageColorAnalyzer and SKUIAnalyzedImageColors objects from the private StoreKitUI.framework . First, I attempt to load the framework at runtime: guard case let libHandle = dlopen("/System/Library/PrivateFrameworks/StoreKitUI.framework/StoreKitUI", RTLD_NOW) where libHandle != nil else { fatalError("StoreKitUI not found") } Then, I verify that the SKUIImageColorAnalyzer class can be found: guard let analyzerClass: AnyClass = NSClassFromString(