I want to use SwiftyDropbox not only in an iOS app but also in an app extension. The problem is the auth method require passing UIApplication.shared which is not available in the extension. Is there a way around it?
Checking the code I see the UIApplication.shared is basically only used in MobileSharedApplication to find the root VC when a VC is not explicitly provided. So maybe if in addition to public init(sharedApplication: UIApplication, controller: UIViewController?, openURL: @escaping ((URL) -> Void)) there was also a public init(controller: UIViewController, openURL: @escaping ((URL) -> Void)) it could work as well in an app extension.
I want to use SwiftyDropbox not only in an iOS app but also in an app extension. The problem is the auth method require passing
UIApplication.sharedwhich is not available in the extension. Is there a way around it?Checking the code I see the
UIApplication.sharedis basically only used inMobileSharedApplicationto find the root VC when a VC is not explicitly provided. So maybe if in addition topublic init(sharedApplication: UIApplication, controller: UIViewController?, openURL: @escaping ((URL) -> Void))there was also apublic init(controller: UIViewController, openURL: @escaping ((URL) -> Void))it could work as well in an app extension.