小编Way*_*lli的帖子

EKEventStore请求访问不起作用

var eventStore:EKEventStore?

@IBAction func bbbbbbb(sender: UIButton) {
        if eventStore == nil {
            eventStore = EKEventStore()
        }
        self.eventStore?.requestAccessToEntityType(EKEntityType.Event, completion: { (aBool, error) -> Void in
            print(error, aBool)
        })
}
Run Code Online (Sandbox Code Playgroud)

print是nil,false总是...它的行为就像用户已经拒绝访问,但promt永远不会被显示.相同的代码当然适用于同一设备上的新空白应用程序.我尝试过的事情:在设备上休息设置,模拟器并使用从未安装应用程序的新设备,当然还有清理项目,但没有成功.此外,在应用设置中,日历权限也不会显示.对于发生了什么的任何想法?

calendar ios ekeventstore swift

1
推荐指数
1
解决办法
1543
查看次数

标签 统计

calendar ×1

ekeventstore ×1

ios ×1

swift ×1