Post

Replies

Boosts

Views

Activity

Reply to Siri not calling AppIntents
Hi @HelloBlaine , I have the same issue. But how can I then pass parameters immediately if the $question is not allowed? Also the sample code from the AcceleratingAppInteractionsWithAppIntents example project shows exactly that this is the way to go. static var appShortcuts: [AppShortcut] { /** Records activity on a trail, such as hiking. On Apple Watch, `StartTrailActivity` creates a workout session. Use the `$workoutStyle` parameter from the intent to allow people to ask the app to start tracking an activity by the activity name. The system creates an App Shortcut for each possible value in the `ActivityStyle` enumeration. The complete set of generated App Shortcuts for this intent are visible in the Shortcuts app, or by following the `ShortcutsLink` at the bottom of `SidebarColumn`. */ AppShortcut(intent: StartTrailActivity(), phrases: [ "Track my \(\.$workoutStyle) in \(.applicationName)", "Start tracking my \(\.$workoutStyle) with \(.applicationName)", "Start a workout in \(.applicationName)", "Start a \(.applicationName) workout" ], shortTitle: "Start Activity", systemImageName: "shoeprints.fill") [....]
Topic: Machine Learning & AI SubTopic: General Tags:
Jul ’24
Reply to Swift compiler crashes with simple SwiftData model
Hi all, Same issue here. It was crashing on beta 6 and I waited for the beta 7, but still the same issue is happening. Don't know if it helps the following stack trace. I tried to delete the line shown and by removing it, it compiles, but, well, I can't use Swift Data! Any updates on this? Apple Swift version 5.9 (swiftlang-5.9.0.128.106 clang-1500.0.40.1) 2. Compiling with the current language version 3. While evaluating request TypeCheckSourceFileRequest(source_file "/Users/andreaciani/Developer/Xcode-Projects/RLScoreTracker/RLScoreTracker/Views/PackageView/PackageListViewModel.swift") 4. While evaluating request TypeCheckFunctionBodyRequest(Counterby.(file).PackageListView extension.ViewModel.createNewPackage(in:)@/Users/andreaciani/Developer/Xcode-Projects/RLScoreTracker/RLScoreTracker/Views/PackageView/PackageListViewModel.swift:31:14) 5. While type-checking statement at [/Users/andreaciani/Developer/Xcode-Projects/RLScoreTracker/RLScoreTracker/Views/PackageView/PackageListViewModel.swift:31:57 - line:36:9] RangeText="{ let package = Persistency.SWDPackage(name: "", timestamp: Date(), items: [], goal: 0.0) // let package = SWDPackage(name: newPackageName, timestamp: Date(), items: [], goal: 0) // context.insert(package) // self.newPackageName = "" " 6. While type-checking declaration 0x14485abe0 (at /Users/andreaciani/Developer/Xcode-Projects/RLScoreTracker/RLScoreTracker/Views/PackageView/PackageListViewModel.swift:32:13) 7. While evaluating request PatternBindingEntryRequest((unknown decl), 0, 0) 8. While type-checking expression at [/Users/andreaciani/Developer/Xcode-Projects/RLScoreTracker/RLScoreTracker/Views/PackageView/PackageListViewModel.swift:32:27 - line:32:99] RangeText="Persistency.SWDPackage(name: "", timestamp: Date(), items: [], goal: 0.0" 9. While type-checking-target starting at /Users/andreaciani/Developer/Xcode-Projects/RLScoreTracker/RLScoreTracker/Views/PackageView/PackageListViewModel.swift:32:39 10. While reading from module 'Persistency', builder version '5.9(5.9)/Apple Swift version 5.9 (swiftlang-5.9.0.128.106 clang-1500.0.40.1)', built from source, non-resilient, loaded from '/Users/andreaciani/Library/Developer/Xcode/DerivedData/RLScoreTracker-hahiewpmlftmcygiutlddbpypydu/Build/Products/Debug/Persistency.swiftmodule/arm64-apple-macos.swiftmodule' 11. While finishing conformance for protocol conformance to 'PersistentModel' (in module 'SwiftData') for type 'SWDPackage' 12. *** DESERIALIZATION FAILURE *** *** If any module named here was modified in the SDK, please delete the *** *** new swiftmodule files from the SDK and keep only swiftinterfaces. *** module 'Persistency', builder version '5.9(5.9)/Apple Swift version 5.9 (swiftlang-5.9.0.128.106 clang-1500.0.40.1)', built from source, non-resilient, loaded from '/Users/andreaciani/Library/Developer/Xcode/DerivedData/RLScoreTracker-hahiewpmlftmcygiutlddbpypydu/Build/Products/Debug/Persistency.swiftmodule/arm64-apple-macos.swiftmodule' serialized conformances do not match requirement signature
Aug ’23
Reply to Pass @Query filter predicate from parent view in SwiftData
Hi @BabyJ , thanks for your help. SWDPackge is as simple as this: @Model final public class SWDPackage { public var name: String? public var timestamp: Date = Date() public var publicID = UUID() public init(name: String? = nil, timestamp: Date, items: [SWDItem] = []) { self.name = name self.timestamp = timestamp self.items = items } @Relationship(.cascade, inverse: \SWDItem.package) public var items: [SWDItem]? } while for the SWDItem is the following @Model final public class SWDItem { public var timestamp: Date = Date() public var name: String? @Attribute(.unique) public var publicID = UUID() public var value: Double = 0.0 public init(timestamp: Date, value: Double, package: SWDPackage) { self.timestamp = timestamp self.value = value self.package = package } @Relationship public var package: SWDPackage? } I have to put the values that do not have default values as optionals (included relationships) to fulfill iCloud Sync requirements. I tried with and without @Attribute(.unique). Same results
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’23
Reply to SwiftData/ModelCoders.swift:1762: Fatal error: Passed nil for a non-optional keypath
Same on iOS 18 Beta 7. The "funny" thing is that it crashes on the try, the error is not catched. ... try context.save() <<< Crash } catch { print(error) }
Replies
Boosts
Views
Activity
Aug ’24
Reply to Unable to fetch Water data from HealthKit
Found the issue: I added the HKQuantityType(.dietaryWater) request in the try await hkHealthStore.requestAuthorization(toShare: writeValues, read: readValues) As share variable (thinking this would include the read) but it doesn't read. If others have the same issue. Double check that 😉
Replies
Boosts
Views
Activity
Aug ’24
Reply to Siri not calling AppIntents
Hi @HelloBlaine , I have the same issue. But how can I then pass parameters immediately if the $question is not allowed? Also the sample code from the AcceleratingAppInteractionsWithAppIntents example project shows exactly that this is the way to go. static var appShortcuts: [AppShortcut] { /** Records activity on a trail, such as hiking. On Apple Watch, `StartTrailActivity` creates a workout session. Use the `$workoutStyle` parameter from the intent to allow people to ask the app to start tracking an activity by the activity name. The system creates an App Shortcut for each possible value in the `ActivityStyle` enumeration. The complete set of generated App Shortcuts for this intent are visible in the Shortcuts app, or by following the `ShortcutsLink` at the bottom of `SidebarColumn`. */ AppShortcut(intent: StartTrailActivity(), phrases: [ "Track my \(\.$workoutStyle) in \(.applicationName)", "Start tracking my \(\.$workoutStyle) with \(.applicationName)", "Start a workout in \(.applicationName)", "Start a \(.applicationName) workout" ], shortTitle: "Start Activity", systemImageName: "shoeprints.fill") [....]
Topic: Machine Learning & AI SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jul ’24
Reply to iOS 18 SwiftData ModelContext reset
Same issue here. iOS 18 beta 3
Replies
Boosts
Views
Activity
Jul ’24
Reply to CoreML 6 beta 2 - Failed to create CVPixelBufferPool
I did share the data set via Airdrop to another mac (M2 Pro), running still Xcode 16 beta 2 (same CoreML version), but running on MacOS 14.5 (23F79), 32GB RAM, It took longer but no issues and model trained. Seems more something on MacOS, but I don't know how to investigate further.
Replies
Boosts
Views
Activity
Jul ’24
Reply to Be careful changing a widget's "kind" configuration
In my case some of the widgets get completely removed for the home screen automatically at random time. I also noticed the following in the console: [...] systemMedium::(null) Did some of view also get this problem of "automatically removed" widget from the OS? I am running iOS 17.5 (also same behaviour with 17.4).
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to Swift compiler crashes with simple SwiftData model
Hi all, Same issue here. It was crashing on beta 6 and I waited for the beta 7, but still the same issue is happening. Don't know if it helps the following stack trace. I tried to delete the line shown and by removing it, it compiles, but, well, I can't use Swift Data! Any updates on this? Apple Swift version 5.9 (swiftlang-5.9.0.128.106 clang-1500.0.40.1) 2. Compiling with the current language version 3. While evaluating request TypeCheckSourceFileRequest(source_file "/Users/andreaciani/Developer/Xcode-Projects/RLScoreTracker/RLScoreTracker/Views/PackageView/PackageListViewModel.swift") 4. While evaluating request TypeCheckFunctionBodyRequest(Counterby.(file).PackageListView extension.ViewModel.createNewPackage(in:)@/Users/andreaciani/Developer/Xcode-Projects/RLScoreTracker/RLScoreTracker/Views/PackageView/PackageListViewModel.swift:31:14) 5. While type-checking statement at [/Users/andreaciani/Developer/Xcode-Projects/RLScoreTracker/RLScoreTracker/Views/PackageView/PackageListViewModel.swift:31:57 - line:36:9] RangeText="{ let package = Persistency.SWDPackage(name: "", timestamp: Date(), items: [], goal: 0.0) // let package = SWDPackage(name: newPackageName, timestamp: Date(), items: [], goal: 0) // context.insert(package) // self.newPackageName = "" " 6. While type-checking declaration 0x14485abe0 (at /Users/andreaciani/Developer/Xcode-Projects/RLScoreTracker/RLScoreTracker/Views/PackageView/PackageListViewModel.swift:32:13) 7. While evaluating request PatternBindingEntryRequest((unknown decl), 0, 0) 8. While type-checking expression at [/Users/andreaciani/Developer/Xcode-Projects/RLScoreTracker/RLScoreTracker/Views/PackageView/PackageListViewModel.swift:32:27 - line:32:99] RangeText="Persistency.SWDPackage(name: "", timestamp: Date(), items: [], goal: 0.0" 9. While type-checking-target starting at /Users/andreaciani/Developer/Xcode-Projects/RLScoreTracker/RLScoreTracker/Views/PackageView/PackageListViewModel.swift:32:39 10. While reading from module 'Persistency', builder version '5.9(5.9)/Apple Swift version 5.9 (swiftlang-5.9.0.128.106 clang-1500.0.40.1)', built from source, non-resilient, loaded from '/Users/andreaciani/Library/Developer/Xcode/DerivedData/RLScoreTracker-hahiewpmlftmcygiutlddbpypydu/Build/Products/Debug/Persistency.swiftmodule/arm64-apple-macos.swiftmodule' 11. While finishing conformance for protocol conformance to 'PersistentModel' (in module 'SwiftData') for type 'SWDPackage' 12. *** DESERIALIZATION FAILURE *** *** If any module named here was modified in the SDK, please delete the *** *** new swiftmodule files from the SDK and keep only swiftinterfaces. *** module 'Persistency', builder version '5.9(5.9)/Apple Swift version 5.9 (swiftlang-5.9.0.128.106 clang-1500.0.40.1)', built from source, non-resilient, loaded from '/Users/andreaciani/Library/Developer/Xcode/DerivedData/RLScoreTracker-hahiewpmlftmcygiutlddbpypydu/Build/Products/Debug/Persistency.swiftmodule/arm64-apple-macos.swiftmodule' serialized conformances do not match requirement signature
Replies
Boosts
Views
Activity
Aug ’23
Reply to Can't set default values for @Model vars
Same issue here
Replies
Boosts
Views
Activity
Aug ’23
Reply to Xcode 15 Beta 5: Unsupported Xcode or SDK Version
Same issue on my side 🙁
Replies
Boosts
Views
Activity
Jul ’23
Reply to Invalid Signature. Code failed to satisfy specified code requirement(s).
Same issue. Have you solved somehow?
Replies
Boosts
Views
Activity
Jul ’23
Reply to SampleData on Previews @MainActor issue
Yes, that's what I did. I removed and the second error appeared.
Replies
Boosts
Views
Activity
Jul ’23
Reply to SwiftData CloudKit sync on WatchOS 10
For some reason even if I changed the cloudKitContainerIdentifier: "iCloud.my.icloud.id" the app was still using the old container. Not sure if it's a bug on Swift Data or intended behavior. By reverting the old container id now works.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jul ’23
Reply to SwiftData and correct setup for AppGroup
FYI: I was trying to use AppGroup to share data between devices. That is no longer possible. Either you use Watch Connectivity or iCloud.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jul ’23
Reply to Pass @Query filter predicate from parent view in SwiftData
Hi @BabyJ , thanks for your help. SWDPackge is as simple as this: @Model final public class SWDPackage { public var name: String? public var timestamp: Date = Date() public var publicID = UUID() public init(name: String? = nil, timestamp: Date, items: [SWDItem] = []) { self.name = name self.timestamp = timestamp self.items = items } @Relationship(.cascade, inverse: \SWDItem.package) public var items: [SWDItem]? } while for the SWDItem is the following @Model final public class SWDItem { public var timestamp: Date = Date() public var name: String? @Attribute(.unique) public var publicID = UUID() public var value: Double = 0.0 public init(timestamp: Date, value: Double, package: SWDPackage) { self.timestamp = timestamp self.value = value self.package = package } @Relationship public var package: SWDPackage? } I have to put the values that do not have default values as optionals (included relationships) to fulfill iCloud Sync requirements. I tried with and without @Attribute(.unique). Same results
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’23
Reply to Pass @Query filter predicate from parent view in SwiftData
Yes, this is what I tried as well, but got this error: I'm a bit confused why I get this. PublicID is a UUID type.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’23