title: Reading currently playing track in macOS using ScriptingBridge not working
body: <p>I am trying to read the currently playing track of iTunes using ScriptingBridge.
  I found a couple of other threads here but no one seems to be working for me (macOS Mojave and iTunes 12.9.4).</p>
  
  <p>I have created the iTunes.h file using the following command:</p>
  
  <pre><code>sdef /Applications/iTunes.app | sdp -fh --basename "iTunes" 
  </code></pre>
  
  <p>I am creating an instance of the Scripting Bridge as follows:</p>
  
  <pre><code>if let itunes: AnyObject = SBApplication(bundleIdentifier: "com.apple.iTunes")
  {
    if itunes.isRunning
    {
      Swift.print("iTunes is running...")
    }
  
    Swift.print(itunes.currentTrack?.name)
    Swift.print(itunes.currentTrack?.album)
  }
  </code></pre>
  
  <p>The code compiles fine. When I run the code, I get the following output:</p>
  
  <pre><code>iTunes is running...
  nil
  nil
  </code></pre>
  
  <p>The currentTrack is nil, but iTunes is playing a song. What am I missing here? I already tried disabling the sandbox, but to no avail. I am using macOS Mojave, Xcode 10.2 and iTunes 12.9.4.
  Also, when iTunes is not running, it will be started? Why?</p>
  
  <p>Would there be another way to get the currently playing song of iTunes?</p>