Skip to content

Commit 88e49a9

Browse files
author
Josh Zana
committed
Update README for Swift changes (and excess whitespace)
1 parent 28f296c commit 88e49a9

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -250,14 +250,14 @@ To facilitate the above authorization flows, you should take the following steps
250250

251251
#### Initialize a `DropboxClient` instance
252252

253-
From your application delegate:
253+
From your application delegate:
254254

255255
##### iOS
256256

257257
```Swift
258258
import SwiftyDropbox
259259

260-
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
260+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
261261
DropboxClientsManager.setupWithAppKey("<APP_KEY>")
262262
return true
263263
}
@@ -280,7 +280,7 @@ func applicationDidFinishLaunching(_ aNotification: Notification) {
280280
You can commence the auth flow by calling `authorizeFromController:controller:openURL` method in your application's
281281
view controller.
282282

283-
From your view controller:
283+
From your view controller:
284284

285285
##### iOS
286286

@@ -303,10 +303,10 @@ func myButtonInControllerPressed() {
303303
import SwiftyDropbox
304304

305305
func myButtonInControllerPressed() {
306-
DropboxClientsManager.authorizeFromController(sharedWorkspace: NSWorkspace.shared(),
306+
DropboxClientsManager.authorizeFromController(sharedWorkspace: NSWorkspace.shared,
307307
controller: self,
308308
openURL: { (url: URL) -> Void in
309-
NSWorkspace.shared().open(url)
309+
NSWorkspace.shared.open(url)
310310
})
311311
}
312312
```
@@ -329,7 +329,7 @@ To handle the redirection back into the Swift SDK once the authentication flow i
329329
```Swift
330330
import SwiftyDropbox
331331

332-
func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
332+
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
333333
if let authResult = DropboxClientsManager.handleRedirectURL(url) {
334334
switch authResult {
335335
case .success:
@@ -541,7 +541,7 @@ client.files.deleteV2(path: "/test/path/in/Dropbox/account").response { response
541541
switch error as CallError {
542542
case .routeError(let boxed, let userMessage, let errorSummary, let requestId):
543543
print("RouteError[\(requestId)]:")
544-
544+
545545
switch boxed.unboxed as Files.DeleteError {
546546
case .pathLookup(let lookupError):
547547
switch lookupError {
@@ -584,9 +584,9 @@ client.files.deleteV2(path: "/test/path/in/Dropbox/account").response { response
584584

585585
#### Generic network request errors
586586

587-
In the case of a network error, errors are either specific to the endpoint (as shown above) or more generic errors.
587+
In the case of a network error, errors are either specific to the endpoint (as shown above) or more generic errors.
588588

589-
To determine if an error is route-specific or not, the error object should be cast as a `CallError`, and depending on the type of error, handled in the appropriate switch statement.
589+
To determine if an error is route-specific or not, the error object should be cast as a `CallError`, and depending on the type of error, handled in the appropriate switch statement.
590590

591591
```Swift
592592
client.files.deleteV2(path: "/test/path/in/Dropbox/account").response { response, error in
@@ -730,7 +730,7 @@ The Swift SDK includes a convenience class, `DropboxClientsManager`, for integra
730730

731731
#### Single Dropbox user case
732732

733-
For most apps, it is reasonable to assume that only one Dropbox account (and access token) needs to be managed at a time. In this case, the `DropboxClientsManager` flow looks like this:
733+
For most apps, it is reasonable to assume that only one Dropbox account (and access token) needs to be managed at a time. In this case, the `DropboxClientsManager` flow looks like this:
734734

735735
* call `setupWithAppKey`/`setupWithAppKeyDesktop` (or `setupWithTeamAppKey`/`setupWithTeamAppKeyDesktop`) in integrating app's app delegate
736736
* client manager determines whether any access tokens are stored -- if any exist, one token is arbitrarily chosen to use
@@ -745,7 +745,7 @@ The `DropboxClient` (or `DropboxTeamClient`) is then used to make all of the des
745745

746746
#### Multiple Dropbox user case
747747

748-
For some apps, it is necessary to manage more than one Dropbox account (and access token) at a time. In this case, the `DropboxClientsManager` flow looks like this:
748+
For some apps, it is necessary to manage more than one Dropbox account (and access token) at a time. In this case, the `DropboxClientsManager` flow looks like this:
749749

750750
* access token uids are managed by the app that is integrating with the SDK for later lookup
751751
* call `setupWithAppKeyMultiUser`/`setupWithAppKeyMultiUserDesktop` (or `setupWithTeamAppKeyMultiUser`/`setupWithTeamAppKeyMultiUserDesktop`) in integrating app's app delegate
@@ -809,7 +809,7 @@ To ensure your changes have not broken any existing functionality, you can run a
809809
## Bugs
810810

811811
Please post any bugs to the [issue tracker](https://github.com/dropbox/SwiftyDropbox/issues) found on the project's GitHub page.
812-
812+
813813
Please include the following with your issue:
814814
- a description of what is not working right
815815
- sample code to help replicate the issue

0 commit comments

Comments
 (0)