we retireve saved passwords through function:
secrequestsharedwebcredential(null, null, ^(cfarrayref credentials, cferrorref error) { if (!error && cfarraygetcount(credentials)) { cfdictionaryref credential = cfarraygetvalueatindex(credentials, 0); if (credential > 0) { cfdictionaryref credential = cfarraygetvalueatindex(credentials, 0); nsstring *username = cfdictionarygetvalue(credential, ksecattraccount); nsstring *password = cfdictionarygetvalue(credential, ksecsharedpassword); dispatch_async(dispatch_get_main_queue(), ^{ //updates ui here. }); } } });
the issue on ios 9.3.3 iphone 6 a1524, prompt entry called 'passwords not saved'. there no error message suggest no passwords have been found. because array > 0, completes form entry.
why case? thought prmopt not appear if no passwords stored under entitled domains.
any suggestions?
thank you.
i'm checking in viewdidload()
auth view controller. code bit different above, gleaned several other answers.
swift 3:
secrequestsharedwebcredential(configuration.webbasefqdn cfstring, nil, { (credentials, error) in if let error = error { print("error: credentials") print(error) } guard let credentials = credentials, cfarraygetcount(credentials) > 0 else { // did not find shared web credential. return } guard cfarraygetcount(credentials) == 1 else { // there should 1 credential. return } let unsafecredential = cfarraygetvalueatindex(credentials, 0) let credential = unsafebitcast(unsafecredential, to: cfdictionary.self) let unsafeemail = cfdictionarygetvalue(credential, unmanaged.passunretained(ksecattraccount).toopaque()) let email = unsafebitcast(unsafeemail, to: cfstring.self) string let unsafepassword = cfdictionarygetvalue(credential, unmanaged.passunretained(ksecsharedpassword).toopaque()) let password = unsafebitcast(unsafepassword, to: cfstring.self) string if self.isvalidemail(email) && self.isvalidpassword(password) { self.usedsharedwebcredentials = true self.dosignin(email: email, password: password) } })
the check @ end isvalidemail(_:)
, isvalidpassword(_:)
handles case secrequeestsharedwebcredential()
returns "passwords not saved" in first credential (email).
hopefully can explain why happening, if not, @ least there's way trap scenario.
i'd add i've seen ios 10.2.1
Comments
Post a Comment