執行以下操作將本地文件上傳到Google雲端硬盤會導致崩潰。爲什麼設置Google Drive文件的modifiedDate會導致iOS Drive api崩潰?
GTLDriveFile *gFile = [GTLDriveFile object];
gFile.title = "MyFileName.txt";
// Other file setup
NSDate *myLocalDate = [self fileDate:myPath];
gFile.modifiedDate = [GTLDateTime dateTimeWithDate:myLocalDate timeZone:gmtZone];
// Other GTLQueryDrive and GTLUploadParameters calls
query.setModifiedDate = YES;
[service executeQuery:query completionHandler: (etc)
fileDate:path方法返回正在上傳的本地文件的fileModificationDate屬性。崩潰消息是:
錯誤域= com.google.GTLJSONRPCErrorDomain代碼= 400「該操作無法完成。(無效的值爲:格式無效:」2014-09-14T13:21:58 + 00: 00「格式不正確