Post

Replies

Boosts

Views

Activity

Live Activity Widget -
Hi, I'm developing a Live Activity Widget that shows a count down timer. In the current solution I have a stop watch that is responsible for handling the start, stop, resume, reset function. When the stop watch starts I have timer that calls on an updateTime function every 0.2 seconds. This works well. The problems comes when I try to use my stop watch in the Live Activity Widget. I have a timer that updates the live activity attributes with content every 0.5 second. // Start the activity let activity = try? Activity.request(... DispatchQueue.main.async { self.logger.log("Start internal timer") self.timer = Timer.scheduledTimer(withTimeInterval:0.5, repeats: true) { _ in self.logger.log("Update activity widget.") self.updateActivity() } } Is this a correct approach? If not what should I use to implement a stop watch with a count down timer and a corresponding progress bar/view?
2
0
611
Jun ’24
Enable web content filter from configuration profile
Hi, how can I enable web content filter from a configuration profile? I'm using the "com.apple.webcontent-filter" payload, also I'm specify to use Plug-in as FilterType and app’s bundle identifier is set as the value of the PluginBundleID field in the profile payload. Further my app using Network Extension, FilterDataProvider and FilterControlProvider. What I want to achive is to enable the web content filter without open my app.
8
0
2.9k
Nov ’20