UIImagePickerController没有问权限?

时间:2016-05-03 19:31:39

标签: ios uiimagepickercontroller

我在我们的应用程序中使用了UIImagePickerController但是第一次没有出现权限警报。有解决方案吗     在此先感谢。

2 个答案:

答案 0 :(得分:1)

iOS缓存用户对权限请求的响应,即使您删除并重新安装应用程序,该缓存仍将保留。如果你在模拟器中,懒惰的解决方案是重置模拟器。在设备上,如果未显示您的权限提醒,我会怀疑您的手机已经在您的应用设置中设置了隐私条目。

答案 1 :(得分:1)

如果您的代码是正确的,那么此解决方案将适合您。

1.Uninstall the app from the device.
2.Restart the device.
3.After restarting change the date to next day in date and time settings.
4.Then again restart the device.
5.Now run the app.You can see the permission alert.

这个解决方案对我有用。如果它对你有帮助,请告诉我。

相关问题