cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Are you new to Dropbox? Our Newcomers group is the perfect place to learn the basics, find out more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SwiftyDropbox.LoadingViewController error : not key value coding-compliant for the key cancelButton

SwiftyDropbox.LoadingViewController error : not key value coding-compliant for the key cancelButton

brizzly
Helpful | Level 5
Go to solution

  After authorizing DropBox from iOS code in Swift I get this error :

 

*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<SwiftyDropbox.LoadingViewController 0x10a91c250> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key cancelButton.'

 

AppDelegate

let oauthCompletion: DropboxOAuthCompletion = {

  if let authResult = $0 {

  switch authResult {

  case .success:

  print("Success! User is logged into DropboxClientsManager.")

  case .cancel:

  print("Authorization flow was manually canceled by user!")

  case .error(_, let description):

  print("Error: \(String(describing: description))")

  }

  }

}

canHandleUrl = DropboxClientsManager.handleRedirectURL(url, completion: oauthCompletion)

return canHandleUrl

 

 

DropBox auth button:

 

DropboxClientsManager.authorizeFromControllerV2(UIApplication.shared,

controller: self,

loadingStatusDelegate: nil,

openURL: { (url: URL) -> Void in UIApplication.shared.open( url, options: [:], completionHandler: nil)},

scopeRequest: nil)

 

1 Accepted Solution

Accepted Solutions

brizzly
Helpful | Level 5
Go to solution

I found it.

 

I used a xib file named LoadViewController.xib , and DB's SDK is using the same class name. I did renamed my xib and now its alright:)

 

Thank you very much

Julien

View solution in original post

2 Replies 2

Greg-DB
Dropbox Staff
Go to solution

The SwiftyDropbox SDK doesn't contain a reference to something called "cancelButton". Is that something from your project? Did you make any modifications to the SDK?

 

In any case, I can't reproduce the issue you're seeing with the code you supplied. Also, "canHandleUrl" isn't defined; I had to add a "let". Is there additional relevant code?

 

If you're still running in to this, please share the full steps and code necessary to reproduce this issue, as well as the version numbers of SwiftyDropbox, Xcode, and iOS where you're seeing this, so we can look into it. Thanks!

brizzly
Helpful | Level 5
Go to solution

I found it.

 

I used a xib file named LoadViewController.xib , and DB's SDK is using the same class name. I did renamed my xib and now its alright:)

 

Thank you very much

Julien

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    brizzly Helpful | Level 5
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?