UIPasteboard security

徘徊边缘 提交于 2020-01-06 07:26:12

问题


I need to store information on application that always need to be read when open application. But I don't want user copy/dump/or edit it. So the question is : "Is UIPasteboard can solve this problem?" is it security? and if not, what else is suitable to use.

Thank you very much.

Edit: Is there have other solution that can solve "delete and reinstall application?"


回答1:


UIPasteboard can be overwritten at any time, and I wouldn't call it secure.

You might want to consider encrypting and serializing the data. Then when you need to access it, decrypt it and read it into memory.




回答2:


The use of pasteboard does not seem the right direction for your problem. You should more likely communicate with a server and use the method identifierForVendor from UIDevice.

But if you are sure a pasteboard is what you need, look at the concept of named pasteboards. In your context, the following method seems appropriate: + (UIPasteboard *)pasteboardWithUniqueName // An application pasteboard object with a unique name.

Note that by default, this kind of pasteboard exists only until the app is open. Look at the persistent property if you want to change this behavior.

Maybe (not tested), the system keeps it even if you delete / reinstall the app.



来源:https://stackoverflow.com/questions/10907849/uipasteboard-security

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