Cloudkit Can we modify data of public database

旧时模样 提交于 2019-12-02 00:27:56

问题


I have just gone through the cloud kit doc as in this link cloudkit but not getting clear about to modify database records for public database. As per this description in cloudkit framework.

Using Public Database, as specified in image by default data are world readable, owner writable. That means only owner can modify his data other user can only read? Suppose, using public database, user A can access records of user B, But can user A modify records of user B in same application.

Please suggest. Thanks.


回答1:


In the CloudKit dashboard you are able to change the access rights. So it would be possible to make records writable by others. You do have to be careful with this. When your app runs on a jailbroken device, then it's possible to execute methods with arbitrary arguments. This is a high security risk.




回答2:


if you set your security setting within the record types on the dashboard, you can have all your public records set to be writeable by anyone without messing with the security roles.

Set Authenticated to Write
Set Creator to create.

p.s. you cannot 'world' read from the simulator, you need to be logged in on that. On the device though, you don't need to be logged in to read the public database :-) which is nice.



来源:https://stackoverflow.com/questions/25600556/cloudkit-can-we-modify-data-of-public-database

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