Post

Replies

Boosts

Views

Activity

Reply to Disable new tab bar look
FWIW, I recently got a response through Feedback assistant saying that the new UITabBarController behavior is "functioning as intended" and suggests that the best option would be to hide the UITabBarController and create a custom control to get the old functionality again. I personally find it very unreasonable to change the behavior of something that's been working fine for 17 years and replace it with something that's a confusing ill-thought-out mess, and not offer an opt-in / opt-out. But there you go. At least we have a few weeks to come up with alternatives.
Aug ’24
Reply to EntityPropertyQuery with property from related entity
Hi, Yes I get the same results on a new project. I have created an example project and attached it here. It's based on a basic Core Data app, with an "Item" entity, that has a one-to-many relationship with a "Tag" entity. When I convert these into "App Entities", I can create a query for the properties of the "Item" entity, and another query for the "Tags" entity, but I can't figure out how to create a query in "Item" that would also look for associated 'tags'. I can't seem to attach a zip file containing the app project to this post for some reason. But the code is fairly simple. This is the Item AppEntity: import Foundation import AppIntents struct ItemsAppEntity: AppEntity { static var defaultQuery = ItemsAppEntityQuery() var id: String @Property(title: "Timestamp") var timestamp: Date @Property(title: "Tags") var tags: [CJTagItemsAppEntity] static var typeDisplayRepresentation = TypeDisplayRepresentation(name: "Test Item") var displayRepresentation: DisplayRepresentation { DisplayRepresentation(title: "\(timestamp.formatted())") } struct ItemsAppEntityQuery: EntityPropertyQuery { static var sortingOptions = SortingOptions { SortableBy(\ItemsAppEntity.$timestamp) } typealias ComparatorMappingType = NSPredicate static var properties = QueryProperties { Property(\ItemsAppEntity.$timestamp) { LessThanComparator { NSPredicate(format: "timestamp < %@", $0 as NSDate) } GreaterThanComparator { NSPredicate(format: "timestamp > %@", $0 as NSDate) } } // HOW TO ADD SEARCH-BY-TAGNAME ... this does't work Property(\CJTagItemsAppEntity.$tagName, entityProvider: { item in return item.tags.first! }) { EqualToComparator {name in let predicateFormat = "tagName == '\(name)'" return NSPredicate(format: predicateFormat) } } } func entities(for identifiers: [ItemsAppEntity.ID]) async throws -> [ItemsAppEntity] { return [] } func entities(matching comparators: [NSPredicate], mode: ComparatorMode, sortedBy: [EntityQuerySort<ItemsAppEntity>], limit: Int?) async throws -> [ItemsAppEntity] { return [] } } } This is the Tags AppEnttiy: struct CJTagItemsAppEntity: AppEntity { static var defaultQuery = CJTagItemsAppEntityQuery() var id: String @Property(title: "Name") var tagName: String static var typeDisplayRepresentation = TypeDisplayRepresentation(name: "Test Tag") var displayRepresentation: DisplayRepresentation { DisplayRepresentation(title: "\(tagName)") } struct CJTagItemsAppEntityQuery: EntityPropertyQuery { static var sortingOptions = SortingOptions { SortableBy(\CJTagItemsAppEntity.$tagName) } typealias ComparatorMappingType = NSPredicate static var properties = QueryProperties { Property(\CJTagItemsAppEntity.$tagName) { EqualToComparator {name in let predicateFormat = "tagName == '\(name)'" return NSPredicate(format: predicateFormat) } } } func entities(for identifiers: [CJTagItemsAppEntity.ID]) async throws -> [CJTagItemsAppEntity] { return [] } func entities(matching comparators: [NSPredicate], mode: ComparatorMode, sortedBy: [EntityQuerySort<CJTagItemsAppEntity>], limit: Int?) async throws -> [CJTagItemsAppEntity] { return [] } } } I haven't implemented any methods properly ... I'm just trying to get the syntax right for this. Thanks.
Jul ’24
Reply to Delay in CKRecord uploads
After more research, it seems like the issue with 'CKQueryOperations' specifically, whether from the device or from web dashboard. If I fetch using CKFetchOperations, either from the device or from dashboard, with fixed RecordIDs, it works soon after the update is done. So it seems like some issue with indexing on the CloudKit side. How do we that fixed? I have mentioned the containerID in the feedback report that is linked above
Jan ’24