9

until recently, I've always used Parse.com for data management of my app I was now working on a new project and I have some problems ....

P.S. I'm using Xcode 6

First there PFImageView, you can confirm this? at this point without consulting a PFImageView how can I draw a picture in my app? I do not understand why you can not use in my app PFImageView

Also when I do a query, previously (using the enter button on the keyboard) appeared the auto-build block of the query but now I find myself this

  PFQuery *query = [PFUser query];
  [query findObjectsInBackgroundWithBlock: (nullable PFArrayResultBlock (nullable) block]

What is happening to parse.com? where am I doing wrong? someone can 'give me help on this?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
kAiN
  • 2,559
  • 1
  • 26
  • 54
  • no one has noticed this problem with parse.com ?? there are ways to figure out what's going on? – kAiN Apr 30 '15 at 06:37
  • PFQuery *query = [PFUser query]; replace this with PFQuery *query = [PFQuery queryWithClassName:@"_User"]; this might help and get it in backgound like [query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) { }}]; – Ajay Gabani May 12 '15 at 12:27
  • Rory, are you allowing Xcode access to the Internet when it starts up? I know it's basic but please confirm connectivity. – Tommie C. May 15 '15 at 12:07

2 Answers2

2

On the PFImageView:

Try calling – loadInBackground on in. Source

On autocompletion:

This seems to be a bug in Xcode actually. After they have implemented the "nullable" keyword, Xcode seems to be having a hard time auto generating code for the blocks you pass as arguments. That has nothing to do with Parse though.

Bell App Lab
  • 818
  • 6
  • 14
1

Why don't use PFFile instead?

For loading an image from data you can do like this:

    PFFile *fileImage = your_file;
    [fileImage getDataInBackgroundWithBlock:^(NSData *imageData, NSError *error) {
       UIImage *image = [UIImage imageWithData:imageData];
       yourImageView.image = image;
    }];

And for the PFQuery replace that method with this block:

 [query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) { }}]; 

or check the class reference here

Benetz
  • 447
  • 5
  • 18