Note that there are some explanatory texts on larger screens.

plurals
  1. POParse.com -- PFFile is null
    primarykey
    data
    text
    <p>So I'm retrieving an object that has a file as one of it's fields. In the Parse.com data browser the file is there and downloads. However, when I retrieve the object, <code>PFFile *wordlistFile = [object objectForKey:kWSWordlistFilesFileKey];</code> is returning null, and so <code>getDataInBackgroundWithBlock</code> does nothing.</p> <p>Here's the log of the object I'm retrieving. There is no reference to the file:</p> <pre><code>2013-12-03 12:07:10.635 WSPhoto[24958:a0b] object = &lt;WordlistFiles:lRHFmHaPRg:(null)&gt; { ACL = "&lt;PFACL: 0xd445670&gt;"; language = Spanish; } </code></pre> <p>And here's the full code. It appears I'm doing everything correctly based on some examples I've seen:</p> <pre><code>PFQuery* wordlistFilesQuery = [PFQuery queryWithClassName:kWSWordlistFilesClassKey]; [wordlistFilesQuery whereKey:kWSWordlistFilesLanguageKey equalTo:language]; [wordlistFilesQuery includeKey:kWSWordlistFilesFileKey]; [wordlistFilesQuery setCachePolicy:kPFCachePolicyNetworkOnly]; [wordlistFilesQuery getFirstObjectInBackgroundWithBlock:^(PFObject *object, NSError *error) { if (!error) { PFFile *wordlistFile = [object objectForKey:kWSWordlistFilesFileKey]; NSLog(@"******* wordlistFile = %@",wordlistFile); // Show HUD view AppDelegate *appDel = (AppDelegate *)[[UIApplication sharedApplication]delegate]; [appDel showGlobalProgressHUDWithTitle:@"Loading wordlist. This may take a while."]; [wordlistFile getDataInBackgroundWithBlock:^(NSData *data, NSError *error) { if (!error) { // Super private stuff here } // The data didn't load else { NSLog(@"loadWordlistFromDBByFile -- wordlist does not exist, loading by querying"); [self loadWordlistFromDBByQuery:language]; } } progressBlock:^(int percentDone) { }]; } // The object didn't load else { NSLog(@"loadWordlistFromDBByFile -- wordlist does not exist, loading by querying"); [self loadWordlistFromDBByQuery:language]; } }]; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload