title: How to get Firewall Status in Swift on Mac OS?
body: <p>I spent two days to get firewall status of mac os in swift.
  I did some research and googled. So I knew to read globalstate key of com.apple.alf.plist.
  I could find the code in objective-c
  <a href="https://stackoverflow.com/questions/4699349/objective-c-check-firewall-status-in-osx">Objective-C: Check Firewall status in OSX?</a>
  But it does not work.
  I tried to read com.apple.alf.plist in swift as below.</p>
  
  <pre><code>let path = "/Library/Preferences/com.apple.alf.plist"
  let _dictionary = NSDictionary(contentsOfFile: path)
  </code></pre>
  
  <p>But _dictionary is nil.</p>
  
  <p>My MacOS is Mojave 10.14.6 and Swift is 5.</p>
  
  <p>I will appreciate any solution.</p>