Post

Replies

Boosts

Views

Activity

Reply to Initialization order of SwiftUI Application + @UIApplicationDelegateAdaptor
Don't overthink the architecture. You should not be using or depending on didSet. The documentation states then once an application delegate also conforms to the ObservableObject type it is automatically available to the entire SwiftUI Application because it places it into the Environment via the EnvironmentObject on your behalf. So move away from the swift didSet/willSet paradigm for property observations and move toward combine or publishers in the form of making the properties of interest into annotated @Published type. Then anywhere in your swiftUI code that needs access to some kind of data from the app delegate will automatically have it via the following pattern. @EnvironmentObject private var appDelegate: MyAppDelegate Read here: https://developer.apple.com/documentation/swiftui/uiapplicationdelegateadaptor
Topic: UI Frameworks SubTopic: UIKit Tags:
Mar ’22
Reply to Had this error for days now and I can't fix it
The following works without issue. struct ContentView: View {     enum ModelCategory: String, CaseIterable, Identifiable {         case one, two, three, four, five, six         var id: String {             self.rawValue         }     }     var body: some View {         VStack {             ForEach(ModelCategory.allCases, id: \.self) { value in                 Text(value.id)             }         }     } } But because you have introduced a member variable that is not initialized this is the error being raised. If you have a preview snippet, pass the showBrowse param into the ModelsByCategoryGrid(showBrowse: Binding.constant(false)) or give the showBrowse a default value.     @Binding var showBrowse: Bool
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’22
Reply to Apple ID sign in requested
Please go here for all retail support questions: https://discussions.apple.com/welcome
Topic: App & System Services SubTopic: Hardware Tags:
Replies
Boosts
Views
Activity
Feb ’22
Reply to How to constrain a tableView to safe area ?
I'm able to set the constraint via ctrl-drag - Xcode 13.2.1
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Feb ’22
Reply to What is this view that appears floating over the tableView ?
Probably a recycled view, separator, extended nav bar, ... are you able to recreate the same behaviour in another sample project?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Feb ’22
Reply to Monteray can’t be opened because Apple cannot check it for malicious software?
Are all certificates current?
Topic: Code Signing SubTopic: General Tags:
Replies
Boosts
Views
Activity
Feb ’22
Reply to ANS - Autonomic nervous system
This can be a starting point. Read: https://dl.acm.org/doi/fullHtml/10.1145/3453892.3462647 https://developer.apple.com/documentation/healthkit/data_types
Replies
Boosts
Views
Activity
Feb ’22
Reply to How do I measure/get a heartbeat at thousands of seconds from Apple Watch?
What is the API question?
Replies
Boosts
Views
Activity
Mar ’22
Reply to Enabling/disabling Package Dependencies on build or across schemes?
Just keep a branch for that client with their customizations.
Replies
Boosts
Views
Activity
Mar ’22
Reply to M1 Pro Mac USB Hub and External Hard-drive not Mounting
Wrong forum!
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Mar ’22
Reply to Flutter app not opening on Xcode(macOS) although working in Windows for android
Flutter is not an Apple product. All third party framework implementors shoud post all relevant questions to the respective support forums for those frameworks: Please goto https://github.com/flutter
Replies
Boosts
Views
Activity
Mar ’22
Reply to TextEditor Keyboard Avoidance not working
Submit a bug report!
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’22
Reply to How to generate a CSR for a Apple Distibution Cert using windows computer?
Google your question!
Replies
Boosts
Views
Activity
Mar ’22
Reply to Initialization order of SwiftUI Application + @UIApplicationDelegateAdaptor
Don't overthink the architecture. You should not be using or depending on didSet. The documentation states then once an application delegate also conforms to the ObservableObject type it is automatically available to the entire SwiftUI Application because it places it into the Environment via the EnvironmentObject on your behalf. So move away from the swift didSet/willSet paradigm for property observations and move toward combine or publishers in the form of making the properties of interest into annotated @Published type. Then anywhere in your swiftUI code that needs access to some kind of data from the app delegate will automatically have it via the following pattern. @EnvironmentObject private var appDelegate: MyAppDelegate Read here: https://developer.apple.com/documentation/swiftui/uiapplicationdelegateadaptor
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Mar ’22
Reply to Had this error for days now and I can't fix it
The following works without issue. struct ContentView: View {     enum ModelCategory: String, CaseIterable, Identifiable {         case one, two, three, four, five, six         var id: String {             self.rawValue         }     }     var body: some View {         VStack {             ForEach(ModelCategory.allCases, id: \.self) { value in                 Text(value.id)             }         }     } } But because you have introduced a member variable that is not initialized this is the error being raised. If you have a preview snippet, pass the showBrowse param into the ModelsByCategoryGrid(showBrowse: Binding.constant(false)) or give the showBrowse a default value.     @Binding var showBrowse: Bool
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Mar ’22
Reply to Decoding JSON
See the following Apple brief on Custom types and JSON: https://developer.apple.com/documentation/foundation/archives_and_serialization/using_json_with_custom_types
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Mar ’22
Reply to SwiftUI Video Player
none
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’22