Mac Catalyst 中的 requestApplicationPermission userDiscoverability 失败
requestApplicationPermission userDiscoverability failed in Mac Catalyst
我有 ios 应用使用 requestApplicationPermission userDiscoverability。今天,我添加了 Mac Catalyst 支持,但失败了:“requestApplicationPermission(.userDiscoverability) 失败,错误:CloudKit 访问被用户设置拒绝”。
container.requestApplicationPermission(.userDiscoverability) { [weak self] (status, error) in
guard let self = self else { return }
DispatchQueue.main.async {
if let error = error {
foolPrint("requestApplicationPermission(.userDiscoverability) failed, error: \(error.localizedDescription)")
}
}
}
而且我在 mac 设置中找不到关于 userDiscoverability 的设置,它在哪里?
此 iCloud user guide 展示了如何更改这些设置:
- On iCloud.com, go to Account Settings, then click Manage Apps That Can Look You Up in the Advanced section.
- To prevent an app from showing your name and email address to other users, deselect the app’s checkbox in the list.
我有 ios 应用使用 requestApplicationPermission userDiscoverability。今天,我添加了 Mac Catalyst 支持,但失败了:“requestApplicationPermission(.userDiscoverability) 失败,错误:CloudKit 访问被用户设置拒绝”。
container.requestApplicationPermission(.userDiscoverability) { [weak self] (status, error) in
guard let self = self else { return }
DispatchQueue.main.async {
if let error = error {
foolPrint("requestApplicationPermission(.userDiscoverability) failed, error: \(error.localizedDescription)")
}
}
}
而且我在 mac 设置中找不到关于 userDiscoverability 的设置,它在哪里?
此 iCloud user guide 展示了如何更改这些设置:
- On iCloud.com, go to Account Settings, then click Manage Apps That Can Look You Up in the Advanced section.
- To prevent an app from showing your name and email address to other users, deselect the app’s checkbox in the list.