@@ -41,7 +41,7 @@ class AppCenterSDK: NSObject {
4141 // MARK: - Public properties
4242
4343 static var wasInitialized : Bool {
44- return MSAppCenter . isConfigured ( )
44+ return AppCenter . isConfigured
4545 }
4646
4747 // MARK: - Methods
@@ -62,27 +62,27 @@ class AppCenterSDK: NSObject {
6262
6363 #if !os(macOS)
6464 if ( configuration. isDistributionEnabled == true ) {
65- services. append ( MSDistribute . self)
65+ services. append ( Distribute . self)
6666 }
6767 #endif
6868
6969 if ( configuration. isCrashReportEnabled == true ) {
70- services. append ( MSCrashes . self)
70+ services. append ( Crashes . self)
7171 }
7272
7373 guard ( services. isEmpty == false ) else {
7474 return
7575 }
7676
77- MSAppCenter . start ( configuration. appSecret, withServices : services)
78- MSCrashes . setEnabled ( configuration. isCrashReportEnabled)
79- MSCrashes . setDelegate ( self . delegate)
77+ AppCenter . start ( withAppSecret : configuration. appSecret, services : services)
78+ Crashes . enabled = configuration. isCrashReportEnabled
79+ Crashes . delegate = self . delegate
8080 }
8181
8282 #if !os(macOS)
8383 /// Returns True, if and only if the Service got started and is enabled.
8484 static var isDistributionEnabled : Bool {
85- return MSDistribute . isEnabled ( )
85+ return Distribute . enabled
8686 }
8787
8888 /// Will enable or disable the Distribution Feature of AppCenter
@@ -96,13 +96,13 @@ class AppCenterSDK: NSObject {
9696 ///
9797 /// - Parameter enabled: Enable or Disable Distribtion
9898 static func enableDistribution( enabled: Bool = true ) {
99- MSDistribute . setEnabled ( enabled)
99+ Distribute . enabled = enabled
100100 }
101101 #endif
102102
103103 /// Returns True, if and only if Crash Reporting is enabled.
104104 static var isCrashReportingEnabled : Bool {
105- return MSCrashes . isEnabled ( )
105+ return Crashes . enabled
106106 }
107107
108108 /// Will enable or disable the sending od crash reports to AppCenter
@@ -116,13 +116,13 @@ class AppCenterSDK: NSObject {
116116 ///
117117 /// - Parameter enabled: Enable or Disable Distribtion
118118 static func enableCrashReporting( enabled: Bool = true ) {
119- MSCrashes . setEnabled ( enabled)
119+ Crashes . enabled = enabled
120120 }
121121
122122 /// This will create a `fatalError` to crash the app.
123123 static func performTestCrash( ) {
124124
125- MSCrashes . generateTestCrash ( )
125+ Crashes . generateTestCrash ( )
126126 }
127127}
128128
@@ -172,20 +172,20 @@ extension AppCenterSDK {
172172 }
173173}
174174
175- private class AppCenterSDKDelegate : NSObject , MSCrashesDelegate {
175+ private class AppCenterSDKDelegate : NSObject , CrashesDelegate {
176176
177177 private var isLogUploadEnabled : Bool
178178
179179 init ( isLogUploadEnabled : Bool ) {
180180 self . isLogUploadEnabled = isLogUploadEnabled
181181 }
182182
183- func attachments( with crashes: MSCrashes ! , for errorReport: MSErrorReport ! ) -> [ MSErrorAttachmentLog ] ! {
183+ func attachments( with crashes: Crashes , for errorReport: ErrorReport ) -> [ ErrorAttachmentLog ] ? {
184184 guard ( self . isLogUploadEnabled == true ) else {
185185 return [ ]
186186 }
187187
188- return [ MSErrorAttachmentLog . attachment ( withText: self . applicationLog, filename: AppCenterConstants . crashLogFileName) ]
188+ return [ ErrorAttachmentLog . attachment ( withText: self . applicationLog, filename: AppCenterConstants . crashLogFileName) ]
189189 }
190190
191191 private var applicationLog : String {
0 commit comments