我有一个GTLServiceTicket对象,旨在方便我上传文件。它在我的代码中早先定义为
GTLServiceTicket *_uploadFileTicket;
并使用
进行调用 NSString *mimeType = [self MIMETypeForFilename:filename
defaultMIMEType:@"video/mp4"];
GTLUploadParameters *uploadParameters =
[GTLUploadParameters uploadParametersWithFileHandle:fileHandle
MIMEType:mimeType];
uploadParameters.uploadLocationURL = locationURL;
GTLQueryYouTube *query = [GTLQueryYouTube queryForVideosInsertWithObject:video
part:@"snippet,status"
uploadParameters:uploadParameters];
GTLServiceYouTube *service = self.youTubeService;
_uploadFileTicket = [service executeQuery:query
completionHandler:^(GTLServiceTicket *ticket,
GTLYouTubeVideo *uploadedVideo,
NSError *error) {
// Callback
NSLog(@"Here!");
//Other uploading file stuff
此使用工作得非常好。现在“这里”甚至没有被召唤。所以无论发生什么,它都没有运行那个GTLServiceTicket对象。它直到最近才停止工作。在那段时间内,我实现了两个新功能:
以下我可以确认我的问题:
所以我的问题是:
谢谢!