Where to get help with XCode12 beta and swift UI?

By Greg Wocher, 20 July, 2020

Forum
Apple Beta Releases

Hello all,
I am getting a bit frustrated trying to find help with Xcode 12 beta and swift UI. I wanted to try learning these since the new Xcode beta has made improvements in accessibility. I am having issues but I don't know where to go to get help. I tried looking at the documentation but it is not helping. I tried to get into the developer forums to ask questions but I just kept going round and round trying to register to be able to ask a question. Right now I am trying to follow the 100 days of swift UI to learn coding in swift for iOS. The issuee is that it tells you to create a new project and select the iOS single view app template. There is no single view app that I can find in the template chooser in Xcode 12 beta. I don't know if this is a bug with Xcode, a bug with VoiceOver or if this option is just now gone. I have tried googling for this but I cannot find any answers. Please Help? :)

Thanks,
Greg Wocher

Options

Your Feedback is Important to Improving Accessibility on Apple platforms

Don't assume that Apple is aware of a bug or that your report won't make a difference - submitting bug reports directly to the company helps them reproduce and resolve the issue faster. Your report may provide crucial information. The more reports they receive, the higher the priority they give to fixing the bug.

If you're using a beta version, use the Feedback Assistant on your device to submit feedback and bug reports. If you're using a public release, follow the instructions on this page.

Comments

By Devin Prater on Friday, July 24, 2020 - 13:24

There is no beginner help with this. You'll have to wait for it to be released in order to get help with this.

By Kyle on Friday, July 24, 2020 - 13:24

I believe the tutorials haven't been 100% updated for the new Xcode 12 beta and new changes to swift UI. I picked multiplatform App and it works fine. Your login to the dev forums is your appleID.

By Kyle on Friday, July 24, 2020 - 13:24

A note to anyone using the 100 days of SwiftUI program, when you start building apps and you get into pickers, you need to add some accessibility(value:) attributes for VoiceOver to see the new selection that is made.

struct ContentView: View {
let colors: [String] = ["Red", "Blue", "Green"]
@State private var colorsIndex: Int = 0

var body: some View {
NavigationView {
Form {
Picker("Choose a color: ", selection: $colorsIndex) {
ForEach(0 ..< colors.count) {
Text("\(colors[$0])")
}
} .accessibility(value: Text("\(colors[colorsIndex])")) // This is the important line
} .navigationTitle("Test to show accessibility on pickers")
}
}
}

By Greg Wocher on Friday, July 24, 2020 - 13:24

Hello,
Thanks for this. Right now I am on day 16 of the 100 days of swiftUI. I am working on the WeSplit app. this will come in handy when I get to the color app.

Greg Wocher

By Kyle on Friday, July 24, 2020 - 13:24

You will need to use the code I provided for We Split and the conversion app. there is no color app. that was just something I whipped up to show what you needed to add.

By Zachary on Friday, July 24, 2020 - 13:24

I'm very interested in learning to code. Do I need Xcode 12 in order to complete this course successfully, or can I at least get started with Xcode 11?

By Greg Wocher on Friday, July 24, 2020 - 13:24

Hello,
I keep getting an error when I try and add the .accessibility line to the picker in the WeSplit app in the tutorial. Here is my code:
struct ContentView: View {
//Variables for our text fields
@State private var checkAmount = ""
@State private var numberOfPeople = 2
@State private var tipPercentage = 2
let tipPercentages = [10, 15, 20, 25, 0]

var body: some View {
NavigationView {
Form {
Section {
TextField("Amount", text: $checkAmount)
.keyboardType(.decimalPad)

// Start of picker
Picker("Number of People", selection: $numberOfPeople) {
ForEach(2 ..< 100) {
Text("\($0) people")
}// end of foreach loop
} //.accessibility(value: Text("\([numberOfPeople])"))
} //end of CA section
Section {
Text("$\(checkAmount)")
} //end of text CA section
} //end of form
}
} //end of some view
} //end of struct

Greg Wocher

Hello,
XCOde 12 is not required to do this tutorial. You can use Xcode 11 just fine. I am just testing Xcode 12 because it is suppose to have some accessibility fixes and new features in it.

Greg Wocher

By Kyle on Friday, July 24, 2020 - 13:24

Greg, remove the [] from around the numberOfPeople variable and it should work.
Also, in the comments to mark up the end of your code blocks you noted that at the end of the body property you said end of some view. some view is the return type. body is the name of the property.

Hello,
Thank you. Removing the [] from the numberOfPeople variable worked. The live preview is sort of accessible now in XCode12. There are some issues that I need to report as soon as I find out how. LOL.

Greg Wocher

By Devin Prater on Friday, July 24, 2020 - 13:24

11 should work, just the playgrounds sidebar isn't accessible. The rest should be okay at least.