Bookmarks and network remounting

In my sandboxed app, if a bookmarked network source is unavailable, is resolving the source/root security-scoped bookmark the recommended way to way to trigger a remount of the network volume?

Thanks!

Answered by DTS Engineer in 891088022

In my sandboxed app, if a bookmarked network source is unavailable, is resolving the source/root security-scoped bookmark the recommended way to trigger a remount of the network volume?

Yes, that's generally the best option. It's obviously not guaranteed to work, given all of the possible failure cases, but it covers the largest number of edge cases with the least amount of work.

The other alternative would be to use the NetFS framework to directly mount the volume; however, I think that really only makes sense if/when your app is designed around that approach.

Are you having problems with bookmark mount resolution?

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

Accepted Answer

In my sandboxed app, if a bookmarked network source is unavailable, is resolving the source/root security-scoped bookmark the recommended way to trigger a remount of the network volume?

Yes, that's generally the best option. It's obviously not guaranteed to work, given all of the possible failure cases, but it covers the largest number of edge cases with the least amount of work.

The other alternative would be to use the NetFS framework to directly mount the volume; however, I think that really only makes sense if/when your app is designed around that approach.

Are you having problems with bookmark mount resolution?

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

Thanks. Resolving the security-scoped bookmark works for triggering the mount, so I mainly wanted to confirm this was the recommended approach.

The only issue I encountered was that I had to resolve the bookmark on a detached task as it was blocking while the network volume mounts.

Bookmarks and network remounting
 
 
Q