iOS重置授予对提醒的访问权限
我有一个愚蠢的问题,你肯定已经遇到过。
I have a silly problem, one of you surely already encountered.
我正在我的应用程序中添加提醒/闹钟,我正在使用:eventStoreAccessGranted。
I am working on adding reminder/alarm in my app and I am using : eventStoreAccessGranted.
一切正常。当我第一次安装应用程序时,我被问到是否要授予对应用程序的访问权限,我说是,然后我收到了提醒/警报,正如我编程的那样。
It all works fine. When I installed the app for the first time, I got asked if I want to grant access to the app, I said yes and then I got my reminder/alarm, as I programmed it.
我需要测试更多,特别是因为我本地化我想写下我正在使用的几种语言中授予访问添加提醒的问题。问题是,我被问了一次,就是这样,我再也不会被问到了。
I need to test more though and especially because I am localizing I want to write down the question of "granting access to add reminders" in the several languages I am using. Problem is, I got asked once and that's it, I don't get asked again.
我试图杀死应用程序并完全从我的手机中删除它,但是当我重新安装它,我的答案是仍然存储在某个地方,因为我没有被问到。所以在我的iPhone中,我去了设置/隐私/提醒,我可以看到我的应用程序,然后我将开关关闭,但是当我重新安装应用程序时,它向我发送了访问未被授予,什么是是的。
I tried killing the app and deleting it from my phones completely, but when I reinstall it, my answer yes is still stored somewhere because I don't get asked. So in my iPhones, I went to settings/privacy/reminders,I could see my app and I turned the switch to off, but then when I reinstall the app, it NSLogs me that "Access hasn't been granted", what is true.
如何删除设置/隐私/提醒,显示我的应用程序和开关ON / OFF的行?换句话说,我怎么能再次被问到?
提前致谢。
How can I delete in settings/privacy/reminders, the line showing my app and the switch ON/OFF, please ? In other words, how can I be asked again, please ? Thanks in advance.
只是一点点破解:
如果你想看到访问提醒对于开发过程中的不同访问(照片,提醒,推送等),您可以使用此黑客:
Just a little hack: If you want to see the Access Alert for different accesses (fotos, reminders, push and so on) during development, you can use this hack:
- 确保您的代码签名身份最后有一个星号(*),如下所示:
- 显着更改捆绑标识符:示例:
你的包标识符是:de.kurtsalman。 myAppName - >将其更改为 - > de.kurtsalman。 myAppName2345 (或任何其他)
- make sure your Code Signing Identity has a star (*) in the end, like this:
- Change your bundle Identifier significantly: Example: your bundle identifier is: de.kurtsalman.myAppName --> change it to --> de.kurtsalman.myAppName2345 (or any other)
每次更改(您必须在想要再次看到警报视图时随时更改)只需开始在设备上模拟(cmd + R) - 现在您每次都会收到警报。
on every change (you have to change it anytime you want to see the alert view again) just start simulating on device (cmd+R) - Now you will get everytime an alert.
如果它对你来说很愚蠢,总是要更改bundle-ID for测试时,您可以在构建阶段创建脚本,以便在测试设备上运行应用程序时重写捆绑包标识符。
If its to stupid for you, to change always the bundle-ID for testing, you can create a script in your build phases, to rewrite the bundle identifier for anytime you Run your App on your test device.