In an app that has adopted App Sandbox, makes the resource pointed to by a security-scoped URL available to the app.
- iOS 8.0+
- macOS 10.7+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
- watchOS 2.0+
true if the request to access the resource succeeded; otherwise,
When you obtain a security-scoped URL, such as by resolving a security-scoped bookmark, you cannot immediately use the resource it points to. To make the resource available to your app, by way of adding its location to your app’s sandbox, call this method (or its Core Foundation equivalent, the
CFURLStart function) on the security-scoped URL.
If this method returns
true, then you must relinquish access as soon as you finish using the resource. Call the
stop method to relinquish access. When you call the
stop method, you immediately lose access to the resource in question.