Post

Replies

Boosts

Views

Activity

Scroll in UI Tests on Apple Watch not working
I've been able to get UI Tests working on Apple Watch with Xcode 12.5 / Watch OS 7.0 on the simulator (with the help of some Apple engineers during a WWDC session). I can automatically press buttons and check for text on the screen, which is great. What I cannot do however, is scroll the screen up or down, which severely limits the ability to reach some buttons and thus the testing. I'm using XCUIApplication().swipeUp() to try to scroll. What's also not working is the record/playback of UI tests on Apple Watch. Has anyone been able to achieve a scroll up/down in UI tests on Apple Watch, and if so, how?
2
0
1.6k
Jun ’21
SwiftUI crash when using wheel style Picker in form in form
I'm using a wheel style picker in a form that I navigate to using a NavigationLink. When I rotate the wheel, the app crashes. If I remove the form in SubForm, the crash disappears, but then the looks are completely different. I'd like the looks of the form, but obviously I don't want the crash. Any suggestions? (iOS15 in a simulator using Xcode 13) struct SubForm: View { @State private var selection = 1 var body: some View { Form { Section(header: Text("Another title")) { Picker("Pick me", selection: $selection) { Text("First item").tag(0) Text("Second item").tag(1) }.pickerStyle(.wheel) } } } } struct ContentView: View { var body: some View { NavigationView { Form { Section(header: Text("A title")) { NavigationLink("Subview", destination: { SubForm() }) } } } } }
2
1
1.5k
Sep ’21