Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
yhuriez opened this issue Jul 18, 2022 · 11 comments

Comments

@yhuriez
Copy link

yhuriez commented Jul 18, 2022

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 ?

@yhuriez
Copy link
Author

yhuriez commented Jul 18, 2022

It seems Dropbox team has added a new parameter to the dropbox API : https://stackoverflow.com/a/72265351

@mix1009
Copy link
Owner

mix1009 commented Jul 19, 2022

What version did the app link with?
I was able to compile without issue.
Version info from ./ios/Podfile.lock :

PODS:

  • dropbox_client (0.5.1):
    • Flutter
    • ObjectiveDropboxOfficial
  • Flutter (1.0.0)
  • ObjectiveDropboxOfficial (4.0.0)
  • path_provider_ios (0.0.1):
    • Flutter
  • shared_preferences_ios (0.0.1):
    • Flutter

Build procedure:
$ git clone [email protected]:mix1009/FlutterDropbox.git
$ cd FlutterDropbox/example
$ flutter pub upgrade
$ flutter pub get
$ rm ios/Podfile
$ flutter build ios

Version used:
Flutter 3.0.5 • channel stable • https://github.com/flutter/flutter.git
Dart 2.17.6 • DevTools 2.12.2
pod --version : 1.11.3
Xcode 13.4.1 from AppStore.

@yhuriez
Copy link
Author

yhuriez commented Jul 19, 2022

On my side, in the Podfile.lock I have :

  • dropbox_client (0.5.1):
    • Flutter
    • ObjectiveDropboxOfficial
  • Flutter (1.0.0)
  • ObjectiveDropboxOfficial (6.3.2)

My flutter doctor :
[✓] Flutter (Channel stable, 3.0.5, on macOS 12.4 21F79 darwin-x64, locale fr-FR)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc1)
[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)

Pod version : 1.11.2

I've notice the version of ObjectiveDropboxOfficial is not the same as yours, I don't understand why

@yhuriez
Copy link
Author

yhuriez commented Jul 19, 2022

Deleting the Podfile and building the app seems to resolve the problem, but as soon as I do a pod update, the problem come back.

@dakshalraijada
Copy link

Hi, is there any update on this? I am getting the same error

@jebastindev
Copy link

uploadData:dropboxpath
mode:mode
autorename:@(YES)
clientModified:nil
mute:@(NO)
propertyGroups:nil
strictConflict:@(NO)

contentHash:nil

inputData:fileData

add contentHash:nil before inputData:fileData it will work try this

@mix1009
Copy link
Owner

mix1009 commented Aug 4, 2022

fea4287

should fix the issue.

It checks respondsToSelector and dynamically calls the right method.

@mix1009
Copy link
Owner

mix1009 commented Aug 4, 2022

7875717

committed a fix

@dakshalraijada
Copy link

@mix1009 Thanks, is there an update on the AppDelegate file on swift needed? If so, can you post it, please?
At the moment, I am getting

"Missing argument for parameter 'completion' for call"

@mix1009
Copy link
Owner

mix1009 commented Aug 5, 2022

@dakshalraijada

I've updated the documentation in https://github.com/mix1009/FlutterDropbox/blob/master/README.md .

override func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
  DBClientsManager.handleRedirectURL(url, completion:{ (authResult) in
    if let authResult = authResult {
        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
}

@dakshalraijada
Copy link

@mix1009 Thanks mate, that fixes it. You're a ⭐ 🌟

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants