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

pushkit and callkit
I am currently implementing VoIP push notifications in my iOS app using PushKit. On iOS 18, I am able to receive VoIP notifications successfully when the app is in the foreground. However, when the app is in the background or in a terminated (kill) state, the notifications do not arrive. In earlier iOS versions, my existing implementation worked as expected across all app states. This issue seems to have started after testing on iOS 18, which appears to have introduced stricter permission or background execution requirements. Questions: Has iOS 18 introduced new permission requirements or entitlements for VoIP push notifications? Do I need to explicitly request a new type of user permission for VoIP notifications? Are there additional background modes, Info.plist keys, or PushKit changes required for VoIP to work in background and terminated states on iOS 18? Additional Information: . Foreground: Works fine, pushRegistry(_:didReceiveIncomingPushWith:for:completion:) is triggered. . Background/Terminated: No call to the above delegate method. . Using correct voip push type in the payload. . PushKit is configured in AppDelegate. . Background modes for "Voice over IP" and "Background Processing" are enabled. . Using a real device with iOS 18 for testing (not simulator). Any guidance or updated documentation references for handling VoIP pushes in iOS 18 would be greatly appreciated.
0
0
56
16h
CallKit blocked call remains Missed Calls
I’m currently developing a spam number blocking app using CallKit. I’ve confirmed that up to iOS 26 beta 5, there is a bug where number blocking doesn’t work. In my current tests, the ringtone doesn’t sound and the blocking works fine, but the call still appears in the missed calls list, which is bothersome. If the bug is fixed in future versions (as it was in previous versions), is there a way to block the number so that it also does not appear in missed calls?
2
1
46
1d
Request: Higher-Frequency IMU Access on Apple Watch for Sports Performance Apps
Hi everyone, I’m building a sports performance app for Apple Watch that uses the onboard IMU to analyze swings and impacts in sports like tennis and golf. The goal is to estimate club/racket head speed, ball speed, and shot quality in real time from wrist motion data. With Core Motion, I can currently get deviceMotion updates at ~100 Hz. While this is fine for general movement tracking, the actual ball impact happens much faster — 5–10 ms in tennis and ~0.5 ms in golf. Many of the high-frequency vibration/impact components are missed at 100 Hz, making it hard to directly measure or more accurately estimate certain performance metrics. Questions for Apple / community: 1. Is there a way to access raw accelerometer and gyroscope data at higher sampling rates (e.g., 500–1000 Hz) on Apple Watch? 2. If not, is this due to hardware limitations or an API/software constraint? 3. Are there any research, partner, or beta programs that allow deeper sensor access for sports-science use cases? Even modest increases in IMU sampling could unlock more accurate ball-speed estimates, impact force analysis, and strike-quality detection without needing external sensors — making Apple Watch a best-in-class wearable for precision sports analytics. Happy to share more about the current approach, sample data, and potential use cases if helpful. Thanks, Max
1
0
54
1d
DeviceActivityReport disappears when app comes back from background
Hello, I am trying to display basic screen time data on my main screen. On the initial load of the screen, the DeviceActivityReport renders correctly and visible, but after being in the background and coming back to the app, the whole view is just blank. I don't think I'm doing anything special. Is this a known bug? @main struct MyActivityReportExtension: DeviceActivityReportExtension { var body: some DeviceActivityReportScene { // Create a report for each DeviceActivityReport.Context that your app supports. TotalActivityReport { totalActivity in TotalActivityView(totalActivity: totalActivity) } // Add more reports here... } } extension DeviceActivityReport.Context { // If your app initializes a DeviceActivityReport with this context, then the system will use // your extension's corresponding DeviceActivityReportScene to render the contents of the // report. static let totalActivity = Self("Total Activity") } struct TotalActivityReport: DeviceActivityReportScene { // Define which context your scene will represent. let context: DeviceActivityReport.Context = .totalActivity // Define the custom configuration and the resulting view for this report. let content: (String) -> TotalActivityView func makeConfiguration(representing data: DeviceActivityResults<DeviceActivityData>) async -> String { // Reformat the data into a configuration that can be used to create // the report's view. let formatter = DateComponentsFormatter() formatter.allowedUnits = [.day, .hour, .minute] formatter.unitsStyle = .abbreviated formatter.zeroFormattingBehavior = .dropAll let totalActivityDuration = await data.flatMap { $0.activitySegments }.reduce(0, { $0 + $1.totalActivityDuration }) return formatter.string(from: totalActivityDuration) ?? "No activity data" } } struct TotalActivityView: View { let totalActivity: String var body: some View { VStack(alignment: .center, spacing: 4) { Text("Screen Time") .font(.system(size: 14, weight: .regular)) .foregroundColor(.secondary) .frame(maxWidth: .infinity, // stretch to the full cell width alignment: .center) Text(totalActivity) .font(.system(size: 18, weight: .medium)) .foregroundColor(.primary) } } } And I am using it in my main view: private var analyticsSection: some View { HStack(spacing: 24) { // Some View DeviceActivityReport(DeviceActivityReport.Context(rawValue: "Total Activity"), filter: DeviceActivityFilter( segment: .weekly( during: Calendar.current.dateInterval( of: .weekOfYear, for: .now )! ), users: .all, devices: .init([.iPhone, .iPad]), )) .frame(maxWidth: .infinity) // another view } .frame(maxWidth: .infinity, maxHeight: showAnalytics ? 58 : 0) .padding(.horizontal, showAnalytics ? 24 : 0) .opacity(showAnalytics ? 1.0 : 0.0) .clipped() }
0
0
113
3d
TVTopShelfContentProvider and Swift 6 Concurrency
I have a TVTopShelfContentProvider that implements func loadTopShelfContent() async -> (any TVTopShelfContent)? When running on Xcode 26 b5 I am seeing the following error in swift 6 mode. Non-Sendable type '(any TVTopShelfContent)?' cannot be returned from nonisolated override to caller of superclass instance method 'loadTopShelfContent()' I'm not sure exactly what's changed here as it used to compile just fine but it's unclear now how I can work-around this error or how the API is supposed to be used. The following definition is enough to trigger the error in Swift 6 language mode. import TVServices class ContentProvider: TVTopShelfContentProvider { override func loadTopShelfContent() async -> (any TVTopShelfContent)? { return nil } } I can "fix" it by adding @preconcurrency to the TVServices import but it seems like this API is unusable currently? Or maybe it's user error on my part?
0
0
24
3d
About Universal Links
I have been using Universal Links since January of this year. As of January, it was working fine, but when I checked its operation in August, it was no longer working properly. After investigating, I believe that the reason it is not working is because our firewall is blocking communication from AppleCDN to check for AASA files. Our firewall blocks communication from outside Japan, and Apple's IP address (17.0.0.0/8) is whitelisted. Does anyone know the hostname or IP address that is used to check AASA files? If you know, please let me know.
1
0
17
3d
How can I calculate distance and vertical velocity?
Can't I just add up all of the accelerations of the accelerometer and then use this physics equation to get distance? d = v(i) x t + (1/2) x a x t ^2 In this: v(i) would be 0 t = 1 second a = all accelerometer speeds added together for.1 second t = 1 second Can't I just use this equation to get vertical velocity? A lot of people have said it is impossible but It has been done with variometer apps. I can’t figure out the code. Can anyone guide me in the right direction? v(f) = v(i) + a x t v(i) = 0 a = y-axis acceleration for 1 second t = 1 second Please let me know if this is possible. Thank you so much for your help.
1
0
55
4d
Issue with beta Declared Age Range
I'm trying to work with the beta version of the Declared Age Range framework based on an article's tutorial but am getting the following error: [C:1-3] Error received: Invalidated by remote connection. and AgeRangeService.Error.notAvailable is being thrown on the call to requestAgeRange. I'm using Xcode 26 beta 5 and my simulator is running the 26.0 beta. The iCloud account that I have signed into the simulator has a DOB set as well. This is my full ContentView where I'm trying to accomplish this. struct ContentView: View { @Environment(\.requestAgeRange) var requestAgeRange @State var advancedFeaturesEnabled = false var body: some View { VStack { Button("Advanced Features") {} .disabled(!advancedFeaturesEnabled) } .task { await requestAgeRangeHelper() } } func requestAgeRangeHelper() async { do { let ageRangeResponse = try await requestAgeRange(ageGates: 16) switch ageRangeResponse { case let .sharing(range): if let lowerBound = range.lowerBound, lowerBound >= 16 { advancedFeaturesEnabled = true } case .declinedSharing: break // Handle declined sharing default: break } } catch AgeRangeService.Error.invalidRequest { print("Invalid request") // Handle invalid request (e.g., age range < 2 years) } catch AgeRangeService.Error.notAvailable { print("Not available") // Handle device configuration issues } catch { print("Other") } } }
0
0
56
4d
How to stop today's instance of repeating alarms in AlarmKit without affecting future days?
I'm using the new AlarmKit framework to build a Swift app that lets users schedule multiple repeating alarms. The goal is to allow users to stop all alarms for today if they wake up early, but the alarms should still ring on their scheduled days in the future (for example, every Monday). What I tried: When the user chooses to stop alarms for today, I delete all alarms and re-add them. However, this doesn't work as expected. If today is Monday and I delete and re-add the alarm with .weekday = .monday, it still rings today. That means re-adding the alarm doesn't skip today's instance, even though it's repeating. What I want to achieve: Skip or suppress today's alarms when the user stops them manually Keep the same alarms active for their scheduled days in the future Questions: Is there a way in AlarmKit to prevent a repeating alarm from ringing today if it was just re-added or there are better alternatives to this problem? Is the only workaround to delay re-adding until after today’s alarms would have fired? What is the best approach to achieve this?
0
0
36
4d
performEndCallAction response to reportCallWithUUID can be slow
We are currently developing a VoIP application that supports Local Push extention. We discovered an issue with this app where the performEndCallAction response to reportCallWithUUID is occasionally slow.(See below for detail) It usually works without any issues, so we believe there is no problem with the app's processing flow. This issue only occurs very rarely, but each time it does there is a delay of about 60 seconds, which leads us to suspect that there is some kind of problem on the iOS side, and that fail-safe processing is occurring after 60 seconds. Do you know of a workaround for this issue?
1
0
36
4d
Finder shows warning "Apple could not verify file is free of malware" when setting my app as "Always open with"
A user of my AppKit, document-based app brought to my attention that when setting it as the default app to open a certain file with extension .md (by choosing in the Finder "File &gt; Open With &gt; Other", then selecting my app and enabling "Always open with"), trying to open it with a double-click displays the warning "Apple could not verify [file] is free of malware that may harm your mac or compromise your privacy". This is what happens for me: When keeping the default app for a .md file (Xcode in my case), the file opens just fine. When choosing my app in the "File &gt; Open With" menu, the file opens just fine in my app. But when setting my app as the default app (see above), the warning is displayed. From that moment on, choosing my app in the "File &gt; Open With" menu doesn't work anymore. Selecting Xcode doesn't work either. Only setting Xcode again as the default app allows me to open it in Xcode, but my app still isn't allowed to open it. Is this a macOS issue, or can I do anything in my app to prevent it? Where should I start looking for the issue in my code?
10
0
99
5d
encountering a console warning when accessing NSUserDefaults within the willFinishLaunchingWithOptions method. However, it appears that all the key values are loading correctly despite the warning.
App initiates a App group based UserDefaults within the willFinishLaunchingWithOptions method and the same reference are used throughout the app life cycle + (NSUserDefaults *)appGroupUserDefaults { if (_appGroupUserDefaults == nil) { NSString *appGroupIdentifier = [NSString stringWithFormat:@"group.%@",[[NSBundle mainBundle] bundleIdentifier]]; NSUserDefaults *groupDefaults = [[NSUserDefaults standardUserDefaults] initWithSuiteName:appGroupIdentifier]; if(groupDefaults != nil) { NSLog(@"[DB_ENCRYPTION] appGroupUserDefaults initialised"); _appGroupUserDefaults = groupDefaults; } else { NSLog(@"<ALA_ERROR>: [CCF-OS] [DB_ENCRYPTION] %s Unable to create NSUSerDefaults with groupIdentifier", __func__); _appGroupUserDefaults = [NSUserDefaults standardUserDefaults]; } } return _appGroupUserDefaults; } Doesn't have any issues on accessing the values but seen the below console error: Couldn't read values in CFPrefsPlistSource<0x103eedb00> (Domain: group.com.kodiak.InstaPoC, User: kCFPreferencesAnyUser, ByHost: Yes, Container: (null), Contents Need Refresh: Yes): Using kCFPreferencesAnyUser with a container is only allowed for System Containers, detaching from cfprefsd Does it require any action here ?
2
0
45
5d
Twilio Voice iOS SDK: callInvite is missing when accepting incoming call from CallKit or React Native
I'm integrating Twilio Voice (v6.12.1) into my React Native app (using Swift bridging for iOS) and have implemented full VoIP, PushKit, and CallKit support for incoming calls. ✅ What works: Incoming calls trigger the VoIP push and display the full-screen CallKit interface (or fallback UI). Decline Call works as expected. Call logs and events print correctly. ❌ Problem: When I try to accept the call using the CallKit Accept button or React Native fallback UI, I consistently get: ❌ [TwilioVoiceModule] answerCall() callInvite is missing. I also noticed that the console logs for answerCall() are being printed three times in a row, even though the accept button is only pressed once. Additionally in the first time console, answerCall() CallInvite found, accepting... 🔍 Observations: The callInvite is properly received when the VoIP push arrives. But when answerCall() is triggered, callInvite becomes nil. This happens in CallKit accept, RN UI accept, and even notification banner accept. 📦 How it's set up (summarized): PushKit Registration – via PKPushRegistry in AppDelegate.swift VoIP push handling – forwards payload to TwilioVoiceModule.handleIncomingPush() CallKit integration – uses CXProviderDelegate to report and handle accept actions JS Bridge – emits acceptCallAction to JS React Native calls TwilioVoiceModule.answerCall(uuid, callSid) In answerCall() method: self.callInvite is nil – so call cannot be accepted. Attaching the link to view the relevant code: https://docs.google.com/document/d/15pNjKrfk954OaotpMIEh3xQUtst---1K45DBXoYctGM/edit?usp=sharing 💡 Call Accept Flow (iOS): VoIP Push → TwilioVoiceModule.handleIncomingPush() Twilio SDK creates callInvite reportNewIncomingCall() triggers CallKit UI On accept: CXAnswerCallAction → emits event to JS RN calls TwilioVoiceModule.answerCall(uuid, callSid) Problem: callInvite is already nil ❓ What I'm trying to understand: Why is callInvite becoming nil before answerCall() is called? Why are the logs showing the answerCall() call 3 times? Is there a race condition or multiple accept triggers? Should I ensure callInvite is accepted only once across all 3 accept paths? ** 💬 Any help would be appreciated.** 📱 Environment: React Native 0.78.x iOS 17+ Swift bridging with TwilioVoiceModule.swift Twilio Voice SDK 6.12.1 PushKit + CallKit + react-native-callkeep
1
0
39
5d
Request for Device Temperature Monitoring and Thermal Attribution Analysis APIs
Background: During daily usage of iOS devices, devices experience noticeable thermal issues. This heating not only affects user experience, but may also lead to device performance throttling, shortened battery life, and other problems. We need better understanding and monitoring of device thermal states to optimize application performance and user experience. Issues Encountered: Insufficient thermal monitoring capabilities: Unable to obtain real-time accurate temperature data from devices Difficult power consumption analysis: Hard to determine which specific modules or threads cause high power consumption and heating Requested Solutions: Temperature Monitoring API: Provide accessible device temperature reading interfaces Thermal Attribution Analysis Capability: During heating events, we expect to receive more detailed power consumption monitoring data, such as CPU, GPU, network, location services, display, high power consumption thread stacks and other information to help developers identify high energy consumption operations
2
0
29
6d
iOS26 beta4 CallKit block number function not working
Hi I'm novice developer. I’m currently developing a phone number blocking app using a Call Directory Handler Extension. The blocking feature works perfectly on iOS 18.5, but it doesn’t seem to function properly on iOS 26 beta 4. The extension is invoked, and the numbers are passed correctly, but incoming calls are not being blocked as expected. Is there a known issue with CallKit or Call Directory Extensions on iOS 26 beta 4
4
0
72
6d
How to display a full-screen light based (sunrise) alarm notification at specific time (like Clock app)? Can Critical Alerts help with visuals too?
I'm building a light-based(sunrise) alarm iOS app using SwiftUI , the idea is to wake users not with sound, but with a full-screen bright light UI (mimicking sunrise or a light alarm clock). I'd like to replicate behavior similar to the native Clock app: My goal: When the scheduled time is reached, forcefully display a full-screen "light" screen, even if the device is: locked running another app or the app is backgrounded The problem: So far, I can: Show a full-screen AlarmView only if the app is opening But I cannot: Automatically wake the screen when app is closed My confusion: I've read that Critical Alerts allow bypassing Do Not Disturb and Silent Mode but that's only for sound right? Can Critical Alerts also help with waking the screen or displaying visuals like full-screen UI automatically? If not, is there any way to simulate this kind of alarm: light-based screen effect ( sunrise alarm clock) triggered automatically at a specific time without needing the user to manually tap the notification? Do I need to consider: PushKit + VoIP? CallKit (but it's meant for calls)? Background tasks + silent push? Or is it simply impossible without special entitlements? Thanks in advance for any insights. This seems like a simple use case (light-based alarm), but I’m surprised how limited the options is.
1
0
35
6d