Parse-sdk-ios-osx: Progress call .getDataInBackgroundWithBlock not called Swift 3

Created on 18 Sep 2016  路  3Comments  路  Source: parse-community/Parse-SDK-iOS-OSX

        // Get and set user's profile picture
        friendProfiles[indexPath.row].fetchIfNeededInBackgroundWithBlock({
            (object: PFObject?, error: NSError?) in
            if error == nil {
                if let proPic = object!["userProfilePicture"] as? PFFile {
                    proPic.getDataInBackgroundWithBlock({
                        (data: NSData?, error: NSError?) in
                        if error == nil {
                            // Set user's profile photo
                            cell.RPUserProfilePicture.image = UIImage(data: data!)
                        } else {
                            print(error?.localizedDescription)
                        }
                    })
                } else {
                    // Set gender neutral icon
                    cell.RPUserProfilePicture.image = UIImage(named: "Gender Neutral User-96")
                }

Do I have to update the ParseUI framework with cocoapods?

Stale

Most helpful comment

I found the same issue, replace NSError with Error. IT should fix.

All 3 comments

I found the same issue, replace NSError with Error. IT should fix.

fileFoto.getDataInBackground {
(imageData: Data?, error: Error?) -> Void in ...

This issue has been automatically marked as stale because it has not had recent activity. If you believe it should stay open, please let us know! As always, we encourage contributions, check out the Contributing Guide

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kingmatusevich picture kingmatusevich  路  9Comments

drewlarsen picture drewlarsen  路  10Comments

agordeev picture agordeev  路  8Comments

mman picture mman  路  8Comments

talkaboutdesign picture talkaboutdesign  路  8Comments