I ran into the same issue as well. The following has worked well for me, though not necessarily ideal:
Set a variable equal to your @State variable in the body, but before the return, then read from that variable within .sheet.
Works in Xcode 12.0 both in the canvas preview, and on a physical device running iOS 14.0.
struct SwiftUIView: View {
@State var showSheet = false
@State var sheetType: SignInSheetType = .none
var body: some View {
let localSheetType: SignInSheetType = self.sheetType
return
Button(action: {
self.showSheet = true
self.sheetType = .generalHelp
}) {
Text("Hello, World!")
}
.sheet(isPresented: self.$showSheet) {
if localSheetType == .generalHelp {
SafariView(url: URL(string: "\(urlHere)")!)
}
else if localSheetType == .invite {
SafariView(url: URL(string: "\(url2Here)")!)
}
}
}
}
Post
Replies
Boosts
Views
Activity
I've been looking all over for this, and finally discovered a setting in App Store Connect --> Xcode Cloud --> Settings --> Build Number. Not sure if there's a way to set this with an outside process, but you can at least set a starting number and it should auto increment.
App Store Connect --> Xcode Cloud --> Settings --> Build Number. You'll at least be able to set the next build number, and it should auto increment after that. I haven't found a way to pull from CFBundleVersion explicitly yet though.