Код: Выделить всё
Info.plistКод: Выделить всё
NSContactsUsageDescription
foo
< /code>
// ViewController.swift
import Contacts
.
.
.
override func viewWillAppear(_ animated: Bool) {
print (#function)
do {
print ("pretrigger")
let store = CNContactStore()
print ("triggered?")
try store.groups(matching: nil)// this triggers perms
print ("triggered2?")
} catch {
}
}
< /code>
This seems to happen only for the system's modal, if I create my own view controller, like CNContactPickerDelegateПодробнее здесь: https://stackoverflow.com/questions/796 ... controller
Мобильная версия