What is the process named "announced" on iPhone 6S, iOS 14.4? Is it safe? Found zero information about it.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I would like to test handle() in my ExtensionDelegate to make sure that WKWatchConnectivityRefreshBackgroundTasks are completed successfully. Is there any way to simulate background task? On real device or on simulator.
I need to track user actions, for example video view count. Then the data is used to get most popular videos for last 7 days, 30 days and for a year. For this purpose I have created a Downloads table with timestamp and video fields.
Each time user opens the catalog, I'm running queries to get Downloads and sort the videos based on them. This is a working, but not the efficient solution. A good option is to add aggregated data table storing summary counts for the popular queries - countFor7Days, etc. This will improve query performance. But it requires a job that would update the aggregate table every day.
The question is how to implement this job in CloudKit? Is there are such built-in feature, or I need a custom service running somewhere?
Recently, our team bumped into a crash that we cannot resolve. We looked for help everywhere. I asked people here on forums, team asked about 10 fellow developers and the question on SO was created. Nobody knows the reason for the crash, nobody can find a workaround. So, as the last resort, I called for Apple Technical Support (aka code-level support). I assumed that people there understand how things work under the hood. Considering that this service is limited (2 TSI per year, otherwise paid), I expected the quality to be high. In fact, it didn't help us to resolve the problem, and I was disappointed how irrelevant the provided support could be. TLDR: The dev didn't even open the test project!
I described the memory crash with WidgetKit-based complication. I spend my time capturing video, finding watch logs on my iPhone and creating a sample project. I attached console output, stack traces and a couple of screenshots. I even provided a .watchface file, so they can reproduce the configuration. This together took about 6-8 hours of work. I explained what happens in detail: steps to reproduce, what I've tried. I asked the support to recommend me way to present only the specified complications.
Then I submitted the issue and started to wait. It took them 1 week to responsd. I pointed my sight on the email with excitement, expecting to finally get the resolution. But what I found there was disappointing. The software engineer, Rico, quoted only a couple of sentences from my list. His letter contained only 4 lines of text (not including greetings and cheers).
In the first line he recommended to use preprocessor macro to enable only necessary complications, which is nonsense. Of course we need to change complications dynamically, when the user selects them.
I two next lines he recommends to use if statement in WidgetBundle to dynamically unlock the complications. I already knew that it isn't possible. Because, quote: "if statements in a WidgetBundleBuilder can only be used with #available clauses"
@available(*, unavailable, message: "if statements in a WidgetBundleBuilder can only be used with #available clauses")
public static func buildOptional<W>(_ widget: W?) where W : Widget
The last line cancelled everything before, Rico said that this can't be done at runtime. Probably, he added that after reading the documentation, but forgot to edit his previous statements.
I didn't give up completely. I decided to skip the design discussions and get the info that Rico could probably have, due to his access to the software. Why the extension using so much memory? I also asked him, if he was able to build the project and reproduce the bug.
Another week passed. I'm sending a follow-up message. That worked, after another 3 days I got the response:
Finally some useful information! Timeline and views are being archived to disk (all simultaneously), that's why the memory usage is so high. Basically, a widget design issue. But anyway, we have what we have.
Then next line, he has written this: "Complications are deprecated". What? But wait, he thinks that we use ClockKit, and recommends migrating to WidgetKit. So Rico completely forgot that we discussed WidgetBundle and SwiftUI before 🤡
He honestly tells me that he didn't open the project. Why? Because "Complications are unlikely to be supported", he says. So he "forgot" WidgetKit on intention, this gave him an excuse to ignore the sample project. My time was invested for nothing!
I believe there's no need in further conversation with Rico. I will provide the detailed feedback to the Apple. And I'm posting it publicly to make sure that Rico gets the attention he deserves.
If you want to know more technical details about the issue, you can check the following links:
https://stackoverflow.com/q/77855303/1746142
https://developer.apple.com/forums/thread/744726
On May 1 I started to see this image instead of watch UI preview. It worked well before. I didn't update Xcode, neither I deleted or installed any new simulator OS. It was harmful to my work, since simulator download is 4GB and I need to wait when it downloads, instead of reviewing PRs and closing tasks.
Did anyone had the same issue? Do you know how to prevent it?
I'm curious, why DynamicOptionsProvider is available on watchOS? Is there any way to present options to the user? For example in Emoji Rangers project:
struct EmojiRangerSelection: AppIntent, WidgetConfigurationIntent {
static let intentClassName = "EmojiRangerSelectionIntent"
static var title: LocalizedStringResource = "Emoji Ranger Selection"
static var description = IntentDescription("Select Hero")
@Parameter(title: "Selected Hero", default: EmojiRanger.cake, optionsProvider: EmojiRangerOptionsProvider())
var hero: EmojiRanger?
struct EmojiRangerOptionsProvider: DynamicOptionsProvider {
func results() async throws -> [EmojiRanger] {
EmojiRanger.allHeros
}
}
func perform() async throws -> some IntentResult {
return .result()
}
}
On watchOS we usually use recommendations() to give the user predefined choice of configured widgets. Meanwhile in AppIntentProvider recommendations are empty:
struct AppIntentProvider: AppIntentTimelineProvider {
...
func recommendations() -> [AppIntentRecommendation<EmojiRangerSelection>] {
[]
}
}
Does it imply that there's a way to use DynamicOptionsProvider on watchOS somehow? BTW, WidgetConfiguration.promptsForUserConfiguration() is one of the methods that are not available on watchOS.
And also, the Emoji Ranger project doesn't show widgets (complications) on watchOS out of the box.
What is the process named com.apple.dt.DTConditionInducerSupportService on my iPhone 6S, iOS 14.4?