Objective c iOS-从Parse下载视频数据

Objective c iOS-从Parse下载视频数据,objective-c,parse-platform,avfoundation,nsdata,Objective C,Parse Platform,Avfoundation,Nsdata,我正在尝试下载一个PFSS文件,它是tfss文件(?)。它将作为文本文件打开。这是我用于检索数据的代码: -(void) queryVideoWithDictionary:(NSDictionary *)dictionary { PFQuery *videoQuery = [PFQuery queryWithClassName:@"EventVideos"]; [videoQuery whereKey:@"objectId" equalTo:[dictionary objectF

我正在尝试下载一个PFSS文件,它是tfss文件(?)。它将作为文本文件打开。这是我用于检索数据的代码:

-(void) queryVideoWithDictionary:(NSDictionary *)dictionary {
    PFQuery *videoQuery = [PFQuery queryWithClassName:@"EventVideos"];
    [videoQuery whereKey:@"objectId" equalTo:[dictionary objectForKey:@"videoId"]];
    [videoQuery findObjectsInBackgroundWithBlock:^(NSArray *results, NSError *error) {
        if (!error) {
            PFFile *videoFile = [results[0] objectForKey:@"video"];
            [videoFile getDataInBackgroundWithBlock:^(NSData *data, NSError *error) {
                dispatch_async(dispatch_get_main_queue(), ^{
                    NSString *dataString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
                  //  NSURL *movieURL = [NSURL fileURLWithPath:dataString];

                    NSMutableDictionary *videoDictionary = [NSMutableDictionary dictionaryWithObject:data forKey:[dictionary objectForKey:@"videoId"]];
                    [self.videoArray addObject:videoDictionary];

                    NSLog(@"video array count: %ld", self.videoArray.count);

                    NSLog(@"dataString: %@", dataString);
                //    NSLog(@"movieURL: %@", movieURL);
                    [self.player setItemByStringPath:dataString];
                    [self.player play];
                });          
            }];
        } else {
            NSLog(@"error");
        }  
    }];
}
dataString
被记录时,它返回null,因此我不知道如何获取数据并将其作为视频播放。顺便说一下,它保存为QuickTimeMovie。 我使用SCRecorder播放和录制视频


编辑:
data
绝对不是nil,我仍然不知道如何解决这个问题。

getDataInBackgroundWithBlock:
background nil中的错误吗?是的,它在@LarmeIs data nil时不返回错误?你能把它记录下来吗?videoFile是否为零?这是videoFile:videoFile:这是数据:数据:您确定数据可转换为字符串吗?