Giter Club home page Giter Club logo

flutterdropbox's People

Contributors

darkfighterluke avatar mix1009 avatar pkiman avatar tannakaken avatar toh2002 avatar xvadim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

flutterdropbox's Issues

error in AppDelegate.swift

I'm trying to create an app that uses your Flutter Dropbox client. Following your instructions, I have edited AppDelegate.swift as follows:

import UIKit
import Flutter
import ObjectiveDropboxOfficial

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
  override func application(
    _ app: UIApplication,
    open url: URL, 
    options: [UIApplication.OpenURLOptionsKey : Any] = [:]
  ) -> Bool {
    if let authResult = DBClientsManager.handleRedirectURL(url) {
      if authResult.isSuccess() {
        print("dropbox auth success")
      } else if (authResult.isCancel()) {
        print("dropbox auth cancel")
      } else if (authResult.isError()) {
        print("dropbox auth error \(authResult.errorDescription)")
      }
    }
    return true;
  }
}

(There was already an override func application statement in the original file, which I replaced with the one shown above.)

When trying to run the app, there is a build failure:

    2020-09-22 17:37:13.727 xcodebuild[77636:2499086]  DTDeviceKit: deviceType from 4c575fb44229a557d91773f8091e98bed27bccb3 was NULL
    2020-09-22 17:37:13.728 xcodebuild[77636:2499030] [MT] DTDeviceKit: deviceType from 4c575fb44229a557d91773f8091e98bed27bccb3 was NULL
    2020-09-22 17:37:13.830 xcodebuild[77636:2499030] [MT] DTDeviceKit: deviceType from 4c575fb44229a557d91773f8091e98bed27bccb3 was NULL
    ** BUILD FAILED **
Xcode's output:
↳
    /Users/chul.kim/Local/flutter/forms/ios/Runner/AppDelegate.swift:12:63: error: missing argument for parameter 'completion' in call
        if let authResult = DBClientsManager.handleRedirectURL(url) {
                                                                  ^
                                                                  , completion: <#DBOAuthCompletion#>
    ObjectiveDropboxOfficial.DBClientsManager:13:21: note: 'handleRedirectURL(_:completion:)' declared here
        open class func handleRedirectURL(_ url: URL, completion: @escaping DBOAuthCompletion) -> Bool
                        ^
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'Flutter' from project 'Pods')
Could not build the precompiled application for the device.

It seems that the DBClientsManager.handleRedirectURL method wants two arguments, not just url but also completion. Not knowing Swift at all, I have no idea how to provide this second argument. Can you please help?

ListFolder Function

When getting all items in the list, the item got all information except the most important thing is id?

null safety ?

Do you plan to update the plugin to support nullsafety ?
Thanks !

Get Refresh Token

Hi, the current authorize method only let you get access token. Can you provide another method so I can get refresh token?

The jcenter() method has been deprecated in build.gradle

> Configure project :dropbox_client
The RepositoryHandler.jcenter() method has been deprecated. This is scheduled to be removed in Gradle 8.0. JFrog announced JCenter's sunset in February 2021. Use mavenCentral() instead. Consult the upgrading guide for further information: https://docs.gradle.org/7.6.3/userguide/upgrading_version_6.html#jcenter_deprecation
        at build_9ca3d4xq9cvjc5hd408rtf97z$_run_closure1$_closure2.doCall(/home/rudy/.pub-cache/hosted/pub.dev/dropbox_client-1.1.0/android/build.gradle:7)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)

Please replace jcenter() with mavenCentral() in android/build.gradle. Thanks.

Problem with AppGelegate.swift

Problem with AppDelegate.swift file.

The source file has the following code:

import UIKit
import Flutter

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
  override func application(
    _application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
  ) -> bool {
    GeneratedPluginRegistrant.register(with: self)
    return super.application(application, didFinishLaunchingWithOptions: launchOptions)
  }
}

After the change according to the documentation:

import UIKit
import Flutter
import ObjectiveDropboxOfficial

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
  override func application(
    _application: UIApplication,
    open url: URL,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
  ) -> bool {
    if let authResult = DBClientsManager.handleRedirectURL(url) {
      if authResult.isSuccess() {
          print("dropbox auth success")
      } else if (authResult.isCancel()) {
          print("dropbox auth cancel")
      } else if (authResult.isError()) {
          print("dropbox auth error \(authResult.errorDescription)")
      }
    }
    GeneratedPluginRegistrant.register(with: self)
    return super.application(application, didFinishLaunchingWithOptions: launchOptions)
  }
}

