Avoid calling getResultsForConfig twice
getResultsForConfig was being called before and in allAuthorized
Is there a particular case where this is called twice? It doesn't look like it happens always...
Also, I just merged this locally with #115 and it won't show the UI using the example app, just returns returned results [LocationInUse Unknown, Notifications Unknown, Contacts Unknown] for a fresh simulator.
Flow: detectAndCallback --> getResultsForConfig ----> allAuthorized ------> getResultsForConfig
Also, I just merged this locally with #115 and it won't show the UI using the example app, just returns
returned results [LocationInUse Unknown, Notifications Unknown, Contacts Unknown]for a fresh simulator.
Yeah, that's the problem with the fix: https://github.com/nickoneill/PermissionScope/issues/125#issuecomment-155255670
OK, I'll deal with that one first, then I'll come back to figure out what's going on here.
I don't think that's the same issue as #125 - this was just me using the standard example project, not the special no UI case that we're dealing with there.
The problem in #125 was that results would say one thing, while statusNotifications would report another (the correct one).
singlePscope.onAuthChange = { (finished, results) in
print("got results \(results)")
print("statusNotifications \(self.singlePscope.statusNotifications())")
}
And also, show isn't working in this branch