File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99import Foundation
1010import AppCenter
1111import AppCenterCrashes
12+ #if !os(macOS)
1213import AppCenterDistribute
14+ #endif
1315import SMFLogger
1416
1517
@@ -56,13 +58,18 @@ class AppCenterSDK: NSObject {
5658
5759 self . delegate = AppCenterSDKDelegate ( isLogUploadEnabled: configuration. isLogUploadEnabled)
5860
61+ #if !os(macOS)
5962 let services = ( configuration. isDistributionEnabled == true ) ? [ MSCrashes . self, MSDistribute . self] : [ MSCrashes . self]
63+ #else
64+ let services = [ MSCrashes . self]
65+ #endif
6066
6167 MSAppCenter . start ( configuration. appSecret, withServices: services)
6268 MSCrashes . setEnabled ( configuration. isCrashReportEnabled)
6369 MSCrashes . setDelegate ( self . delegate)
6470 }
6571
72+ #if !os(macOS)
6673 /// Returns True, if and only if the Service got started and is enabled.
6774 static var isDistributionEnabled : Bool {
6875 return MSDistribute . isEnabled ( )
@@ -81,6 +88,7 @@ class AppCenterSDK: NSObject {
8188 static func enableDistribution( enabled: Bool = true ) {
8289 MSDistribute . setEnabled ( enabled)
8390 }
91+ #endif
8492
8593 /// Returns True, if and only if Crash Reporting is enabled.
8694 static var isCrashReportingEnabled : Bool {
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments