Post

Replies

Boosts

Views

Activity

ManagedSettingsStore applicationCategories all() specifications
Within ManagedSettingsStore, in the documentation for the ShieldSettings.ActivityCategoryPolicy enum (here), one of the options is all(). It states that if this is used, the device will shield "all apps and websites". In practice, I have noticed that when this is used, a handful of apps (i.e. Messages, Maps) remain unblocked. Furthermore, it appears that on different devices, this usage results in different apps remaining unblocked (on my device Messages remained unblocked, but on another tester's device Messages was blocked). Can anyone provide clarification as to explicitly which apps are not included in the specification of "all()" and whether this changes based on device, iOS version, etc.?
2
0
892
Mar ’23
Live Activity Persistence After App Force Quit
I have a state in my app that is connected to a Live Activity. When the state is true, the Live Activity is active, and when it is false, the Live Activity is ended. I have noticed, though, that if a user starts the Live Activity (by changing the state to true), then force quits the app, then reopens the app and changes the state to false, the Live Activity is not ended / removed from the lock screen. Is there any way to fix this? Since there is no problem ending the Live Activity if the user doesn't force quit the app, it seems as though the Live Activity may be somehow connected to the specific instance of the app. Is there a way to not have the Live Activity connected to the only active instance of the app, but be able to have it ended by any future instance of the app?
2
0
1.5k
May ’23
Setting Up App for Subscriptions in the Future
This may be a bit high level, but wanted some clarification as I can't be sure from reading the documentation. I am considering adding paid subscriptions into my app at some point in the future. Initially, though, I would like the app to simply be free to use. Even though I won't be charging subscriptions right away, would it make sense to implement the mechanics for subscriptions into the app right away for each user (and simply have the subscription be $0/month, for example)? Or will it be easy enough in the future to add the option for a paid subscription and integrate it seamlessly with existing users? To provide some additional context, I don't want to implement any sort of custom account creation / registration logic into my app (i.e. like on a social media where each user creates a username and password) - I would simply like to be able to utilize Apple's logic for Apple IDs and such to eventually handle payments and subscriptions. Is this something I should reconsider?
1
0
698
May ’23
Persist Data After App Deletion
Is there any reliable way to persist some app data after the user deletes the app, so that the next time they download it again the data will still be accessible? For a variety of reasons, I do not currently want to require users to create accounts and then store that data on an external server - I am just storing all app data in UserDefaults. If a user deletes the app, though, it is important that if a user redownloads it certain datapoints would be accessible from the last time they used it. I have done a bit of research and it looks like Keychain can persist data after app deletion, but it seems like that might not be optimal (as it's meant more for things like passwords). Are there any other solutions I should try, or is it inevitable that I will need to require users to create accounts and then store this information in a backend I manage?
1
0
1.4k
Jun ’23
Any Developer Flexibility Around "Always Allowed" Apps?
The Screen Time API allows developers to block / shield all apps that aren't in the user's "Always Allowed" list in the Screen Time settings (by setting .all() for ShieldSettings.ActivityCategoryPolicy. What I've found, though, is that if an app is blocked, the user can simply go to this Always Allowed list, add that app, and it immediately becomes unblocked. I am trying to either prevent a user from being able to do this or detect when a user does this, as the point of an app like mine (that allows the user to block other apps) is to prevent people from easily accessing those apps that are blocked. Is this possible?
0
1
683
Jun ’23
Screen Time restrictions not working or showing up in settings
My app uses the ScreenTime API to allow users to block other apps. For some users, the FamilyActivityPicker doesn't render any apps, and they aren't able to block anything. When they go into Settings -> Screen Time, there is no section titled "Apps With Screen Time Access", and when they go into Settings -> , there is no toggle for Screen Time Restrictions - even though they enabled screen time access when setting up my app. Has anyone else seen this issue and/or resolved it?
0
0
506
Sep ’23
Screen Time limits interfering with my app
If a user has Screen Time limits set up for certain apps, will that interfere with my app that allows users to restrict app usage using the Screen Time API? I've had some users experiencing this issue (they have Screen Time limits set up for apps, and my app isn't able to restrict those and/or other apps), but I haven't been able to find a reliable pattern yet. Has anyone else encountered this?
0
0
486
Sep ’23
Persist AppIntent after Force Quit?
I have implemented an AppIntent in my app with the purpose of allowing users to set up an automation within the Shortcuts app that runs based on a boolean value in my app. It works well normally, but I've found that if my app is force quit, the Shortcut no longer works (presumably because it can't fetch the value of the boolean from my app anymore). Does anyone know how to persist this value so that the Shortcut will work regardless of whether my app is open in the background? Here is my implementation of the AppIntent: struct my_automation: AppIntent { static var title: LocalizedStringResource = "Automation Name" var isTrue = UserDefaults.standard.bool(forKey: "myVal") func perform() async throws -> some IntentResult { return .result(value: isTrue) } }
1
0
655
Oct ’23
FamilyActivityPicker Crashing / Freezing
Our users report frequent crashes with the FamilyActivityPicker. Since this is a screen controlled by Apple, I'm assuming that there's nothing I can do to prevent these crashes. I'm wondering, though, if there's any way to gracefully handle these crashes? When this happens, the following is printed to the console: [com.apple.FamilyControls.ActivityPickerExtension(1121)] Connection to plugin invalidated while in use. Does anyone know how to handle/catch this error?
2
2
879
Dec ’23
How to check app's Screen Time access?
Is there a way for me to programmatically check whether a user has disabled my app's access to Screen Time? I currently request Family Controls / Screen Time access upon download by calling the following: AuthorizationCenter.shared.requestAuthorization(for: .individual) I need to be able to detect, though, when a user has gone into Settings -> Screen Time and disabled my app's Screen Time access. I tried calling the following: AuthorizationCenter.shared.authorizationStatus But it appears to have a value of Approved even after I turn off my app's Screen Time access. Is there any way to accurately detect this in the code?
1
0
1k
Feb ’24
How to Persist App Data (UserDefaults)?
I use UserDefaults to store a variety of user data / preferences. Recently, I have started getting somewhat frequent complaints from users that their settings have been reset. There doesn't appear to be a rhyme or reason to the issue (some users have all of their data reset just once, while others are seeing that one of their settings resets very frequently). I haven't been able to pinpoint what the root cause is, but I figure that it must have something to do with UserDefaults (either all of it or only certain keys) somehow getting erased. As I figure out the root cause, I figure that a good solution in the meantime is to backup UserDefaults in some way (e.g. perhaps to iCloud?). Is there a standard / best-practice way of doing this?
2
0
604
Apr ’24
UserDefaults Issue After iPhone Restart
It seems that the first time I open my app after the phone is restarted, the app does not properly access UserDefaults. When my app is launched, I pull relevant user settings / preferences from UserDefaults. I recently noticed (after some users reached out about issues) that the first time the app is opened after a restart, the app appears as though all user settings / preferences have been erased. If the app is force quit and reopened, the user data seems to come back normally. If the user takes action in the app before force quitting, though, UserDefaults will be written to with these new, empty values (essentially erasing what used to be in UserDefaults). This makes it seem as though right after the phone is restarted, the app is unable to pull data from UserDefaults for some reason. Has anyone else seen this issue? It could also be due to the lifecycle of my app and how I access UserDefaults, so if others don't have this issue it would be great to hear how you handle this.
3
1
679
Apr ’24
FamilyActivityPicker Questions
I have a couple of questions on the FamilyActivityPicker that I couldn't seem to find in the documentation: Is there any way to have it show only apps or websites? I've had some users reach out with frustrations because they want to select a category of apps (e.g. "Social"), but that also selects a lot of websites that they don't want to include. Where does the picker get the websites that it populates? It seems like there's not much rhyme or reason to these (and there's often multiple urls for the same site - e.g. facebook.com and m.facebook.com). Is there any way (as a developer) to have preset app selections available upon download? For example, can I have an option that has certain apps in the Social category chosen by default so that each user doesn't have to go in and manually select all of the apps they want?
1
0
445
May ’24