An issue exists when a saved bookmark, for whatever reason, cannot be resolved to a secure URL. Because it cannot convey security privileges to the pertinent URL, it forces a re-authorization panel from the user. But because it remains held in the bookmarks array, it is assumed valid when consulted by -hasBookmarkForURL: and thus causes the newly created bookmark not to be saved to the bookmarks list.
I'm not sure what the variety of issues are that could cause the bookmark resolution to fail, but I suspect at least one of them was changing the bundle identifier for my host app. I think this caused all of my existing bookmarks to become invalid. Even though they possess the information about the URL in question, they no longer warrant the authority to access the resource. This is one example but there are surely others, so responding in some way to failure of bookmarks to resolve seems like a good call.
The user-facing consequence of this situation is that access to an affected resource has to be granted every single time the app is run.
I'm not sure this is the 100% right solution, but it seems preferable to the status quo: if when loading bookmarks from prefs, if a bookmark fails to resolve with security scope, then remove it from the list of bookmarks. This will force a new authorization from the user which will successfully replace the old version.
An issue exists when a saved bookmark, for whatever reason, cannot be resolved to a secure URL. Because it cannot convey security privileges to the pertinent URL, it forces a re-authorization panel from the user. But because it remains held in the bookmarks array, it is assumed valid when consulted by -hasBookmarkForURL: and thus causes the newly created bookmark not to be saved to the bookmarks list.
I'm not sure what the variety of issues are that could cause the bookmark resolution to fail, but I suspect at least one of them was changing the bundle identifier for my host app. I think this caused all of my existing bookmarks to become invalid. Even though they possess the information about the URL in question, they no longer warrant the authority to access the resource. This is one example but there are surely others, so responding in some way to failure of bookmarks to resolve seems like a good call.
The user-facing consequence of this situation is that access to an affected resource has to be granted every single time the app is run.
I'm not sure this is the 100% right solution, but it seems preferable to the status quo: if when loading bookmarks from prefs, if a bookmark fails to resolve with security scope, then remove it from the list of bookmarks. This will force a new authorization from the user which will successfully replace the old version.