You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Thanks for the post. SwiftyDropbox doesn't currently support running the app authorization flow from an extension. You'll need to have the user initially process the authorization flow from the main app, after which you can perform API calls from the extensions. Note that to create an authorized client in the extension you'll need to enable Keychain Sharing between the extension and the app. There are a few options for this are outlined here.
I'll pass this along as a feature request for support for processing that from an extension, but I can't promise if or when that might be implemented.
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 inMobileSharedApplication
to 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.The text was updated successfully, but these errors were encountered: