Uploaded image for project: 'Swift'
  1. Swift
  2. SR-2728

fileReferenceURL not working correctly

    XMLWordPrintable

    Details

      Description

      In Swift 3.0 (i.e. Xcode 8.0 or Xcode 8.1 beta 1), a call to fileReferenceURL does NOT give a file reference URL anymore... this code

      import Foundation
      let string = "file:///Users/admin"
      if let url = NSURL(string: string) {
          if let ref = url.fileReferenceURL() {
            print ("ref = \(ref)")
          }
      }
      

      prints

        ref = file:///Users/admin/

      while it should have been printing

        ref = file:///.file/id=6571367.437879/

      as it did, correctly, in Swift 2.2 (and before) in Xcode 7.3.1 for example.

        Attachments

        1. Workaround.pdf
          19 kB
          Frédéric Blondiau
        2. Workaround V2.pdf
          19 kB
          Frédéric Blondiau

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              fblondiau Frédéric Blondiau
            • Votes:
              4 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated: