nixzhu / Proposer

Make permission request easier.
MIT License
854 stars 46 forks source link

Doesn't ask permission for Contacts #7

Closed mohsinka closed 7 years ago

mohsinka commented 8 years ago

Hi, Thank you for this wonderful library. I however am having some trouble asking for permissions for Contacts. The thing is, when I use this following code, it just assumes that the callback is for the agreed action, and goes into case: .Authorized in private method proposeToAccessContacts in Proposer.swift. It doesn't even take any interaction from user and goes into authorized. Please help.

let contacts: PrivateResource = .Contacts

proposeToAccess(contacts, agreed: { self.delegate?.successAction(self) //Always successful without any user interaction }, rejected: { self.delegate?.failureAction(self) })

nixzhu commented 8 years ago

It's a normal behavior if you already get the permission to access Contacts.

If you like to test it from scratch, you need to reset your device's settings first. Goto iOS Settings (General > Reset > Reset Location & Privacy). Then run your app again.

在 2016年5月18日,19:36,mohsinka notifications@github.com 写道:

Hi, Thank you for this wonderful library. I however am having some trouble asking for permissions for Contacts. The thing is, when I use this following code, it just assumes that the callback is for the agreed action, and goes into case: .Authorized in private method proposeToAccessContacts in Proposer.swift. It doesn't even take any interaction from user and goes into authorized. Please help.

let contacts: PrivateResource = .Contacts proposeToAccess(contacts, agreed: { self.delegate?.successAction(self) //Always successful without any user interaction }, rejected: { self.delegate?.failureAction(self) })

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub