Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 624815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:14:29+00:00 2026-05-13T19:14:29+00:00

I am using the new NSURL bookmark data API introduced in OS X 10.6

  • 0

I am using the new NSURL bookmark data API introduced in OS X 10.6 to store an “alias” to a file system resource. When I use

+[NSURL URLByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:]

to resolve the bookmark data, I get nil if the file no longer exists. Since I am not passing NSURLBookmarkResolutionWithoutUI in the bookmark resolution options, I expected to get a dialog, like that shown by the Finder when you open an alias file that no longer resolves (i.e. a dialog to cancel, fix the alias, etc…).

Is there a way to have NSURL automatically prompt to reconnect/resolve the broken bookmark data?

The bookmark data is created via:

NSError *err
NSData *bookmarkData = [myFileURL bookmarkDataWithOptions:NSURLBookmarkCreationSuitableForBookmarkFile
                           includingResourceValuesForKeys:nil
                                            relativeToURL:nil
                                            error:&err];

though I get the same outcome if I use 0 for the options instead of NSURLBookmarkCreationSuitableForBookmarkFile.

I attempt to resolve the same bookmarkData via:

BOOL stale;
NSError *err
NSURL *resolvedURL = [NSURL URLByResolvingBookmarkData:self.bookmarkData
                                               options:0
                         relativeToURL:nil
                               bookmarkDataIsStale:&stale
                                                 error:&err];

Going through the dance of writing the bookmark data to a finder alias file and then resolving the URL by reading bookmark data from that file followed by the above method does not produce the desired UI result either (though opening the alias file in the Finder does produce the desired UI dialog).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T19:14:30+00:00Added an answer on May 13, 2026 at 7:14 pm

    No. The UI potentially involved in bookmark/alias resolution is that displayed if the target is on an unmounted fileserver which requires authentication to connect. The reconnection dialog is provided by the Finder in response to an unresolvable alias; if you want your application to have similar behavior, you will need to implement it yourself.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a question about using new[] . Imagine this: Object.SomeProperty = new[] {string1,
ADO.NET has the notorious DataRow class which you cannot instantiate using new. This is
What is the time complexity of dynamic memory allocation using new, malloc, etc.? I
I'm using the new ASP.Net ListView control to list database items that will be
I still very new using Subversion. Is it possible to have a working copy
I'm using the new CompositeScript feature that's available in the ASP.NET 3.5 SP1 for
What is the difference between using a new thread and using a thread from
Anyone getting this error when using the new free chart controls MS bought from
Is it possible to do a C like fork in java, using an new
I'm new to using the NetBeans IDE. When I try to look at the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.