Skip to content

Commit 1f5179e

Browse files
committed
PR feedback
1 parent ed600f4 commit 1f5179e

File tree

1 file changed

+9
-17
lines changed

1 file changed

+9
-17
lines changed

docs/platforms/apple/guides/ios/build-distribution/auto-update.mdx

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -44,28 +44,20 @@ import SwiftUI
4444
struct MyView: View {
4545
var body: some View {
4646
Button("Check For Update") {
47-
UpdateUtil.checkForUpdates()
48-
}
49-
}
50-
}
51-
52-
enum UpdateUtil {
53-
static func checkForUpdates() {
54-
let params = CheckForUpdateParams(
55-
accessToken: "MY_TOKEN",
56-
organization: "MY_ORGANIZATION",
57-
project: "MY_PROJECT")
58-
Updater.checkForUpdate(params: params) { result in
59-
handleUpdateResult(result: result)
47+
let params = CheckForUpdateParams(
48+
accessToken: "MY_TOKEN",
49+
organization: "___ORG_SLUG___",
50+
project: "___PROJECT_SLUG___")
51+
Updater.checkForUpdate(params: params) { result in
52+
handleUpdateResult(result: result)
53+
}
6054
}
6155
}
6256

6357
static func handleUpdateResult(result: Result<UpdateCheckResponse, Error>) {
6458
guard case let .success(releaseInfo) = result else {
65-
if case let .failure(error) = result {
66-
print("Error checking for update: \(error)")
67-
}
68-
return
59+
// Handle error
60+
return
6961
}
7062

7163
guard let releaseInfo = releaseInfo.update else {

0 commit comments

Comments
 (0)