Page Menu
Home
Musing Studio
Search
Configure Global Search
Log In
Files
F14172137
AppDelegate.swift
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
AppDelegate.swift
View Options
import
Cocoa
import
Sparkle
class
AppDelegate
:
NSObject
,
NSApplicationDelegate
{
func
applicationWillFinishLaunching
(
_
notification
:
Notification
)
{
// Check UserDefaults for values; if the key doesn't exist (e.g., if MacUpdatesView hasn't ever been shown),
// bool(forKey:) returns false, so set SUUpdater.shared() appropriately.
let
automaticallyChecksForUpdates
=
UserDefaults
.
standard
.
bool
(
forKey
:
"automaticallyChecksForUpdates"
)
let
subscribeToBetaUpdates
=
UserDefaults
.
standard
.
bool
(
forKey
:
"subscribeToBetaUpdates"
)
// Set Sparkle properties.
SUUpdater
.
shared
()?.
automaticallyChecksForUpdates
=
automaticallyChecksForUpdates
if
subscribeToBetaUpdates
{
SUUpdater
.
shared
()?.
feedURL
=
URL
(
string
:
AppcastFeedUrl
.
beta
.
rawValue
)
}
else
{
SUUpdater
.
shared
()?.
feedURL
=
URL
(
string
:
AppcastFeedUrl
.
release
.
rawValue
)
}
// If enabled, check for updates.
if
automaticallyChecksForUpdates
{
SUUpdater
.
shared
()?.
checkForUpdatesInBackground
()
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Thu, Apr 2, 2:49 AM (1 d, 13 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3673083
Attached To
rWFSUI WriteFreely SwiftUI
Event Timeline
Log In to Comment