RVS_MediaServer_AppDelegate

@NSApplicationMain
class RVS_MediaServer_AppDelegate : NSObject, NSApplicationDelegate

This class implements the main application delegate.

It has a couple of class methods and calculated properties that you can use to get a context.

  • This just holds the view controllers that request updates.

    Declaration

    Swift

    private var _notifierClients: [RVS_MediaServer_AppDelegateNotifier?]
  • This holds an observer for our prefs. We need to keep it around in order to remain active.

    Declaration

    Swift

    private var _prefsObserver: NSKeyValueObservation!
  • This is a quick way to get this object instance (it’s a SINGLETON), cast as the correct class.

    Declaration

    Swift

    class var appDelegateObject: RVS_MediaServer_AppDelegate { get }

    Return Value

    the app delegate object, in its natural environment.

  • Accessor for the prefs state (READ ONLY).

    make it dynamic, so that we could attach observers.

    Declaration

    Swift

    @objc
    dynamic var prefs: RVS_MediaServer_PersistentPrefs { get }
  • This displays a simple alert, with an OK button.

    Declaration

    Swift

    class func displayAlert(header inHeader: String, message inMessage: String = "")

    Parameters

    header

    The header to display at the top.

    message

    A String, containing whatever messge is to be displayed below the header.

  • Called after the application has completed its launch preparations and allocations.

    Declaration

    Swift

    func applicationDidFinishLaunching(_ inNotification: Notification)

    Parameters

    inNotification

    The notification that accompanied the application launch.