title: Why does my file URL (with relative path) fail even when using stringByExpandingTildeInPath:?
body: <p>I'm trying to create a valid file URL which points to a file which I know exists.</p>
  
  <pre><code>NSURL* fileURL = [NSURL fileURLWithPath:[@"~/Users/zak/global.scss" 
  stringByExpandingTildeInPath] isDirectory:NO];
  NSLog(@"Looks like you want me to open a %@ file!", fileURL.pathExtension);
  
  NSError *err;
  if (![fileURL checkResourceIsReachableAndReturnError:&amp;err]) {
      NSLog(@"%@", err);
  }
  else {
      NSLog(@"success!!!");
  };
  </code></pre>
  
  <p>which always causes the compiler to keep telling me</p>
  
  <pre><code>Error Domain=NSCocoaErrorDomain Code=260 "The file “global.scss” couldn’t be 
  opened because there is no such file." UserInfo=0x1021937a0 {NSURL=file://
  localhost/~/Users/zak/global.scss, 
  NSFilePath=/~/Users/zak/global.scss, 
  NSUnderlyingError=0x10212f4b0 "The operation couldn’t be completed.
  No such file or directory"}
  </code></pre>
  
  <p>Why doesn't this work? Do I need to use some sort of constant as the base URL?</p>