File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ public final class ETDistribution: NSObject {
8888 return components. url
8989 }
9090
91- public func getReleaseInfo( releaseId: String , completion: @escaping ( @Sendable ( Result < DistributionReleaseInfo , Error > ) -> Void ) ) {
91+ public func getReleaseInfo( releaseId: String , completion: @escaping ( @MainActor ( Result < DistributionReleaseInfo , Error > ) -> Void ) ) {
9292 if let loginSettings = loginSettings,
9393 ( loginLevel? . rawValue ?? 0 ) > LoginLevel . none. rawValue {
9494 Auth . getAccessToken ( settings: loginSettings) { [ weak self] result in
@@ -110,7 +110,9 @@ public final class ETDistribution: NSObject {
110110 }
111111 return
112112 }
113- completion ( result)
113+ DispatchQueue . main. async {
114+ completion ( result)
115+ }
114116 }
115117 }
116118 }
@@ -208,7 +210,7 @@ public final class ETDistribution: NSObject {
208210
209211 private func getReleaseInfo( releaseId: String ,
210212 accessToken: String ? = nil ,
211- completion: @escaping @Sendable ( Result < DistributionReleaseInfo , Error > ) -> Void ) {
213+ completion: @escaping @MainActor ( Result < DistributionReleaseInfo , Error > ) -> Void ) {
212214 guard var components = URLComponents ( string: " https://api.emergetools.com/distribution/getRelease " ) else {
213215 fatalError ( " Invalid URL " )
214216 }
You can’t perform that action at this time.
0 commit comments