Core Location not requesting user permission

大兔子大兔子 提交于 2019-11-29 15:22:17

问题


An application I was testing asked for user location on first device launch. I have uninstalled the application, deleted the build folder, and cleaned all targets, but core location never requests permission again. It is just off and must be enabled in the users settings. Any idea why the users choice would remain persistent even after the application was uninstalled? Very weird behavior, worried it may get me rejected for the store.


回答1:


Not many people know this, but after you uninstall an application, that application's documents and preferences are still stored on the device, here:

/var/mobile/Library/Safe Harbor/myappidentifier/Container/

in my opinion, this was not a wise move by apple, as that could have security risks, as the one you have explained above.

If an app is re-installed, iOS automatically copies those preferences back into the appropriate folder. That is the cause of the behavior you are seeing.



来源:https://stackoverflow.com/questions/6098301/core-location-not-requesting-user-permission

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!