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") [....]
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
Jun ’23