Post

Replies

Boosts

Views

Activity

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 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 Central American NSTimeZone instances returning CST rather than permanently CDT
This is the world standard Central Daylight Time (CDT) is a North American time zone that is used from the second Sunday in March to the first Sunday in November during Daylight Saving Time (DST). Central Standard Time (CST) is used during the remainder of the year. System developers will eventually adapt since a sudden change will result in repercussions in various financial markets and platforms. File a bug with Apple via the feedback app.
Topic: App & System Services SubTopic: General Tags:
May ’24
Reply to "Unexpectedly found nil while unwrapping an Optional value" in URL
At what point does GlobalString().link goes from an empty string to a valid URL before being used. The pattern around the usage of GlobalString is also incorrect. @main struct WallTaker_for_macOSApp: App { @AppStorage("showMenuBarExtra") private var showMenuBarExtra = true @StateObject var globalString = GlobalString() var body: some Scene { WindowGroup { ContentView() .environmentObject(globalString) } } } Then change link from an empty string to a valid URL string to prevent the URL init from returning nil. Also change from url = URL(string: GlobalString().link) to url = URL(string: globalString.link) from .task { await Wallpaper().fetchLink() } to something like .task { let wallpaper = Wallpaper() wallpaper.url = URL(globalString.link) await wallpaper.fetchLink() }
Topic: Programming Languages SubTopic: Swift 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:
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 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 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 Preview crashed because of a Fatal Error in ModelData.
Remove: @Bindable var modelData = modelData
Replies
Boosts
Views
Activity
May ’24
Reply to Preview crashed because of a Fatal Error in ModelData.
There is no correlation between modelData and var sutra, so whatever you're trying to do will not work.
Replies
Boosts
Views
Activity
May ’24
Reply to Removed due to Guideline 4.3(a) - Design - Spam
Back to the drawing board - app scans are pretty much accurate.
Replies
Boosts
Views
Activity
May ’24
Reply to Central American NSTimeZone instances returning CST rather than permanently CDT
This is the world standard Central Daylight Time (CDT) is a North American time zone that is used from the second Sunday in March to the first Sunday in November during Daylight Saving Time (DST). Central Standard Time (CST) is used during the remainder of the year. System developers will eventually adapt since a sudden change will result in repercussions in various financial markets and platforms. File a bug with Apple via the feedback app.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to CloudKit + CloudSave for Unity not building in Xcode
Report the bug to the Unity Development team on the Unity forums.
Topic: App & System Services SubTopic: iCloud Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to Increase in app crashes on iOS 17.4
The best thing to do will be to reach out to the team @ Capacitor and file a bug with them.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to Swift: Declaration name is not covered by macro
Is ServiceDependent implemented? Apply the macro directly to the struct or class and not the extension. What happens when this is done?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to "Unexpectedly found nil while unwrapping an Optional value" in URL
At what point does GlobalString().link goes from an empty string to a valid URL before being used. The pattern around the usage of GlobalString is also incorrect. @main struct WallTaker_for_macOSApp: App { @AppStorage("showMenuBarExtra") private var showMenuBarExtra = true @StateObject var globalString = GlobalString() var body: some Scene { WindowGroup { ContentView() .environmentObject(globalString) } } } Then change link from an empty string to a valid URL string to prevent the URL init from returning nil. Also change from url = URL(string: GlobalString().link) to url = URL(string: globalString.link) from .task { await Wallpaper().fetchLink() } to something like .task { let wallpaper = Wallpaper() wallpaper.url = URL(globalString.link) await wallpaper.fetchLink() }
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to Why is it not possible to provide a free trial for paid apps?
Because it's either, free, freemium, or paid without crippleware.
Replies
Boosts
Views
Activity
May ’24
Reply to Timeline Apple legal name dispute
You're not going to get an answer here from 3rd party developers; contact Apple directly.
Replies
Boosts
Views
Activity
May ’24
Reply to VoiceOver spells word letter by letter
Break up or hyphenate simplygo to simply go and see what happens. Simplygo is basically instructing the user to perform an action, which happens to be - T A B.
Replies
Boosts
Views
Activity
May ’24