I am getting an error:

    Writing result bundle at path:
    /var/folders/2g/ycm43f9500133_g_pdg_cq640000gn/T/flutter_tools.8hWmka/flutter_ios_build_temp_dirqBUXLe/temporary_xcresult_bundle
    /Users/ivangalkin/Development/My projects/BReminder/ios/Runner/AppDelegate.swift:7:17: error: method does not override any method from its superclass
      override func application(
      ~~~~~~~~^
    /Users/ivangalkin/Development/My projects/BReminder/ios/Runner/AppDelegate.swift:12:63: error: missing argument for parameter 'completion' in call
        if let authResult = DBClientsManager.handleRedirectURL(url) {
                                                                  ^
                                                                  , completion: <#DBOAuthCompletion#>
    ObjectiveDropboxOfficial.DBClientsManager:13:21: note: 'handleRedirectURL(_:completion:)' declared here
        open class func handleRedirectURL(_ url: URL, completion: @escaping DBOAuthCompletion) -> Bool
                        ^uthCompletion) -> Bool
                        ^

Error Handling

Can you implement a way to handling error for 'download', 'upload', & 'listFolder' method? Like, have the method returning error message and/or when it fails? Or maybe an error callback?

IOS redirection not working

When I use the package for implementing in the IOS, the authorization web page is opening but after authorizing , its not redirecting to the app. I have configured the Info.plist according to the documentation mentioned
Any solutions for this ? Thankyou in advance.

don't know how to InitDropbox()

how do I get the client id?
what is this dropbox key?
where is the dropbox secret?

I only know where the TOKEN is. the rest, I'm blind

Future initDropbox() async {
    // init dropbox client. (call only once!)
    await Dropbox.init(dropbox_clientId, dropbox_key, dropbox_secret);
}

Authorize with token not working on IOS

I'm trying compile on ios but the authorization only work with the function authorize on iOS when i use the authorizationWithToken the other functions upload and download not work , in android works fine with the token generate in dropbox/developer.

I can't make my clients, login in dropbox before using my app.

The info.plsit and the app.delegate were filled out according to the documentation and the dropbox init returns true.

authorizeWithCredentials in flutter W/System.err(11968): com.dropbox.core.InvalidAccessTokenException: {"error":{".tag":"expired_access_token"},"error_summary":"expired_access_token/"}

how can I check that the access token is expired?

W/ader.musicpanda(11968): Accessing hidden method Lcom/android/org/conscrypt/ConscryptEngineSocket;->setUseSessionTickets(Z)V (max-target-q,core-platform-api, reflection, denied)
W/ader.musicpanda(11968): Accessing hidden method Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setUseSessionTickets(Z)V (max-target-q,core-platform-api, reflection, denied)
W/ader.musicpanda(11968): Accessing hidden method Lcom/android/org/conscrypt/AbstractConscryptSocket;->setUseSessionTickets(Z)V (max-target-q, reflection, denied)
W/ader.musicpanda(11968): Accessing hidden method Lcom/android/org/conscrypt/ConscryptEngineSocket;->setHostname(Ljava/lang/String;)V (max-target-q,core-platform-api, reflection, denied)
W/ader.musicpanda(11968): Accessing hidden method Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setHostname(Ljava/lang/String;)V (max-target-q,core-platform-api, reflection, denied)
W/ader.musicpanda(11968): Accessing hidden method Lcom/android/org/conscrypt/AbstractConscryptSocket;->setHostname(Ljava/lang/String;)V (max-target-q, reflection, denied)
W/ader.musicpanda(11968): Accessing hidden method Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setAlpnProtocols([B)V (max-target-q,core-platform-api, reflection, denied)
W/ader.musicpanda(11968): Accessing hidden method Lcom/android/org/conscrypt/AbstractConscryptSocket;->setAlpnProtocols([B)V (max-target-q, reflection, denied)
W/ader.musicpanda(11968): Accessing hidden method Lcom/android/org/conscrypt/OpenSSLSocketImpl;->getAlpnSelectedProtocol()[B (max-target-q,core-platform-api, reflection, denied)
W/ader.musicpanda(11968): Accessing hidden method Lcom/android/org/conscrypt/AbstractConscryptSocket;->getAlpnSelectedProtocol()[B (max-target-q, reflection, denied)
W/System.err(11968): com.dropbox.core.InvalidAccessTokenException: {"error":{".tag":"expired_access_token"},"error_summary":"expired_access_token/"}

No visible @interface for 'DBFILESUserAuthRoutes' declares the selector 'uploadData:mode:autorename:clientModified:mute:propertyGroups:strictConflict:inputData:'

Hello,

I've tried to compile an existing project using dropbox_client today and I found this error, preventing the app from compiling :

DropboxPlugin.m:175:29: No visible @interface for 'DBFILESUserAuthRoutes' declares the selector 'uploadData:mode:autorename:clientModified:mute:propertyGroups:strictConflict:inputData:'

I tried to compile with a new project from scratch, and I still have the same issue.

To reproduce :

  • Create a new flutter project
  • Add dropbox_client 0.8.0
  • Import it in main.dart
  • Launch on an iOS device / simulator
  • The error is displayed on compilation.

I don't know if that's the cause, but i've updated XCode to 13.4.1 recently.

This is a major issue as I cannot use the library at all due to the compilation problem, and it prevents me from building my app. Do you know what is causing this issue ?

Upload response return issue

Hi all.
I have this working now on Android and iOS.
Can authorize and upload files.
I am getting an empty [] as the response. I was expecting the dropboxpath or similar.
Can anyone tell me what they get in response from an upload call?

 final result = await Dropbox.upload(img, imgName, (uploaded, total) {
   print('dropbox upload progress $uploaded / $total');
 });
 return result;

App crash when using hot restart

There seems to be some issue with dropbox native client(iOS). When doing hot restart I'm getting my app crashed. See the attached stacktrace

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Incident Identifier: AB54741E-317C-45E0-843A-96A0BB6EA515
CrashReporter Key:   CEC6EF46-0D4F-38F1-2289-FFC63FE718E9
Hardware Model:      MacPro7,1
Process:             Runner [65801]
Path:                /Users/USER/Library/Developer/CoreSimulator/Devices/B501ADD9-4AA0-4B48-A3EE-974CAB92A17D/data/Containers/Bundle/Application/033F1DA7-E0C4-4ECC-904E-F1850F4883C1/Runner.app/Runner
Identifier:          com.alexsin.hdr-camera
Version:             1.0.0 (1)
Code Type:           X86-64 (Native)
Role:                Foreground
Parent Process:      launchd_sim [31683]
Coalition:           com.apple.CoreSimulator.SimDevice.B501ADD9-4AA0-4B48-A3EE-974CAB92A17D [4598]
Responsible Process: SimulatorTrampoline [1505]

Date/Time:           2023-04-09 19:59:48.8905 +0300
Launch Time:         2023-04-09 19:51:47.4473 +0300
OS Version:          macOS 13.2.1 (22D68)
Release Type:        User
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread:  0

Last Exception Backtrace:
0   CoreFoundation                	    0x7ff8004278bb __exceptionPreprocess + 226
1   libobjc.A.dylib               	    0x7ff80004dba3 objc_exception_throw + 48
2   Foundation                    	    0x7ff800b8637c _userInfoForFileAndLine + 0
3   ObjectiveDropboxOfficial      	       0x1090c2980 +[DBClientsManager setupWithOAuthManager:transportConfig:] + 224 (DBClientsManager.m:106)
4   ObjectiveDropboxOfficial      	       0x1090c473c +[DBClientsManager(MobileAuth) setupWithTransportConfig:] + 252 (DBClientsManager+MobileAuth-iOS.m:47)
5   ObjectiveDropboxOfficial      	       0x1090c4619 +[DBClientsManager(MobileAuth) setupWithAppKey:] + 121 (DBClientsManager+MobileAuth-iOS.m:43)
6   dropbox_client                	       0x106aa5c49 -[DropboxPlugin handleMethodCall:result:] + 633 (DropboxPlugin.m:66)
7   Flutter                       	       0x10d7b725b __45-[FlutterMethodChannel setMethodCallHandler:]_block_invoke + 104
8   Flutter                       	       0x10d1c36d4 invocation function for block in flutter::PlatformMessageHandlerIos::HandlePlatformMessage(std::_LIBCPP_ABI_NAMESPACE::unique_ptr<flutter::PlatformMessage, std::_LIBCPP_ABI_NAMESPACE::default_delete<flutter::PlatformMessage> >) + 94
9   libdispatch.dylib             	    0x7ff80013b7fb _dispatch_call_block_and_release + 12
10  libdispatch.dylib             	    0x7ff80013ca3a _dispatch_client_callout + 8
11  libdispatch.dylib             	    0x7ff80014c32c _dispatch_main_queue_drain + 1338
12  libdispatch.dylib             	    0x7ff80014bde4 _dispatch_main_queue_callback_4CF + 31
13  CoreFoundation                	    0x7ff800386b6f __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
14  CoreFoundation                	    0x7ff800381486 __CFRunLoopRun + 2482
15  CoreFoundation                	    0x7ff8003806f7 CFRunLoopRunSpecific + 560
16  GraphicsServices              	    0x7ff809c5c28a GSEventRunModal + 139
17  UIKitCore                     	       0x1109fb62b -[UIApplication _run] + 994
18  UIKitCore                     	       0x110a00547 UIApplicationMain + 123
19  Runner                        	       0x1069884ef main + 63 (AppDelegate.swift:7)
20  dyld_sim                      	       0x106b582bf start_sim + 10
21  dyld                          	       0x107907310 start + 2432

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	    0x7ff834be622a __pthread_kill + 10
1   libsystem_pthread.dylib       	    0x7ff834c3ef7b pthread_kill + 263
2   libsystem_c.dylib             	    0x7ff800132fe0 abort + 130
3   libc++abi.dylib               	    0x7ff800257742 abort_message + 241
4   libc++abi.dylib               	    0x7ff80024895d demangling_terminate_handler() + 266
5   libobjc.A.dylib               	    0x7ff800032082 _objc_terminate() + 96
6   libc++abi.dylib               	    0x7ff800256b65 std::__terminate(void (*)()) + 8
7   libc++abi.dylib               	    0x7ff800256b16 std::terminate() + 54
8   libdispatch.dylib             	    0x7ff80013ca4e _dispatch_client_callout + 28
9   libdispatch.dylib             	    0x7ff80014c32c _dispatch_main_queue_drain + 1338
10  libdispatch.dylib             	    0x7ff80014bde4 _dispatch_main_queue_callback_4CF + 31
11  CoreFoundation                	    0x7ff800386b6f __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
12  CoreFoundation                	    0x7ff800381486 __CFRunLoopRun + 2482
13  CoreFoundation                	    0x7ff8003806f7 CFRunLoopRunSpecific + 560
14  GraphicsServices              	    0x7ff809c5c28a GSEventRunModal + 139
15  UIKitCore                     	       0x1109fb62b -[UIApplication _run] + 994
16  UIKitCore                     	       0x110a00547 UIApplicationMain + 123
17  Runner                        	       0x1069884ef main + 63 (AppDelegate.swift:7)
18  dyld_sim                      	       0x106b582bf start_sim + 10
19  dyld                          	       0x107907310 start + 2432

Thread 1:: com.apple.uikit.eventfetch-thread
0   libsystem_kernel.dylib        	    0x7ff834bdf5c2 mach_msg2_trap + 10
1   libsystem_kernel.dylib        	    0x7ff834bed604 mach_msg2_internal + 82
2   libsystem_kernel.dylib        	    0x7ff834be6635 mach_msg_overwrite + 723
3   libsystem_kernel.dylib        	    0x7ff834bdf8a8 mach_msg + 19
4   CoreFoundation                	    0x7ff8003868de __CFRunLoopServiceMachPort + 145
5   CoreFoundation                	    0x7ff80038102f __CFRunLoopRun + 1371
6   CoreFoundation                	    0x7ff8003806f7 CFRunLoopRunSpecific + 560
7   Foundation                    	    0x7ff800c5595c -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 213
8   Foundation                    	    0x7ff800c55bd5 -[NSRunLoop(NSRunLoop) runUntilDate:] + 72
9   UIKitCore                     	       0x110acf886 -[UIEventFetcher threadMain] + 535
10  Foundation                    	    0x7ff800c7f1c3 __NSThread__start__ + 1009
11  libsystem_pthread.dylib       	    0x7ff834c3f259 _pthread_start + 125
12  libsystem_pthread.dylib       	    0x7ff834c3ac7b thread_start + 15

Thread 2:: io.flutter.1.ui
0   libsystem_kernel.dylib        	    0x7ff834bdf5c2 mach_msg2_trap + 10
1   libsystem_kernel.dylib        	    0x7ff834bed604 mach_msg2_internal + 82
2   libsystem_kernel.dylib        	    0x7ff834be6635 mach_msg_overwrite + 723
3   libsystem_kernel.dylib        	    0x7ff834bdf8a8 mach_msg + 19
4   CoreFoundation                	    0x7ff8003868de __CFRunLoopServiceMachPort + 145
5   CoreFoundation                	    0x7ff80038102f __CFRunLoopRun + 1371
6   CoreFoundation                	    0x7ff8003806f7 CFRunLoopRunSpecific + 560
7   Flutter                       	       0x10d4d161b fml::MessageLoopDarwin::Run() + 65
8   Flutter                       	       0x10d4cb714 fml::MessageLoopImpl::DoRun() + 22
9   Flutter                       	       0x10d4d062d void* std::_LIBCPP_ABI_NAMESPACE::__thread_proxy[abi:v15000]<std::_LIBCPP_ABI_NAMESPACE::tuple<std::_LIBCPP_ABI_NAMESPACE::unique_ptr<std::_LIBCPP_ABI_NAMESPACE::__thread_struct, std::_LIBCPP_ABI_NAMESPACE::default_delete<std::_LIBCPP_ABI_NAMESPACE::__thread_struct> >, fml::Thread::Thread(std::_LIBCPP_ABI_NAMESPACE::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0> >(void*) + 169
10  libsystem_pthread.dylib       	    0x7ff834c3f259 _pthread_start + 125
11  libsystem_pthread.dylib       	    0x7ff834c3ac7b thread_start + 15

Thread 3:: io.flutter.1.raster
0   libsystem_kernel.dylib        	    0x7ff834bdf5c2 mach_msg2_trap + 10
1   libsystem_kernel.dylib        	    0x7ff834bed604 mach_msg2_internal + 82
2   libsystem_kernel.dylib        	    0x7ff834be6635 mach_msg_overwrite + 723
3   libsystem_kernel.dylib        	    0x7ff834bdf8a8 mach_msg + 19
4   CoreFoundation                	    0x7ff8003868de __CFRunLoopServiceMachPort + 145
5   CoreFoundation                	    0x7ff80038102f __CFRunLoopRun + 1371
6   CoreFoundation                	    0x7ff8003806f7 CFRunLoopRunSpecific + 560
7   Flutter                       	       0x10d4d161b fml::MessageLoopDarwin::Run() + 65
8   Flutter                       	       0x10d4cb714 fml::MessageLoopImpl::DoRun() + 22
9   Flutter                       	       0x10d4d062d void* std::_LIBCPP_ABI_NAMESPACE::__thread_proxy[abi:v15000]<std::_LIBCPP_ABI_NAMESPACE::tuple<std::_LIBCPP_ABI_NAMESPACE::unique_ptr<std::_LIBCPP_ABI_NAMESPACE::__thread_struct, std::_LIBCPP_ABI_NAMESPACE::default_delete<std::_LIBCPP_ABI_NAMESPACE::__thread_struct> >, fml::Thread::Thread(std::_LIBCPP_ABI_NAMESPACE::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0> >(void*) + 169
10  libsystem_pthread.dylib       	    0x7ff834c3f259 _pthread_start + 125
11  libsystem_pthread.dylib       	    0x7ff834c3ac7b thread_start + 15

the "await" for authorize and unlink is not waiting for the api

Hi,
Thank you for implementing this lib.

Not sure if this my code issue, setup issue or the lib issue.
In my test, the await Dropbox.authorize() is able to open a web browser for dropbox auth, but the function is returned immediately (not finish the web auth yet) and the accessToken would be always null.
the authorize() should wait for the web auth finishing.

      await Dropbox.authorize();
      accessToken = await Dropbox.getAccessToken();

Any suggestions?

thank you

Flutter - Hot restart in console causes iOS Dropbox to crash

The use of Hot restart function in the console causes Dropbox iOS library to crash.

Related issue:
Hot Restart does not dispose native iOS/Android plugins.
flutter/flutter#69949

Dropbox iOS client library forces app crash:
(Bad software design I think. Should be just a warning.)

NSAssert(![DBOAuthManager sharedOAuthManager], @"Only call `[DBClientsManager setupWith...]` once");

https://github.com/dropbox/dropbox-sdk-obj-c/blob/0d6f0bac2519f1e36b4f9c19c108eb50ca3a59be/Source/ObjectiveDropboxOfficial/Shared/Handwritten/DBClientsManager.m#L104

Steps:

  1. Init Dropbox Library via flutter iOS (Simulator/iPhone)
  2. Press Shift+R in the console for hot restart the application
    Observed:
*** Assertion failure in +[DBClientsManager setupWithOAuthManager:transportConfig:], DBClientsManager.m:106
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Only call `[DBClientsManager setupWith...]` once'
*** First throw call stack:
(0x195c31e48 0x18eefb8d8 0x1904ea94c 0x1058f6b68 0x1058f86e0 0x1058f85e0 0x102e3eacc 0x109ce276c 0x10973cb80 0x19d2434b4 0x19d244fdc 0x19d2537f4 0x19d253444 0x195cc26d8 0x195ca403c 0x195ca8ec0 0x1cfcff368 0x19819e86c 0x19819e4d0 0x102653e68 0x1b44ca960)
libc++abi: terminating with uncaught exception of type NSException
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x00000001d35a3160 libsystem_kernel.dylib`__pthread_kill + 8
libsystem_kernel.dylib`:
->  0x1d35a3160 <+8>:  b.lo   0x1d35a3180               ; <+40>
    0x1d35a3164 <+12>: pacibsp 
    0x1d35a3168 <+16>: stp    x29, x30, [sp, #-0x10]!
    0x1d35a316c <+20>: mov    x29, sp
Target 0: (Runner) stopped.

Solution 1:
check static sharedOAuthManager if it has been initialised already and exit.
file: DropboxPlugin.m

    } else if ([@"init" isEqualToString:call.method]) {
//        NSString *clientId = call.arguments[@"clientId"];
        NSString *key = call.arguments[@"key"];
//        NSString *secret = call.arguments[@"secret"];
        if ([DBOAuthManager sharedOAuthManager]) {
          NSLog(@"Already initialized with appKey %@", appKey);
          result(@(TRUE));
          return;
        }
        appKey = key;

Solution 2:
Remove NSAssert from the dropbox library:
https://github.com/dropbox/dropbox-sdk-obj-c/blob/0d6f0bac2519f1e36b4f9c19c108eb50ca3a59be/Source/ObjectiveDropboxOfficial/Shared/Handwritten/DBClientsManager.m#L104

No implementation found for method init on channel dropbox

I get this error for init method in my flutter app.

MissingPluginException (MissingPluginException(No implementation found for method init on channel dropbox))

this is my code

void main(List<String> args) async {
  WidgetsFlutterBinding.ensureInitialized();

  await Dropbox.init("myapp", "key", "secret");
  await Dropbox.authorize();
  accessToken = await Dropbox.getAccessToken();

  if (accessToken != null) {
    await Dropbox.authorizeWithAccessToken(accessToken!);
  }

  runApp(const ProviderScope(child: MyApp()));
}

Enable short-lived access token OAUTH flow, please!

Since Dropbox doesn't allow long-lived access tokens anymore, I believe the package needs to be updated to the new authorization flow:

https://dropbox.tech/developers/migrating-app-permissions-and-access-tokens

Currently, if I save a token in shared preferences and keep using it, I simply get empty responses on all of my requests. My app needs to identify this issue from the empty responses and then initiate the re-authorize in my app to keep accessing my Dropbox. This should be done automatically without the need of user intervention in most cases, as per the above article.

At the minimum, could you at least enable some error messaging from the methods like listFolder, so my app can know for sure that the token has expired and kick off a manual re-authorization flow?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.