File tree Expand file tree Collapse file tree 1 file changed +9
-17
lines changed
docs/platforms/apple/guides/ios/build-distribution Expand file tree Collapse file tree 1 file changed +9
-17
lines changed Original file line number Diff line number Diff line change @@ -44,28 +44,20 @@ import SwiftUI
4444struct 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 {
You can’t perform that action at this time.
0 commit comments