cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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: 

Dropbox api redirecting/opening the wrong Mac OS app

Dropbox api redirecting/opening the wrong Mac OS app

smithmsdb
Explorer | Level 3

Why is the Dropbox api redirecting to the wrong app?

 

I created a desktop Mac OS app called "DBMacApp" for testing purposes.

I worked through the tutorial at https://github.com/dropbox/dropbox-sdk-obj-c and pointed this test app to my existing Dropbox app called "ezReceipt".

 

Now I am trying to point to another app called "ezReceiptMac" to the same Dropbox app called "ezReceipt".

 

When I run and activate Dropbox from "ezReceiptMac" it still asks to grant permission to the old app called "DBMacApp" as follows:

 

Do you want to allow this page to open "DBMacApp"?  Cancel/Allow

 

If I click on "Allow" it opens the old app "DBMacApp" instead of the new app "ezReceiptMac" that is currently running.

 

Why is the old app being triggered to open while running the new app?

 

Thanks in advance

 

 

 

 

 

4 Replies 4

Greg-DB
Dropbox Staff

The app authorization flow redirect is directed by the db-<APP_KEY> URL scheme registered in an app's plist file, in the CFBundleURLTypes section.

 

It sounds like you have the same app key registered in both DBMacApp and ezReceiptMac, causing the undesired redirect. Since DBMacApp was just for testing, the easiest solution is to just delete it. If you do want to keep it around for further testing, you should update it to put in a different app key instead.

smithmsdb
Explorer | Level 3

OK, I deleted the <APP_KEY> from the plist of DBMacApp then in addition trashed it for good measure.

Unfortunately ezReceiptMac is still prompting to open the old app...  Do you want to allow this page to open “DBMacApp”?

 

Where DBMacApp is the old test app.

 

Not sure what I am missing?

smithmsdb
Explorer | Level 3

My Mac OS app is sandboxed so once I enabled "Incoming" and "Outgoing" Connections and cleaned the project it worked... well sort of.

 

When I try to Allow a connection to Dropbox with the new app "ezReceiptMac" using the below code snippet I now get: Do you want to allow this page to open “(null)”?  Cancel/Allow.

 

If I choose "Allow" I am never directed back to the app. Why would it be saying "null" for the app name?

 

 [DropboxClientsManager authorizeFromControllerDesktop:[NSWorkspace sharedWorkspace]
                                               controller:self
                                                  openURL:^(NSURL *url){ [[NSWorkspace sharedWorkspace] openURL:url]; }
                                              browserAuth:YES];

Greg-DB
Dropbox Staff
It looks like you opened a new thread for this, so I'll take a look and reply there:

https://www.dropboxforum.com/t5/API-support/Dropbox-api-v2-null-Do-you-want-to-allow-this-page-to-op...
Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    smithmsdb Explorer | Level 3
What do Dropbox user levels mean?