title: How to detect if mac os is up to date or outdated programmatically?
body: <p>Now I am working on mac osx app development.
  I need to check if os is up to date or outdated programmatically.
  I can see it via Software Update of System Preferences.
  There are a lot of solutions to get current mac os version. But I am not interested in version. Only interested in if os is the latest one or old one.</p>
  
  <p><a href="https://i.stack.imgur.com/1W1DM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1W1DM.png" alt="enter image description here"></a></p>
  
  <p>But I want to know it in my app programmatically.
  swift code or objective-c code is fine.</p>