title: Retrieve the PFFile saved in parse and play using MPPlayerViewController ? I have tried this code but was unsuccessful to play in the player.
body: <p>-(void)shouldPlayVideo{
     // You can download the data for the video through the SDK, or you can use the URL of the video stored on Parse.</p>
  
  <pre><code>   // Say you have a Class on Parse called MyClass, that has a column of type File named MyFile:
  
      // assuming you've queried MyClass and have an object, we'll call it object
  PFQuery *query = [PFQuery queryWithClassName:kPAPPhotoClassKey];
  
  [query whereKey:@"Type" equalTo:@"Video"];
  </code></pre>
  
  <p>// [query whereKey:kPAPActivityFromUserKey equalTo:[PFUser currentUser]];</p>
  
  <pre><code>[query orderByDescending:@"createdAt"];
  
  NSArray *ary = [query findObjects];
  
  NSLog(@"ary is %@",ary);
  
  for (int i=0; i&lt;1; i++) {
  
  
      PFObject *obj = [ary objectAtIndex:i];
  
      PFFile *theFile = obj[@"image"];
  
      NSLog(@"%@",theFile.url);
  </code></pre>
  
  <p>//     NSURL *url = [NSURL URLWithString:theFile.url];</p>
  
  <pre><code>    // the .url property contains the URL for the file (video or otherwise)..
  // If you want to download the data:
  [theFile getDataInBackgroundWithBlock:^(NSData *data, NSError *error) {
      // data contains the full file... this block will run when it is downloaded.
      // use it inside this block.
  
      NSString *yourstring = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
  
      NSURL *url = [[NSURL alloc] initWithString:yourstring];
      NSLog(@"url of video file is %@",url);
  
      MPMoviePlayerViewController* theMovie =
      [[MPMoviePlayerViewController alloc] initWithContentURL:url];
      [theMovie.view setFrame:CGRectMake(20, 50, 280, 200)];
      //    [self presentMoviePlayerViewControllerAnimated:theMovie];
      [self.scrollView addSubview:theMovie.view];
  
     }];
  </code></pre>
  
  <p>}
  }</p>