cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Back again with another edition of 'How we use Dropbox', so find out how Emma uses to-do lists to get it all done 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: 

-canOpenURL: failed for URL:

-canOpenURL: failed for URL:

DimMalysh
Explorer | Level 4

Hi!

I get the following in the console:Снимок экрана 2017-08-25 в 12.08.08.png

What could be the problem?

Please, help. 

1 Accepted Solution

Accepted Solutions

Re: -canOpenURL: failed for URL:

Greg-DB
Dropboxer

The canOpenURL messages are expected, and can be ignored, since the "(null)" error indicates that nothing went wrong. Your plist also looks correct.

 

The "view is not in the window hierarchy" error message is likely indicating why the authorization view isn't being shown. It is indicating that your ViewController isn't in the window hierarchy. It appears your ViewController wasn't presented (or was already dimissed). The screenshot seems to support that, as it doesn't show anything, such as the button that would trigger your myButtonInControllerPressed. You'll need to make sure your ViewController is presented and not dismissed. Exactly how you do that would be specific to your app, and is outside the scope of Dropbox API support, so I'm afraid I can't offer much more specific guidance.

View solution in original post

5 Replies 5

Re: -canOpenURL: failed for URL:

DimMalysh
Explorer | Level 4

It's my .plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>dbapi-8-emm</string>
<string>dbapi-2</string>
</array>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>db-h0tdpp8hmg0pj17</string>
</array>
<key>CFBundleURLName</key>
<string></string>
</dict>
</array>
</dict>
</plist>

Re: -canOpenURL: failed for URL:

DimMalysh
Explorer | Level 4

 

Снимок экрана 2017-08-25 в 12.30.22.pngit's my ViewController.m:

 

Re: -canOpenURL: failed for URL:

DimMalysh
Explorer | Level 4

... but there is no authorization form when starting the program

Снимок экрана 2017-08-25 в 12.33.09.png

Re: -canOpenURL: failed for URL:

Greg-DB
Dropboxer

The canOpenURL messages are expected, and can be ignored, since the "(null)" error indicates that nothing went wrong. Your plist also looks correct.

 

The "view is not in the window hierarchy" error message is likely indicating why the authorization view isn't being shown. It is indicating that your ViewController isn't in the window hierarchy. It appears your ViewController wasn't presented (or was already dimissed). The screenshot seems to support that, as it doesn't show anything, such as the button that would trigger your myButtonInControllerPressed. You'll need to make sure your ViewController is presented and not dismissed. Exactly how you do that would be specific to your app, and is outside the scope of Dropbox API support, so I'm afraid I can't offer much more specific guidance.

View solution in original post

Re: -canOpenURL: failed for URL:

DimMalysh
Explorer | Level 4

Thank you friend! I changed the place of the function authorizeFromController:controller:openURL call and it all worked!

Poll
We love to learn from the educators who use Dropbox. Whether you teach kids, teens, adults or a combination of all three, we want to know what apps and integrations you use with Dropbox to help with teaching. Which of the ones below is your favorite, or most used tool?
Who's talking

Top contributors to this post

  • User avatar
    DimMalysh Explorer | Level 4
  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?