Post

Replies

Boosts

Views

Activity

Reply to SwiftUI previews fail with a very simple SwiftPM package
Try wrapping the preview code in the following or something like below. #if arch(arm64) && os(macOS) || os(iOS) import SwiftUI struct Test: View { var body: some View { Text("Hello world") } } #Preview { Test() } #endif Read here: https://forums.swift.org/t/swift-package-is-built-as-a-universal-binary-in-main-project/54075 or replace preview macro with struct Test_Previews: PreviewProvider { static var previews: some View { Test() } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’24
Reply to Query with Predicate
The variable is being used before any initialization has taken place. selectedStagione can be replaced with a constant or static value. Then within the body of the code, a refetch of the data, using the modelContext.fetch() can be done in response to some kind of change. @Query(filter: #Predicate<CalendarioPartite> { $0.stagione == selectedStagione}) private var partite: [CalendarioPartite]
Topic: App & System Services SubTopic: iCloud Tags:
May ’24
Reply to Preview crashed because of a Fatal Error in ModelData.
Remove: @Bindable var modelData = modelData
Replies
Boosts
Views
Activity
May ’24
Reply to How do I resolve conflicts with SwiftData?
Read here: https://developer.apple.com/documentation/cloudkit/cksyncengine
Topic: App & System Services SubTopic: iCloud Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to SwiftUI previews fail with a very simple SwiftPM package
Try wrapping the preview code in the following or something like below. #if arch(arm64) && os(macOS) || os(iOS) import SwiftUI struct Test: View { var body: some View { Text("Hello world") } } #Preview { Test() } #endif Read here: https://forums.swift.org/t/swift-package-is-built-as-a-universal-binary-in-main-project/54075 or replace preview macro with struct Test_Previews: PreviewProvider { static var previews: some View { Test() } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to SwiftUI previews fail with a very simple SwiftPM package
Review the architecture value under build settings and double-check any Rosetta settings, such as the sim selected. Create a new project and compare the architecture settings between projects.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to Query with Predicate
The variable is being used before any initialization has taken place. selectedStagione can be replaced with a constant or static value. Then within the body of the code, a refetch of the data, using the modelContext.fetch() can be done in response to some kind of change. @Query(filter: #Predicate<CalendarioPartite> { $0.stagione == selectedStagione}) private var partite: [CalendarioPartite]
Topic: App & System Services SubTopic: iCloud Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to Autocomplete with SwiftData
https://developer.apple.com/documentation/swiftui/adding-a-search-interface-to-your-app
Topic: App & System Services SubTopic: iCloud Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to Apple map consultings price
There are no answers.
Replies
Boosts
Views
Activity
May ’24
Reply to How to conform Swift class to C++ header
Without making the assumption of the Application type the compiler is pretty much accurate in its message. https://www.swift.org/documentation/articles/wrapping-c-cpp-library-in-swift.html
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to @Query macro vs Query struct
No issues here. Is your StyleSheet type annotated with @Model?
Topic: App & System Services SubTopic: iCloud Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to ScrollView Bug
List and ScrollView are the same. Remove the scrollview and the list will accomplish the outcome.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’24
Reply to Should an App’s privacyInfo.xcprivacy File Include SDK Details?
Read the manual.
Topic: Privacy & Security SubTopic: General Tags:
Replies
Boosts
Views
Activity
Apr ’24
Reply to How to get realtime headphone levels in decibel unit
https://developer.apple.com/documentation/avfoundation/avcaptureaudiochannel https://developer.apple.com/documentation/avfoundation/avcaptureconnection
Topic: Media Technologies SubTopic: Audio Tags:
Replies
Boosts
Views
Activity
Apr ’24
Reply to SwiftUI ScrollView contentOffset / infinite scroll into leading side
Each object in your forEach can conform to Indentifiable. Let each object's id equals a degree on the tape. Assign each objects.id to the view that draws the stroke on the tape. Then using a scroll view proxy, you can use the proxy to scroll to a given id in the collection based on the sensor input.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’24
Reply to XCode 15 can't run on iOS 17 devices. Previous preparation error: An error occurred while communicating with a remote process.. The connection was invalidated.
It's about time Apple provides an uninstaller for Xcode that performs a clean uninstall or repair functionality - this is 2024
Replies
Boosts
Views
Activity
Apr ’24
Reply to watchOS log in console not working
Like Bob Marley Here, waiting in vain for a fix from Apple
Replies
Boosts
Views
Activity
Apr ’24