回答編集履歴

1

権限。

2016/05/11 00:59

投稿

fuzzball
fuzzball

スコア16731

test CHANGED
@@ -1 +1,31 @@
1
+ # その1
2
+
3
+
4
+
1
5
  [ドキュメント](https://developers.google.com/drive/ios/auth?hl=ja#register_your_application_in_the_console_name_short)を流し読みしただけですが、認証時に取得した`credentials`を`driveService.authorizer`にセットしないとダメなんじゃないでしょうか?
6
+
7
+
8
+
9
+ # その2
10
+
11
+
12
+
13
+ 権限が無いっぽいですね。サンプルコードを眺めてみましたが、冒頭の、
14
+
15
+
16
+
17
+ ```swift
18
+
19
+ private let scopes = [kGTLAuthScopeDriveMetadataReadonly]
20
+
21
+ ```
22
+
23
+
24
+
25
+ これが原因でしょう。
26
+
27
+
28
+
29
+ [Choose Auth Scopes](https://developers.google.com/drive/v2/web/scopes#google_drive_scopes)を見ると、`drive`か`drive.file`でいけると思います。
30
+
31
+