Delve into the world of built-in app and system services available to developers. Discuss leveraging these services to enhance your app's functionality and user experience.

Posts under General subtopic

Post

Replies

Boosts

Views

Activity

AlarmKit authorizationState is always notDetermined even if permission has been previously granted
I am using AlarmKit in my app. When I access: AlarmManager.shared.authorizationState It always returns notDetermined, even when I have previously granted the app permission to use alarms via: try await AlarmManager.shared.requestAuthorization() Calling this API again grants me the permission though, without showing the permission prompt to the user. This sounds like a bug - if the permission has been granted, accessing authorizationState should return .authorized. It shouldn't require me to call requestAuthorization() again to update the authorization status again? Environment: iOS 26 beta 3 Xcode 26 beta 3
1
1
190
Jul ’25
iOS 26 Regression: Screen Time Permission Lost, had to be re-authenticated
Hello, my app is frequently loosing / forgetting the Screen Time Permission that had been granted previously on iOS 26. I have experienced it myself, sysdiagnose is in this radar: FB18997699 But also also my App Store users who have updated to iOS 26 already have reported this bug. It would be great if Apple could ensure that this bug is addressed before iOS 26 is released to the public.
1
1
170
Jul ’25
Open Parent App From ShieldActionDelegate
Hello, I’m building an app that helps people spend less time on social media apps. For that, I make heavy use of Apple’s Screen Time APIs, such as ManagedSettings and FamilyControls. When an app is locked using a ShieldConfiguration, the user has to open my app in order to unlock it (e.g. enter a code). This is very cumbersome because no documented API exists to open the parent app (=my app) from the ShieldActionDelegate (also part of my app) when the user presses a button of the ShieldConfiguration. The ShieldActionDelegate callback just offers three options in its ShieldActionResponse: .none .defer .close .openParentApp is missing. We are working around this limitation by sending a local push notification that the user has to tap on. This has multiple drawbacks: It has to be ensured that notification permission has been granted. It has to be ensured that notifications can be delivered even while focus is enabled. Features such as Apple Intelligence notification summaries and notification prioritization can heavily delay delivering notifications and thus frustrate the user. Neither my users nor myself do understand why this is not possible in a smoother way, at least according to the documentation. There are 3rd party apps that have such functionality, they can directly open their own app from a button press in the Shield, see here: https://apps.apple.com/us/app/applocker-passcode-lock-apps/id1132845904 It would be great if Apple could level the playfield for all developers and document how this is achievable, because technically it clearly is. Thanks a lot and have a great day!
6
1
311
Jul ’25
App Crashes on Launch – React Native – Only on iPad Air 5th Gen (iPadOS 18.5)
Hi all, I need help diagnosing a strange crash that’s affecting only one device model. Issue: My React Native app crashes immediately on launch, but only on the iPad Air (5th generation) running iPadOS 18.5. The app was built with React Native (latest stable version). It runs fine on all other tested iOS and iPadOS devices, both physical and simulators. There’s no crash on iPhone or on older iPads so can somebody please help solve this?
1
0
111
Jul ’25
Shielding all apps
I am trying to create an app that allows users to opt in and apply a shield to all of their apps during a specified amount of time each day, but they can always turn the shield off from our app or directly ignore the shield for 1 minute from a shield button. It is important that the user doesn't choose what apps to apply a shield to through the activity picker, as some users might not apply it to all apps. Currently I am doing everything I described in my app and shield all apps and webdomain categories with this: store.shield.applicationCategories = .all() store.shield.webDomainCategories = .all() But the, store.shield.applicationCategories = .all(), seems to block everything except for some system apps like Messages, Phone, FaceTime, Maps, Clock, Settings, Safari, Find My, Clock, Compass, Health, etc. It does block some system apps like Weather, Photos, Camera, Measure, App Store, etc. I know I can fully block applications from it's bundle identifier but I do not want to remove apps from the home screen. I only want to apply a shield to all of them. I have read every apple documentation possible about this and can't see a way to do it, currently how I am doing it seems to be the best way but it is still not enough. Even blocking a specific category token taken from the activity picker won't apply to some system level applications under it unless you get all the application tokens and apply the shield by applications and not category. I am really looking for help to see if there is something I can do to achieve my app's goal.
1
0
114
Jul ’25
WeatherKit "Availability and pricing" section question.
In Availability and pricing section, there's a 500,000 API calls a month per Apple Developer Program membership limitation. Is this just to limit the number of calls for developer in development stage? After the app is uploaded to App store, users download and start to use this app. Will Weather API calls of general App users be included in 500,000 API calls? Thanks.
1
0
230
Jul ’25
Receiving messages from TelephonyMessagingKit
I'm currently experimenting with TelephonyMessagingKit on iOS 26 Beta 3 (in the EU). I've managed to register my example project as the default Carrier messaging app, and sending/receiving SMS inside the app also appeared to work. However, I do not see any way to receive notifications/messages while the app is not running. Is this intentional? Not being able to notify users about an incoming message would be a competitive disadvantage compared to Apple's messages app, which is why I'd expect there to be an API to do this, given the EU rules. I'd appreciate any help here. Thanks!
1
0
403
Jul ’25
app crashed _CFRelease.cold.1
In my app, I implemented a screen recording functionality. But there was an unexpected crash. 0 CoreFoundation _CFRelease.cold.1 + 16 1 CoreFoundation ___CFTypeCollectionRelease 2 ReplayKit ___56-[RPScreenRecorder captureHandlerWithSample:timingData:]_block_invoke + 148 3 libdispatch.dylib __dispatch_call_block_and_release + 32 4 libdispatch.dylib __dispatch_client_callout + 16 5 libdispatch.dylib __dispatch_lane_serial_drain + 740 6 libdispatch.dylib __dispatch_lane_invoke + 388 7 libdispatch.dylib __dispatch_root_queue_drain_deferred_wlh + 292 8 libdispatch.dylib __dispatch_workloop_worker_thread + 540 9 libsystem_pthread.dylib __pthread_wqthread + 292
4
0
102
Jul ’25
Share extension with App Group: UserDefaults don't get persisted on iOS
I have a multiplatform app for Mac and iOS, for which I am implementing a share extension. This share extension has to share settings with the app itself on both platforms. I am currently trying to achieve this by adding all targets to the same App Group and using UserDefaults with the App Group as suiteName. The app consists of three targets: A multiplatform SwiftUI app, an iOS Share Extension, and a macOS Share Extension,. Settings get persisted correctly on Mac and on the iOS 26 simulator. However, on a real iOS 26 beta 3 device, the Share Extension is unable to load UserDefaults (loading anything with the App Group as a suite name returns nil). What could cause this behavior? The following log entries are generated from the Share Extension on the iOS device, but not on the iOS simulator: Couldn't read values in CFPrefsPlistSource<0x1030d3c80> (Domain: MY_APP_GROUP, User: kCFPreferencesAnyUser, ByHost: Yes, Container: (null), Contents Need Refresh: Yes): Using kCFPreferencesAnyUser with a container is only allowed for System Containers, detaching from cfprefsd 59638328 Plugin query method called (501) Invalidation handler invoked, clearing connection (501) personaAttributesForPersonaType for type:0 failed with error Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.mobile.usermanagerd.xpc was invalidated from this process." UserInfo={NSDebugDescription=The connection to service named com.apple.mobile.usermanagerd.xpc was invalidated from this process.} LaunchServices: store (null) or url (null) was nil: Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={_LSLine=72, _LSFunction=_LSServer_GetServerStoreForConnectionWithCompletionHandler, _LSFile=LSDReadService.mm, NSDebugDescription=process may not map database} Attempt to map database failed: permission was denied. This attempt will not be retried. Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={_LSLine=72, _LSFunction=_LSServer_GetServerStoreForConnectionWithCompletionHandler, _LSFile=LSDReadService.mm, NSDebugDescription=process may not map database} [C:1-3] Error received: Invalidated by remote connection.
1
0
73
Jul ’25
Getting ShinyTV Example to Work
I have downloaded the ShinyTV example to test simplified sign-in on tvOS since it is not working in my own app, and I am having the same issue there. After assigning my team to the sample app, the bundle ID updates with my team id. I copy the bundle ID into a file entitled "apple-app-site-association" with this format: { "webcredentials": { "apps": [ "{MyTeamID}.com.example.apple-samplecode.ShinyTV{MyTeamID}" ] } } I upload the file to my personal site, ensuring that the content type is application/json. I adjust the Associated Domain entitlement to: webcredentials:*.{personal-site.com}?mode=developer using the alternate mode to force it to load from my site, not the CDN. When I run the build on tvOS, and click the Sign In button, it fails with these errors: Failed to start session: Error Domain=com.apple.CompanionServices.CPSErrorDomain Code=205 "Failed to prepare authorization requests" UserInfo={NSMultipleUnderlyingErrorsKey=( "Error Domain=com.apple.CompanionServices.CPSErrorDomain Code=205 \"Missing associated web credentials domains\" UserInfo={NSLocalizedDescription=Missing associated web credentials domains}" ), NSLocalizedDescription=Failed to prepare authorization requests} Session failed: Error Domain=com.apple.CompanionServices.CPSErrorDomain Code=205 "Failed to prepare authorization requests" UserInfo={NSMultipleUnderlyingErrorsKey=( "Error Domain=com.apple.CompanionServices.CPSErrorDomain Code=205 \"Missing associated web credentials domains\" UserInfo={NSLocalizedDescription=Missing associated web credentials domains}" ), NSLocalizedDescription=Failed to prepare authorization requests} ASAuthorizationController credential request failed with error: Error Domain=com.apple.AuthenticationServices.AuthorizationError Code=1004 "(null)" UserInfo={NSMultipleUnderlyingErrorsKey=( "Error Domain=com.apple.CompanionServices.CPSErrorDomain Code=205 \"(null)\"" )} Failed with error: Error Domain=com.apple.AuthenticationServices.AuthorizationError Code=1004 "Failed to prepare authorization requests" UserInfo={NSMultipleUnderlyingErrorsKey=( "Error Domain=com.apple.CompanionServices.CPSErrorDomain Code=205 \"Missing associated web credentials domains\" UserInfo={NSLocalizedDescription=Missing associated web credentials domains}" ), NSLocalizedDescription=Failed to prepare authorization requests} What am I missing here?
5
0
190
Jul ’25
FRONTBOARD crash App killed while running in the background.
PLATFORM AND VERSION iOS Development environment: Xcode 16.2, macOS 15.5 Run-time configuration: iOS 18 DESCRIPTION OF PROBLEM Our app (a VoIP and messaging app) has been experiencing a crash when running in the background for long periods of time (a couple of days) while receiving calls, and message notifications. If the app is not receiving notifications, we don't get any crashes while it runs in the background. It is worth mentioning that we have several pushes that are background pushes and they could happen depending on the outcome of an incoming call. We have the two pushes: incoming call bye: let the app know that the calling end hanged up the call. incoming call answered: lets the app know that another device (with the same shared number) answered the call (web app, Android). Those pushes are delivered within 30 seconds after the call starts. I assume that since the app was awakened by a VoIP push, those background notification won't count towards the iOS restriction of not getting too many background pushes: "The number of background notifications allowed by the system depends on current conditions, but don’t try to send more than two or three per hour." Let me know if the above assumption is not accurate. I don't see details in the crash report (such as a "Termination Description") that could guide me to address the issue. So I would appreciate if you can give me some insight on what could be causing this. Here is part of the crash report: Exception Type: EXC_CRASH (SIGKILL) Exception Codes: 0x0000000000000000, 0x0000000000000000 Termination Reason: FRONTBOARD 0xbaadca11 <RBSTerminateContext| domain:10 code:0xBAADCA11 explanation: reportType:CrashLog maxTerminationResistance:Interactive> Triggered by Thread: 0 Thread 0 name: Thread 0 Crashed: 0 libsystem_kernel.dylib 0x00000001dda93ce4 mach_msg2_trap + 8 1 libsystem_kernel.dylib 0x00000001dda9739c mach_msg2_internal + 76 (mach_msg.c:201) 2 libsystem_kernel.dylib 0x00000001dda972b8 mach_msg_overwrite + 428 (mach_msg.c:0) 3 libsystem_kernel.dylib 0x00000001dda97100 mach_msg + 24 (mach_msg.c:323) 4 CoreFoundation 0x000000018c886900 __CFRunLoopServiceMachPort + 160 (CFRunLoop.c:2637) 5 CoreFoundation 0x000000018c8851f0 __CFRunLoopRun + 1208 (CFRunLoop.c:3021) 6 CoreFoundation 0x000000018c886c3c CFRunLoopRunSpecific + 572 (CFRunLoop.c:3434) 7 GraphicsServices 0x00000001d9a65454 GSEventRunModal + 168 (GSEvent.c:2196) 8 UIKitCore 0x000000018f299274 -[UIApplication run] + 816 (UIApplication.m:3845) 9 UIKitCore 0x000000018f264a28 UIApplicationMain + 336 (UIApplication.m:5540) 10 SwiftUI 0x00000001913a97a4 closure #1 in KitRendererCommon(:) + 168 (UIKitApp.swift:68) 11 SwiftUI 0x00000001910af01c runApp(_:) + 112 (UIKitApp.swift:16) 12 SwiftUI 0x00000001910aeed0 static App.main() + 180 (App.swift:136) 13 TheApp Business 0x0000000100686028 static TheApp_BusinessApp.$main() + 52 (TheApp_Business.swift:0) 14 TheApp Business 0x0000000100686028 main + 64 15 dyld 0x00000001b375bf08 start + 6040 (dyldMain.cpp:1450) STEPS TO REPRODUCE Open the app. Leave the app running in the background while it is receiving notifications (VoIP or messages). Bring the app to the foreground after a day or two of it running in the background. Notice that after opening the app, the launch screen is presented.
3
0
120
Jul ’25
Universal Links not working with subdomains without AASA on root domain
Hi all, I'm trying to set up universal links for my app but it's not working. What I want: cogover.com → Safari (website) - NOT my app *.cogover.com (any subdomain like abc.cogover.com) → My app What I did: Added applinks:*.cogover.com in Xcode Put AASA files on all subdomains They work fine (checked with curl) Problem: All links still open in Safari, not my app. I do not put AASA on my root domain cogover.com because I don't want open my app with root domain. I have checked TN3155: Debugging universal links | Apple Developer Documentation but it only say about universal link works with both root domain and subdomains. Weird thing I found: I checked how Salesforce does it - their *.force.com subdomains work perfectly. But when I tried to check their setup, (https://force.com/.well-known/apple-app-site-association) doesn't seem to exist either! So how does theirs work? Even stranger - Apple's CDN has their file cached at (https://app-site-association.cdn-apple.com/a/v1/force.com) but the actual domain doesn't serve it. Can Apple's CDN have a file cached even if it's not on the website anymore? Thanks for any help!
0
0
110
Jul ’25
Using Picture-in-Picture for Background Audio Calls on iOS
I’m developing an app with audio calling functionality, and I’d like to take advantage of Picture-in-Picture (PiP) so that when the user moves the app to the background, the ongoing call can remain minimized on the Home screen. Based on my research, it seems possible to display a view in PiP mode and have it play, and I haven’t found any documentation stating that this is prohibited. Could you please confirm if this is allowed?
1
0
295
Jul ’25
Family Controls App Help
Hello! I am a relatively new Apple developer and am almost done with my first app. I am implementing the Screen Time API to my app because the app is designed to help the user digitally detox and I am trying to make it so the user can select which apps they would like to monitor from a list of their apps on their phone so I am using the family activity picker but I just can't extract the data needed to track the apps. I am wondering how to do this. Thank you!
1
0
100
Jul ’25
Refreshing AASA file?
I recently started a new app that supports universal links. I noticed an error in the apple-app-site-association (AASA) file and updated it. I used mode=developer in the applinks configuration, and it works well on Simulator, but for the life of me I can't get my device to load the new file, and the CDN hasn't updated in days. Any suggestions for how to get it to update, or get iOS to load the file directly? mode=developer is supposed to do this, but it simply won't on device. I've tried touching the file, and I can see its reported HTTP last modification date and eTag have changed. I've tried deleting and reinstalling the app; I've tried restarting the phone; I've tried clean builds; I've tried changing the applinks: to something else and reinstalling; I've tried installing via TestFlight.
2
0
67
Jul ’25
Issue with Universal Links and App Extension (ShieldAction Handler)
Issue with Universal Links and App Extension (ShieldAction Handler) I'm currently working on a POC app using the FamilyControls framework and facing an issue when trying to open a Universal Link from an app extension, specifically from a ShieldAction handler. When I try to open a Universal Link, I encounter the following error: Failed to open URL https://sixteen-server-c008110f8759.herokuapp.com/.well-known/apple-app-site-association: Error Domain=FBSOpenApplicationServiceErrorDomain Code=1 "The request to open 'com.apple.mobilesafari' failed." UserInfo={BSErrorCodeDescription=RequestDenied, NSUnderlyingError=0x14f2d90b0 {Error Domain=FBSOpenApplicationErrorDomain Code=3 "Application com.sixteen.life is neither visible nor entitled, so may not perform un-trusted user actions." UserInfo={BSErrorCodeDescription=Security, NSLocalizedFailureReason=Application com.sixteen.life is neither visible nor entitled, so may not perform un-trusted user actions.}} Context: I’m using a ShieldAction handler as part of an App Extension to trigger the action (e.g., "Break in Shield") in my app. The app extension (ShieldAction handler) is responsible for trying to open the Universal Link. I’m encountering the error because the app is not visible or entitled to perform this action, which seems to be related to security restrictions when using App Extensions. Questions: App Extension and Universal Link Interaction: Is it possible for an App Extension (like ShieldAction handler) to open a Universal Link or trigger an external app, such as Safari, even though it is not the foreground app? Entitlements for App Extensions: Are there any specific entitlements or permissions required to allow an app extension (ShieldAction handler) to open Universal Links or perform actions like opening Safari from the background? App Visibility and State: How can I ensure that my app is in the right state (visible/active) and has the necessary entitlements to trigger these actions when running in the context of an app extension? Workaround: If this behavior is restricted due to app extension limitations, what would be the recommended workaround to handle launching external apps (like Safari) or Universal Links from within an app extension?
9
0
289
Jul ’25
Detecting When App Token Is Removed Due to Category Selection in FamilyActivityPicker
I'm working with the Screen Time API (FamilyActivityPicker) in SwiftUI and need help with a specific scenario. I'm using the FamilyActivityPicker to let users select apps and categories to block. I save the previous selection (both applicationTokens and categoryTokens) locally. When the user updates their selection, I compare the new selection with the saved one to determine which apps or categories were removed. However, I’m trying to handle a specific case: when an individual app token is removed from the selection because its entire category was selected instead. In this situation, even though the app is no longer in applicationTokens, it's still blocked due to its category being included in categoryTokens. Since I need to show users which apps were actually removed, I want to avoid listing apps that are still indirectly blocked via a selected category. I’ve created a mapping between ApplicationToken and FamilyActivityCategoryToken to check whether a removed app is still covered by a selected category before displaying it. Is there any way to check this using the current Screen Time APIs, or does the system not give access to the relationship between apps and their categories? Any help or suggestions would mean a lot!
2
1
142
Jul ’25