Skip to content

Commit

Permalink
fixup! Sample app: make building in Xcode 11.7 possible
Browse files Browse the repository at this point in the history
  • Loading branch information
Bahadir Oncel committed Oct 14, 2020
1 parent 63e1bca commit f2b0892
Show file tree
Hide file tree
Showing 5 changed files with 425 additions and 423 deletions.
2 changes: 2 additions & 0 deletions .swiftformat
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

--exclude **/*_Vendor.swift

--ifdef no-indent

This comment has been minimized.

Copy link
@VojtaStavik

VojtaStavik Oct 14, 2020

Contributor

👍


# Rules inferred from Swift Standard Library:
--disable anyObjectProtocol, wrapMultilineStatementBraces
--indent 4
Expand Down
28 changes: 14 additions & 14 deletions Sample_v3/LoginViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -108,21 +108,21 @@ extension LoginViewController {
}
case swiftUICell:
#if swift(>=5.3)
if #available(iOS 14, *) {
// Ideally, we'd pass the `Client` instance as the environment object and create the list controller later.
UIView.transition(with: self.view.window!, duration: 0.5, options: .transitionFlipFromLeft, animations: {
self.view.window?.rootViewController = UIHostingController(
rootView:
NavigationView {
ChannelListView(channelList: channelListController.observableObject)
}
)
})
} else {
alert(title: "iOS 14 required", message: "You need iOS 14 to run this sample.")
}
if #available(iOS 14, *) {
// Ideally, we'd pass the `Client` instance as the environment object and create the list controller later.
UIView.transition(with: self.view.window!, duration: 0.5, options: .transitionFlipFromLeft, animations: {
self.view.window?.rootViewController = UIHostingController(
rootView:
NavigationView {
ChannelListView(channelList: channelListController.observableObject)
}
)
})
} else {
alert(title: "iOS 14 required", message: "You need iOS 14 to run this sample.")
}
#else
alert(title: "Swift 5.3 required", message: "The app needs to be compiled with Swift 5.3 or above.")
alert(title: "Swift 5.3 required", message: "The app needs to be compiled with Swift 5.3 or above.")
#endif
default:
return
Expand Down
Loading

0 comments on commit f2b0892

Please sign in to comment.