我在 startAccessingSecurityScopedResource 之后调用了 coordinateAccessWithIntents。在 byAccessor 块中,我应该在原始 URL 或可能更新的 URL 上调用 stopAccessingSecurityScopedResource 吗?
例如...
NSFileAccessIntent *readingIntent = [NSFileAccessIntent readingIntentWithURL:myURL options:0];
[fileCoordinator coordinateAccessWithIntents:@[readingIntent] queue:queue byAccessor:^(NSError * _Nullable error) {
// stop the original url?
[myURL stopAccessingSecurityScopedResource];
// or the potentially updated url?
[readingIntent.URL stopAccessingSecurityScopedResource];
}];
我应该在哪个 URL 上调用 stopAccessingSecurityScopedResource?