Skip to content

iphone 5 and 4s can't fetch data  #2423

Closed
@mkaya93

Description

@mkaya93

last version of parse
self hosted on azure

Problem is on iPhone 4s and 5 I can't fetch data's.But in other devices its works.Also I can make login process and some other queries too. Also that's not giving me an error.

This is my code

let query = PFQuery(className: "Activity")
        query.orderByDescending("createdAt")
        query.whereKey("members", equalTo: PFUser.currentUser()!)
        query.whereKey("fromUser", notEqualTo: PFUser.currentUser()!)
        query.includeKey("fromUser")
        query.includeKey("members")
        query.whereKey("Type", notEqualTo: "joinToBons")
        query.includeKey("friends_request")
        query.includeKey("group")
        self.label = UILabel(frame: CGRectMake(0, self.tableView.frame.size.height / 2, self.view.frame.size.width, 20))

        query.findObjectsInBackgroundWithBlock { (object, error) in
            self.label.removeFromSuperview()
            if error == nil {
                self.notifications = object!
                if object?.count == 0 {
                    self.dataAvailable = false
                    self.label.center = self.tableView.center
                    self.label.textAlignment = .Center
                    self.label.text = "nonotification".localized()
                    self.notifications.removeAll()
                    self.view.addSubview(self.label)

                }else {
                    self.label.performSelectorOnMainThread(#selector(self.label.removeFromSuperview), withObject: nil, waitUntilDone: false)
                    self.label.removeFromSuperview()
                    self.label.hidden = true
                    self.label.text = ""
                    self.dataAvailable = true
                }
            }else {
                print(error)
            }
            self.view.setNeedsLayout()
            self.loader.hideActivityIndicatorWithAnimation(self.view)
            self.tableView.reloadData()
            self.refreshControl?.endRefreshing()
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions