title: how to open an app from Mac from Xcode project (Cocoa App)
body: <p>Today I have created an <code>Cocoa Application</code> for the very first time . I want to create a simple App which will open an APP from my <code>Mac</code> , if the file not found it will show a <code>Link</code> in a <code>Label</code> to download the App. Here is my code below which I am struggling with .</p>
  
  <pre><code>  if let fileCheck = NSURL.fileURL(withPath: "/Applications/Mango.app") {
          if NSWorkspace.shared().open(fileCheck as URL) {
              print("url successfully opened")
          }
      } else {
        self.downloadLink.insertText("Invalid Path")
      }
  </code></pre>
  
  <p><strong>NSURL.fileURL(withPath: "/Applications/Mango.app")</strong> giving me <strong>Conditional Binding Must be Optional</strong> , I don't know how to fix that. <code>And I am struggling with how to show a link on my Label either.</code> Any kind hearted Dev please help. </p>