Post

Replies

Boosts

Views

Activity

Reply to Changing the live activity without push notification
Having the same issue here for my app. The unfortunate thing is that the timer starts counting up (mine works like a countdown), which makes it incredibly confusing for the user. As a workaround, I have to put the time the countdown ends. Using an if conditional (check if the date < current date) doesn't work as well. Seems like the UI is only updated once. Seems like there's no reliable way to do it now other than through a server-side push notification...
Mar ’23
Reply to Xcode 15 archive failed - file name too long
Just an update: If you are using the #Predicate macro in any part of your SwiftUI's body, move it out to its own function and call the function from within your body. That seems to have fixed it for me. e.g. Instead of: var body: some View { HStack { ... let predicate = #Predicate<Item> { ... } ... } } Do: var body: some View { HStack { ... findItems() ... } } func findItems() { let predicate = #Predicate<Item> { ... } ... }
Oct ’23
Reply to fileImporter download progress from files in iCloud Drive
It seems like you can read the download progress from the NSMetadataUbiquitousItemPercentDownloadedKey file metadata key. You could probably initialize an NSMetadataItem using a URL object, then use the value(forAttribute:) function to fetch the download progress from 0.0 to 1.0. NSMetadataUbiquitousItemPercentDownloadedKey: https://developer.apple.com/documentation/foundation/nsmetadataubiquitousitempercentdownloadedkey NSMetadataItem: https://developer.apple.com/documentation/foundation/nsmetadataitem
Oct ’23