Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swift4, xcode 9.2 errors #101

Closed
gaming-hacker opened this issue Mar 10, 2018 · 6 comments
Closed

swift4, xcode 9.2 errors #101

gaming-hacker opened this issue Mar 10, 2018 · 6 comments

Comments

@gaming-hacker
Copy link

gaming-hacker commented Mar 10, 2018

hi,
i get the following errors

Cannot convert return expression of type 'Dictionary<Key, Value>.Values' to return type 'LazyMapCollection<[Key : Value], Value>'

lines 330-333

  public var keys: LazyMapCollection<[Key : Value], Key> {
    return _data.keys
  }
  public var values: LazyMapCollection<[Key : Value], Value> {
    return _data.values
  }

i didn't see the "values" being used anywhere?? i commented out the lines and checked a couple of files and servers and got back the correct GET/POST

@goribchat
Copy link

is Just supported for swift 4.0?

@juzhizhang
Copy link

juzhizhang commented Mar 14, 2018

public var keys:Dictionary<Key,Value>.Keys {
return _data.keys

}
public var values:Dictionary
<Key,Value>.Values {
return _data.values
}

change, is ok!

@olferuk
Copy link

olferuk commented Mar 24, 2018

@juzhizhang create a PR with relevant changes, please.

@goribchat
Copy link

This is my response message.
here is my code
let params = ["username" : email, "password": password] as [String : Any]
Just.post(Constant.url.login1,params: params) { (r) in
if !r.ok {
print(r.text!)

    }
    else{
        
        let json = r.text!
        print(json)
        let login = Mapper<UserRoot>().map(JSONString: json)
        let errorValue = login?.success
        self.userDetails1 =  login?.details
        DispatchQueue.main.async {
            if errorValue == true {
                self.userDetails1.backup = self.passwordTF.text!
                self.passwordTF.text = ""
            }
            else if errorValue == false {
               
            }
        }
    }
but after giving proper login credentials it is showing that username password is wrong. please help..

@gaming-hacker
Copy link
Author

check to see if you have synced the thread back on the main thread and update the gui

@goribchat
Copy link

Okay Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants