I was using 6.4 of Xcode and it was working fine but when I updated to Xcode 7 it seems like query isn't working for photos.
I'm getting username on table view but the images not showing I get this error when testing on simulator iPhone 5:
App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.
And when I test it on iPhone 6 I got this error :
fatal error: unexpectedly found nil while unwrapping an Optional value
(lldb)
and showing me a red thread on this line :
query.whereKey("user", equalTo: PFUser.currentUser()!.username!)