What did you do?
I attempted to integrate a macOS app with the Box SDK.
What did you expect to happen?
I realize that the name of the SDK is box-ios-sdk, but osx is listed as one of the supported platforms. As such, I expected the SDK to work with a Mac app.

What happened instead?
The project links against the SDK without error, but then things start failing silently. I attempted using sample code to authenticate via OAuth and the call never returns. In looking at obtainAuthorizationCodeFromWebSession, I discovered that the code simply bails if not iOS. This is a silent fail without any console log if running on another platform.
func obtainAuthorizationCodeFromWebSession(completion: @escaping Callback<String>) {
let authorizeURL = makeAuthorizeURL(state: nonce)
#if os(iOS)
... iOS goodness here...
#endif
}
My preference would be for the SDK to work with Mac (like Dropbox does). If Box chooses to not go that direction, the code should be updated to log a console message and/or return an error in the callback and documentation should be updated so others don't spend time going down this same path.
BoxSDK Environment
BoxSDK version:
3.1.1
Xcode version:
11.3.1
Swift version:
5
Platform(s) running BoxSDK:
macOS
macOS version running Xcode:
10.15.2
Demo Project
clouduploader.zip
Client secrets and IDs scrubbed from the above for both Box and Dropbox.
What did you do?
I attempted to integrate a macOS app with the Box SDK.
What did you expect to happen?
I realize that the name of the SDK is
box-ios-sdk, butosxis listed as one of the supported platforms. As such, I expected the SDK to work with a Mac app.What happened instead?
The project links against the SDK without error, but then things start failing silently. I attempted using sample code to authenticate via OAuth and the call never returns. In looking at
obtainAuthorizationCodeFromWebSession, I discovered that the code simply bails if not iOS. This is a silent fail without any console log if running on another platform.My preference would be for the SDK to work with Mac (like Dropbox does). If Box chooses to not go that direction, the code should be updated to log a console message and/or return an error in the callback and documentation should be updated so others don't spend time going down this same path.
BoxSDK Environment
BoxSDK version:
3.1.1
Xcode version:
11.3.1
Swift version:
5
Platform(s) running BoxSDK:
macOS
macOS version running Xcode:
10.15.2
Demo Project
clouduploader.zip
Client secrets and IDs scrubbed from the above for both Box and Dropbox.