Post

Replies

Boosts

Views

Activity

Build complications in SwiftUI: Complications built with SwiftUI are missing from the project
Hello! 👋🏼 I watched the Build complications in SwiftUI session yesterday and I wanted to take a look at the code - https://developer.apple.com/documentation/clockkit/creating_and_updating_complications as well. I downloaded the sample project and searched for the complications as well as views like History, I couldn't find anything. Are you planning to add those things to the project? Thank you, I absolutely loved the session.
5
0
1.3k
Jun ’20
Mock HealthKit Data for Unit Testing
Hello, I would love to ask how can I mock HealthKit data so I can write unit tests for my class. Any code examples or any information on the topic would be much appreciated. Thank you in advance. Here's is my HealthStore class. HealthStore.swift - https://developer.apple.com/forums/content/attachment/105787e7-0d39-4aaf-88ad-31e88c615953 P.s I couldn't post a code snippet because of the characters limit.
0
0
1.2k
Jun ’20
TabView: Page navigation doesn't work
Hello SwiftUI friends, any ideas what may be happening here? I can’t move past the first view. PageView navigation doesn’t work.Here’s what I’ve tried so far:1. Create a fresh project and test page nav (it worked) 2. Create a fresh project and test the same setup as my project (it worked) 3. Tried removing 1 view at a time to see if a specific view is problematic but no luck with that as well. Any thoughts? Here's my hosting controller code: import WatchKit import Foundation import SwiftUI class HostingController: WKHostingController<AnyView> {   var meditation = MeditationController()   override var body: AnyView {     return AnyView(       TabView {         ActivityView()         DurationView()           .environmentObject(meditation)         ListOfSessionsView()         SettingsView()       }       .tabViewStyle(PageTabViewStyle())     )   } }
2
0
1.3k
Jul ’20