Hello!
I am developing an app (Homie) which uses HomeKit to give users access to their HomeKit devices + accessories via the Mac‘s Menu Bar.
One feature is also to pin sensors (e.g., temperature) to the Menu Bar:
To get updates to sensor values I am using the HMAccessoryDelegate‘s didUpdateValueForCharacteristic method.
Some users are reporting that updates to Homie are passed along very infrequently und unreliably. I have set up a test with the HomeKit Accessory Simulator in which values are consistently passed along instantly. This problem is hard to debug for me, that‘s why I‘m asking what recommended ways would be to tackle this.
I noticed that sometimes the HomeKit framework does not deliver updates unless the Home app is opened on my Mac or iPhone. But not sure if this is expected or related to that problem and what I can do about it.
Any feedback & help is appreciated 🙏
Reference:
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hello!
I am looking to access data on how many times (on a specific day, week, or month) an alphanumeric subscription offer code has been redeemed (to track affiliate marketing).
Right now, I am using the Reporter.jar tool like this:
java -jar Reporter.jar p=Reporter.properties a=1234567 m=Robot.XML Sales.getReport 123456789, Subscription, Summary, Daily, 20230120, 1_3
As a result, a long list of subscription events is downloaded, however it is not clear which date a particular event did occur on. It seems like actually they pile up with every additional day.
These are the columns that I can see:
App Name, App Apple ID, Subscription Name, Subscription Apple ID, Subscription Group ID, Standard Subscription Duration, Subscription Offer Name, Promotional Offer ID, Customer Price, Customer Currency, Developer Proceeds, Proceeds Currency, Preserved Pricing, Proceeds Reason, Client, Device, State, Country, Active Standard Price Subscriptions, Active Free Trial Introductory Offer Subscriptions, Active Pay Up Front Introductory Offer Subscriptions, Active Pay As You Go Introductory Offer Subscriptions, Free Trial Promotional Offer Subscriptions, Pay Up Front Promotional Offer Subscriptions, Pay As You Go Promotional Offer Subscriptions, Free Trial Offer Code Subscriptions, Pay Up Front Offer Code Subscriptions, Pay As You Go Offer Code Subscriptions, Marketing Opt-Ins, Billing Retry, Grace Period, Subscribers
As you can see, a date is not among them.
Would be great if anyone has feedback on how to make this happen!
Hello!
I am using the eventDidReachThreshold callback in the DeviceActivityMonitor in order to shield a target app after the user has spend x amount of time on it (e.g. x = 5 minutes).
Many times this works fine, and I can trigger my shield after the specified threshold has been met.
However sometimes, when they leave the target app before the threshold has been reached, the eventDidReachThreshold callback gets called randomly while they are doing something else on their phone (e.g. using a different app, on the Home Screen, phone locked…).
From my perspective this does not make sense, since they are not actively spending time on the target app, and that time should not be counted towards the target app’s threshold.
And it is also very confusing for the users because they will then find a blocked target app even though they haven’t used their time budget completely.
This is not related to the intervalDidStart / intervalDidEnd callbacks, because they are not correlating with the timing of when the eventDidReachThreshold callback is called unexpectedly.
Any ideas what this could be related to?
Hello,
I am using a DeviceActivityEvent to limit access to an app after the user has spent x minutes on it.
Sometimes it can happen that a DeviceActivitySchedule spans from 11:55pm - 12:25am (just an example).
In these cases, I have noticed, the DeviceActivityMonitorExtension’s eventDidReachThreshold is not called after the user has reached the threshold time interval in the observed app.
I assume this is because we have transitioned over midnight and something weird happens to the DeviceActivitySchedule.
I’ve tried adding the day components to the DeviceActivitySchedule as well, but then it fails completely.
Any advice how to handle this?
I could, of course, create two separate DeviceActivitySchedules: one for before midnight, and one for after. But depending on the user’s real app usage that could lead to slightly different (and unexpected) behavior.
Topic:
App & System Services
SubTopic:
General
Tags:
Family Controls
Device Activity
Managed Settings
Screen Time
I have two repeating DeviceActivitySchedules running in my app and noticed a super strange behavior:
whenever I modify Screen Time API permission settings (granting an additional app permission, or removing permission for a different app (completely different unrelated screen time apps from App Store)) all my DeviceActivitySchedules are cancelled and the intervalDidEnd callbacks are called
my permission is not modified in this scenario
this is a super strange and unexpected behavior
is anyone able to reproduce this?
for me this happens 100% of the times I do this
any known workarounds?
Topic:
App & System Services
SubTopic:
General
Tags:
Family Controls
Device Activity
Managed Settings
Screen Time
I am currently debugging an issue with DeviceActivityMonitor where the threshold is reached even though the target app (e.g. Instagram) is not being used actively.
I noticed that the device with the unexpected behavior had the instagram.com website opened in the Safari web browser (among hundreds of other tabs).
That tab was not actively used either (not in foreground, Safari app neither used).
However, I was wondering if it can happen that this website is contributing towards the threshold as well even though it is in background and not used?
Otherwise I cannot explain myself this strange behavior.
Topic:
App & System Services
SubTopic:
General
Tags:
Family Controls
Device Activity
Managed Settings
Screen Time
I am using the DeviceActivityMonitor eventDidReachThreshold functionality, but it became very unreliable on the iOS 17.5 beta.
Anyone experiencing similar problems?
Any known workarounds?
Topic:
App & System Services
SubTopic:
General
Tags:
Family Controls
Device Activity
Managed Settings
Screen Time
Hello,
I would like to make use of the new SwiftUI Text API for a Lockscreen Widget, but I wasn't able to figure out how I can achieve what I envision:
I am looking for a way to display the days, hours, minutes since the time stamp. Of course, whenever day=0, they shouldn't be displayed. Whenever day>0, minutes can be dropped. So I assume I can set maxFieldCount: 2 for that.
This is my current code:
Text(
.currentDate,
format: .reference(
to: entry.lastUseDate,
allowedFields: [.day, .hour, .minute],
maxFieldCount: 2,
thresholdField: .day
)
)
This is how it looks like; somehow the minutes are not displayed. What am I doing wrong?
Hello,
I am working on an app that schedules a device activity monitor from the screen time API.
I noticed that sometimes scheduling an activity monitor won’t work and instead I see this log:
Canceling request to […].DeviceActivityMonitorExtension because it exceeded its allowed time.
What does this mean? What exactly is exceeding its allowed time?
Would love to get some feedback on this so I can prevent this from happening.
Thanks a lot for any help and have a nice day!
Topic:
App & System Services
SubTopic:
General
Tags:
Family Controls
Device Activity
Managed Settings
Screen Time
For an upcoming update of one of my apps, I’m facing an issue:
The .rate parameter of a AVAudioUnitTimePitch allows me to slow down an audio track without any issues: setting .rate to 0.7 or 0.8 results in an almost perfect playback without changing pitch.
However, whenever the .rate parameter is greater than 1 (e.g. 1.1 or 1.15), I’m starting to hear audio artifacts (“flattering”) in the audio output which is not so nice (even at .overlap = 32).
Intuitively, I’d’ve thought that speeding up the file should contain less artifacts than slowing it down??
I’ve tried different sample rates (44.1 kHz and 48 kHz), but same result.
Grateful for any input on this 🙏
Hello,
I am new to be using on-demand resources in my project, it’s a wonderful idea and concept I have to say! Kudos to whoever invented this!
I am facing one problem that I couldn't solve so far:
whenever I switch between the TestFlight / App Store / local Xcode builds I receive this error message:
Code=4099 "Connection invalidated to streaming unzip service."
Does anyone know what this means and how I can resolve it?
I saw this other thread where it was recommended to delete & reinstall the app, but that is not always feasible because then all user data from the app is lost as well:
https://forums.developer.apple.com/forums/thread/707070
Thanks a lot for any hints!
Hello,
I am unable to figure out how I tell the FamilyActivityPicker whether it should show apps installed on my personal device (to be used with AuthorizationCenter.shared.requestAuthorization(for: .individual)) or apps installed on my child’s device (authenticated their phone via AuthorizationCenter.shared.requestAuthorization(for: .child)).
Is there any parameter or SwiftUI modifier I need to apply?
Otherwise, how does the user or the app know which token belongs to them and which token belongs to their child’s device?
Radar: FB17020977
Thanks a lot for your help!
Hello!
I am excited to try out the new continueInForeground API with iOS 26.
I was wondering, what is the suggested way to transport meta data to the main app?
Before, with SiriKit intents I would use the .onContinueUserActivity() API and were able to pass a NSUserActivity from the Shortcut to the Main app.
Now, with the continueInForeground() call I am not sure – what would be your suggestion?
Of course, I can store some data in UserDefaults, but that feels like a workaround.
Happy to get some input on this!
Thanks a lot and have a great day!
Hello,
I have noticed that the ShieldConfiguration is only requested when opening a target app, and never when the application token is moved to a different shield while the target app remains in foreground.
This causes problems because many times the wrong ShieldConfiguration is displayed (recycled) instead of requesting a new ShieldConfiguration.
This bug has been around since the introduction of the Screen Time API in 2020 and is has not been addressed.
Bug reports:
FB14237883
FB17902392
Please fix asap!! Not acceptable to have bugs not being addressed for more than 5 years.
Most concerning: This is still reproducing on iOS 26 beta 7!!
Thanks a lot for your help.
Topic:
App & System Services
SubTopic:
General
Tags:
Family Controls
Device Activity
Managed Settings
Screen Time
Hello Albert!
I am experiencing some strange bugs around DeviceActivityEvents (part of the DeviceActivity framework) on iOS 26 / iOS 26.1 / iOS 26.2 beta:
When creating a DeviceActivityEvent we can assign a threshold and applicationTokens.
The idea is, that after the user has spent said threshold on said apps, eventDidReachThreshold() is called.
The property includesPastActivity is set to false.
On iOS 26 however, it happens (quite reliably after updating to a new beta seed) quite often that eventDidReachThreshold() is called immediately (after a couple of seconds) instead of waiting for the threshold to be met.
Is anyone else seeing similar issues on iOS 26 / iOS 26.1 / iOS 26.2 beta?
Only workaround I have found is to ask users to revoke and re-grant Screen Time permissions. This only holds for about two weeks though or at most until the next iOS 26 beta update is installed, so it is not a permanent solution unfortunately.
Feedback (incl. sysdiagnoses and sample project) is filed under:
FB18061981
FB18927456
One of our users has filed their own feedback request as well:
FB20817853
Thanks a lot for any help on this!