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

ODR Legacy Technology Issues
Hello, We are currently evaluating ways to reduce the app size of the my App. The app contains approximately 200~250 MB of bundled static resources, and we are considering converting these resources into On-Demand Resources(ODR) in order to reduce the initial download and installation size of the app. However, we noticed that ODR is currently marked by Apple as a Legacy Technology. Since we would like these resources to continue being hosted and distributed through Apple CDN / App Store infrastructure, the first alternative we considered is Managed Background Assets, rather than regular Background Assets. We understand that regular Background Assets are available on iOS 16 and later, but they mainly address background download scheduling for apps. What we are specifically looking for is the resource hosting and distribution capability, similar to ODR, where assets can be hosted and delivered through Apple’s infrastructure. This is why we are considering Managed Background Assets. However, my App currently supports devices starting from iOS 14, while the key capabilities of Managed Background Assets require newer iOS versions. As a result, this solution cannot fully cover users who are still on older iOS versions, such as iOS 14 through iOS 18. Given this background, we would like to ask Apple the following questions: Does Apple have any plan to discontinue ODR-related services in the future, especially the App Store-hosted ODR asset download service? If the ODR service is changed or discontinued in the future, would it affect already released App Store apps that rely on ODR asset downloads on older iOS versions? For apps that still need to support iOS 14 and later, while also relying on Apple CDN / App Store infrastructure for resource hosting and distribution, does Apple still recommend using ODR? For apps that cannot immediately raise their minimum supported iOS version to the version required by Managed Background Assets, is there a recommended transition strategy? If ODR services are discontinued in the future, will Apple provide an alternative resource distribution solution that supports older iOS versions, or would developers need to build and maintain their own resource hosting and download system? We would like to better understand the long-term availability and potential risks of using ODR on older iOS versions, so that we can make an appropriate decision for future app size reduction and asset delivery in the App. Thank you.
1
0
319
2w
Inquiry regarding MetricKit cpuExceptionDiagnostics timestamps, totalSampledTime, and app status
Dear Apple Developer Support Team, I am writing to seek clarification on the timeline behavior and app status associated with the MetricKit cpuExceptionDiagnostics payload. In a recent diagnostic log collected from production, we observed the following values: timeStampBegin: "2026-07-07 10:37:00" timeStampEnd: "2026-07-07 10:37:00" totalSampledTime: "168 sec" Since both timeStampBegin and timeStampEnd share the exact same second (10:37:00), but the totalSampledTime indicates a continuous sampling duration of 168 seconds, we are having trouble accurately correlating this incident with our internal server logs. Could you please clarify the following questions: What exactly does the timestamp "2026-07-07 10:37:00" represent? Is it the sampling start time, the sampling end time, or the moment the diagnostic log was generated/written by the system? If "2026-07-07 10:37:00" represents the log generation time (or the moment the exception was triggered), how should we determine the actual start and end times of the 168-second sampling window? For instance, does it mean the sampling occurred strictly before this timestamp (from 10:34:12 to 10:37:00), or is there a different calculation method? Does a cpuExceptionDiagnostics event imply that the app crashed or was terminated by the OS? Or is it merely a non-fatal telemetry log capturing heavy CPU usage/resource limit violations while the app remained running? Understanding the precise timeline and lifecycle impact of MetricKit diagnostics is crucial for us to correlate client-side resource issues with backend performance and user activities. Thank you for your time and guidance. Best regards
0
0
240
3w
ShareLink with custom UT type not opening in my app
Hey all, my first time posting on these forums as I've finally become completely stumped. I'm working to implement a ShareLink to share data between users on my app, and have gotten pretty far (file saves, sends correctly), but am having significant issues getting the link to open in my app when sharing by email and not getting any action at all when tapping a shared link in iMessage. I'll go through my setup below: I have declared my new UTType, and created my new model which conforms to transferable here: struct transferTemplate: Codable { var id: UUID = UUID() var name: String = "TempName" var words: [String] = ["word1","word2"] } extension transferTemplate: Transferable { static var transferRepresentation: some TransferRepresentation { CodableRepresentation(contentType: .oltemplate) } } extension UTType { static var oltemplate: UTType { UTType(exportedAs: "com.overloadapp.oltemplate") } } I have declared the document type in my info.plist: <key>CFBundleDocumentTypes</key> <array> <dict> <key>CFBundleTypeName</key> <string>Template Session</string> <key>LSHandlerRank</key> <string>Owner</string> <key>LSItemContentTypes</key> <array> <string>com.overloadapp.oltemplate</string> </array> </dict> </array> I have declared the Exported Type Identifier: <key>UTExportedTypeDeclarations</key> <array> <dict> <key>UTTypeConformsTo</key> <array> <string>public.json</string> </array> <key>UTTypeDescription</key> <string>Template Session</string> <key>UTTypeIconFiles</key> <array/> <key>UTTypeIdentifier</key> <string>com.overloadapp.oltemplate</string> <key>UTTypeTagSpecification</key> <dict> <key>public.filename-extension</key> <array> <string>oltemplate</string> </array> <key>public.mime-type</key> <array> <string>application/json</string> </array> </dict> </dict> </array> I've also included the "LSSupportsOpeningDocumentsInPlace" boolean to True in the PLIST. My physical ShareLink setup is: @State private var transferred: transferTemplate = transferTemplate(name: "NameTemplate", words: ["One","Two"]) ... ShareLink(item: transferred, preview: SharePreview("Share your template", image: Image("tanLogo"))) Heres where the above code gets you: ShareLink brings up the share sheet and allows you to send the file (with the .oltemplate file extension). Sharing via iMessage will send a file, but within iMessage, the file cannot be opened at all. By email, the file can be opened but does not show any information. If you open the ShareSheet within the email attachment, you can manually choose to open the file in my app. If the file is saved to "Files", it will open my app when it is tapped (work as intended). Heres what I have tried to fix this: Modifying the Exported File Type "Conforms to" value. Ive used public.data, public.text, public.json. Including and not including the mime type I've scoured forums trying to solve this issue, and it doesn't seem like there is a clear cut solution for this issue. I appreciate any help you can provide! Please let me know if I can include any more helpful information.
1
1
1.5k
3w
Swift thread continuation crash when calling isEligibleForAgeFeatures
Hi, We’ve been observing crashes when calling “try await DeclaredAgeRange.AgeRangeService.shared.isEligibleForAgeFeatures”. Our crash logs show a “suspend resume partial function” crash from libswift_Concurrency.dylib swift::runJobInEstablishedExecutorContext. Based on our analysis, this is because once Apple’s eligibility check completes, it attempts to resume the Swift task continuation directly on its own internal background thread instead of yielding back to the Swift cooperative thread pool. Because the caller task inherits @MainActor isolation (due to a UIViewController being passed into our pipeline further up as it’s needed for requestAgeRange), the Swift runtime crashes when trying to reconcile the @MainActor context on Apple's foreign background thread. Has anyone encountered this and found a fix, and is this a known issue? Thanks!
1
0
232
3w
[iOS 17.1.1 issue] MSMessageLiveLayout not rendering after MSMessagesAppViewController.willBecomeActive in iOS 17.1.1
Hello dear community, I have an iMessage extension running perfectly on iOS 16.4, but on 17.0.1 and 17.1.1 it's having real issues. Messaging in iMessage on the iOS 17.0.1 simulator isn't working at all. MSMessageLiveLayout works perfectly on iOS 16.4, but on iOS 17.1.1 (physical iPhone 15, 14, 13, 12, SE 2020) the MSMessagesAppViewController won't render after didStartSending and subsequent willBecomeActive. The iPhones will just show "Loading...". I debugged through it, couldn't find any issues and works perfectly fine on iOS 16.4 both in the simulator and on a physical device. I'm debugging through the physical devices with XCode, but couldn't find any root cause on why. Has anyone experienced similar issues with MSMessagesAppViewController in iOS 17.1.1? Any ideas on how to fix this? Thanks, Jan
3
1
889
3w
Spotlight on finds title attribute (OS27 b3)
Hi, it seems that something in OS27b3 changed regarding Core Spotlight: Whatever I try, Siri and Spotlight only seem to find the text inside the title or displayName attribute. But attributes like textContent or contentDescription or keywords seem to be ignored. Those attributes are still found, when I do a manual search using CSUserQuery or using the AppEntityDefinition.spotlightQuery(_:) in App Intent Testing. I have already filed a Feedback – but wonder whether anyone else is having this issue? FB23635795 Thanks, Friedrich
2
0
304
3w
App Group data sharing does not work sometimes between HostApp and Service extension.
Hi There, My app is a legacy project built with Objective C. The host app shared data with the service extension by using NSUserDefaults *userDefault = [[NSUserDefaults alloc] initWithSuiteName:@"group.com.myapp.project"]; and it worked until a customer recently reported a bug (iOS 18.6). After debugging, I found that data sharing from the host app to the service extension was not working correctly. The host app updated a field's value, but the service still used the old or stale value, causing the issue. HostApp saved info 2026-06-01 13:44:07.020 [INFO] (VMP)(ThreadID: 0x10a85c000): "Saved Vomo information { "EXT_AP_IP" = 1c28af0f9d73; "EXT_PING_DND" = 0; "EXT_PING_USER_NAME" = aaa08AA541F8; "EXT_SERIAL_ACK_TIME" = "2026-06-01 20:44:07 +0000"; "EXT_SERIAL_NO" = 689; "EXT_SERVER_NAME" = "10.xxx.xxx.182"; "EXT_VOICE_LOGIN" = 1; }" Service extension read value: 2026-06-01 13:46:09.678 [INFO] (VMP) - (EXTENSION)(ThreadID: 0x1050a41d0): "start Vomo with Server: [10.xxx.xxx.79] and userName [aaa08AA541F8]" I can see the value shared from host app is: 10.xxx.xxx.182, but service extension still took the stale value 10.xxx.xxx.79 First I thought it is synchronized issue, however, apple deprecated those API, CFPreferencesAppSynchronize((__bridge CFStringRef)@"group.com.myexample.project"); How to ensure the shared value successfully delivered to service extension? Thanks.
5
0
372
3w
Does an opt-in leaderboard using an abstracted on-device score comply with DPLA 3.3.3(P)?
I am the developer of a screen time awareness app currently on the App Store. It uses the Family Controls and DeviceActivity frameworks, with the distribution entitlement approved, to show users their own cumulative screen time since install. All tracking today is fully on-device and nothing leaves the user's phone. I am planning an optional social feature and I want to confirm Apple's position before building it, because I want to stay clearly within the Developer Program License Agreement, specifically Section 3.3.3(P) regarding data received through the Family Controls framework. Here is how the feature would work: The app monitors the user's own device activity via DeviceActivityMonitor threshold events. This is the same mechanism the app already uses for its on-device counter. On-device, that counter is converted into an abstracted, gamified score. The score is not expressed in hours, minutes, or any unit of time, and the app never displays it as time. If, and only if, the user opts in to the feature, the app uploads a self-chosen username, the date the user's count began, and the user's abstracted score values to my backend. Score values may be computed over different time windows, for example a lifetime score alongside daily, weekly, or monthly scores, but they are all the same abstraction: no raw time totals, no per-app or per-category data, no contacts, and no identifiers beyond what the account itself requires. Friends who have mutually opted in see each other's usernames and scores on a leaderboard. The app never displays another person's screen time, and no time values are stored server-side. The feature is off by default, data is encrypted in transit and at rest, and users can delete their account and all associated data from within the app at any time. The privacy policy will disclose all of this. My question: does transmitting this opt-in, abstracted score, derived on-device from DeviceActivity threshold events, comply with DPLA Section 3.3.3(P) and the intended use of the Family Controls framework? If this specific design is not acceptable, is there any form of opt-in social comparison feature that would be, and what constraints would it need to satisfy? I am aware of earlier threads here where sending screen time data off-device was flagged as non-conforming, which is exactly why I am asking before writing any code rather than after. I would rather design this correctly from the start than risk a rejection later. Thank you for your time. Happy to provide any additional detail about the design.
0
0
212
3w
Problems with SensorKit data calls
The Deligate 'didFetchResult' method of fetching data past 24 hours from SensorKit is not being called. It is confirmed that you have already granted full access to the SensorKit and that data on the Ambient value in the device's personal information -> research sensor & usage data are recorded. It is possible to export to an lz4 file. I want to have the data after 24 hours called to the app, but other Deligate methods are called, but only Deligate that gets the illumination value is not called. Is it understood that only data past 24 hours can be imported after startRecoding() is called? If so, in order to receive data past 24 hours, do I have to continue to receive the illumination data value in the background for more than 24 hours to receive the Ambient value afterwards? import Foundation import SensorKit import UIKit final class SensorKitManager: NSObject, ObservableObject, SRSensorReaderDelegate { static let shared = SensorKitManager() private let ambientReader = SRSensorReader(sensor: .ambientLightSensor) var availableDevices: [SRDevice] = [] @Published var ambientLightData: [AmbientLightDataPoint] = [] var isFetching = false var isRecordingAmbientLight = false private override init() { super.init() setupReaders() checkAndRequestAuthorization() } private func setupReaders() { ambientReader.delegate = self } // MARK: - Permission Request func requestAuthorization() { SRSensorReader.requestAuthorization(sensors: [.ambientLightSensor]) { [weak self] error in DispatchQueue.main.async { guard let self = self else { print("Permission request aborted") return } if let error = error { print("Permission request failed: \(error.localizedDescription)") } else { print("Permission request succeeded") self.startRecordingAmbientLightData() } } } } func checkAndRequestAuthorization() { let status = ambientReader.authorizationStatus switch status { case .authorized: print("Ambient light sensor access granted") startRecordingAmbientLightData() case .notDetermined: print("Ambient light sensor access undetermined, requesting permission") requestAuthorization() case .denied: print("Ambient light sensor access denied or restricted") @unknown default: print("Unknown authorization status") } } // MARK: - Ambient Light Data Logic func startRecordingAmbientLightData() { guard !isRecordingAmbientLight else { print("Already recording ambient light data.") return } print("Starting ambient light data recording") isRecordingAmbientLight = true ambientReader.startRecording() fetchAmbientLightData() fetchAmbientDeviceData() } func fetchAmbientLightData() { print("Fetching ambient light data") let request = SRFetchRequest() let now = Date() let fromTime = now.addingTimeInterval(-72 * 60 * 60) let toTime = now.addingTimeInterval(-25 * 60 * 60) request.from = SRAbsoluteTime(fromTime.timeIntervalSinceReferenceDate) request.to = SRAbsoluteTime(toTime.timeIntervalSinceReferenceDate) print("Fetch request: \(fromTime) ~ \(toTime)") ambientReader.fetch(request) } private func displayAmbientLightData(sample: SRAmbientLightSample) { print("Ambient light: \(sample.lux.value) lux") print("Current ambientLightData content:") for data in ambientLightData { print("Timestamp: \(data.timestamp), Lux: \(data.lux)") } } // MARK: - Device Data Logic private func fetchAmbientDeviceData() { print("Fetching device information") let request = SRFetchRequest() let now = Date() let fromDate = now.addingTimeInterval(-72 * 60 * 60) let toDate = now.addingTimeInterval(-24 * 60 * 60) request.from = SRAbsoluteTime(fromDate.timeIntervalSinceReferenceDate) request.to = SRAbsoluteTime(toDate.timeIntervalSinceReferenceDate) if availableDevices.isEmpty { print("No devices available") ambientReader.fetchDevices() } else { for device in availableDevices { print("Starting data fetch (Device: \(device))") request.device = device ambientReader.fetch(request) print("Fetch request sent (Device: \(device))") } } } // MARK: - SRSensorReaderDelegate Methods func sensorReader(_ reader: SRSensorReader, didFetch devices: [SRDevice]) { availableDevices = devices for device in devices { print("Fetched device: \(device)") } if !devices.isEmpty { fetchAmbientDeviceData() } } func sensorReader(_ reader: SRSensorReader, fetching fetchRequest: SRFetchRequest, didFetchResult result: SRFetchResult<AnyObject>) -> Bool { print("sensorReader(_:fetching:didFetchResult:) method called") if let ambientSample = result.sample as? SRAmbientLightSample { let luxValue = ambientSample.lux.value let timestamp = Date(timeIntervalSinceReferenceDate: result.timestamp.rawValue) // Check for duplicate data and add it if !ambientLightData.contains(where: { $0.timestamp == timestamp }) { let dataPoint = AmbientLightDataPoint(timestamp: timestamp, lux: Float(luxValue)) ambientLightData.append(dataPoint) print("Added ambient light data: \(luxValue) lux, Timestamp: \(timestamp)") } else { print("Duplicate data, not adding: Timestamp: \(timestamp)") } // Output data self.displayAmbientLightData(sample: ambientSample) } return true } func sensorReader(_ reader: SRSensorReader, didCompleteFetch fetchRequest: SRFetchRequest) { print("Data fetch complete") if ambientLightData.isEmpty { print("No ambient light data within 24 hours.") } else { print("ambientLightData updated") for dataPoint in ambientLightData { print("Added ambient light data: \(dataPoint.lux) lux, Timestamp: \(dataPoint.timestamp)") } } } }
1
0
834
3w
SensorKit: didFetchResult not being called
Hello, I have an app for a research study that has been approved and authorized to use SensorKit. All my permissions, entitlements and authorizations are in order, but I still can't get any data. The didFetchResult is not being called even though didCompleteFetch is called. I have waited for over 24 hours, but it still returns no samples. Please, I would appreciate any help on this issue. Thank you func sensorReader( _ reader: SRSensorReader, fetchingRequest: SRFetchRequest, didFetchResult result: SRFetchResult<AnyObject> ) { receivedResultsInCurrentFetch = true print("✅ SensorKit fetch result received for: \(sensorKey)") AppLogger.shared.log("SensorKit fetch result received for \(sensorKey)") if let sample = result.sample as? T { print("✅ SensorKit sample matched expected type for \(sensorKey): \(T.self)") AppLogger.shared.log("SensorKit sample matched expected type for \(sensorKey): \(T.self)") processSample(sample) } else { print("❌ SensorKit sample did not match expected type for \(sensorKey): \(T.self)") AppLogger.shared.log("SensorKit sample did not match expected type for \(sensorKey): \(T.self)") } } func sensorReader(_ reader: SRSensorReader, didCompleteFetch request: SRFetchRequest) { if receivedResultsInCurrentFetch, let lastRequestedUpperBound { session.setSensorKitLastFetchTime(lastRequestedUpperBound, for: sensorKey) print("✅ SensorKit fetch completed with samples for \(sensorKey). Checkpoint updated.") } else { print("⚠️ SensorKit fetch completed for \(sensorKey) with no samples.") AppLogger.shared.log("SensorKit fetch completed for \(sensorKey) with no samples. Keeping previous checkpoint so delayed SensorKit data is not skipped.") } isFetchInFlight = false completePendingFetches(success: true) print("✅ SensorKit fetch completed for: \(sensorKey)") AppLogger.shared.log("Fetch request completed for sensor type: \(T.self)") }
1
0
346
3w
What is supposed to be listed in the Extensions list for File Providers?
In the System Settings > General > Login Items & Extensions - Extensions pane, when I select the By App tab, I can see multiple instances of extensions for different applications and sub-types. e.g. Books (from Apple) is listed twice with the Sharing subtype. For the specific extension I'm checking, I can see multiple instances listed for the File Provider sub-type. The number of instances does not seem to correspond to anything. There are 5 instances listed and it seems like these are not exact duplicates because when I disable one using the (i) dialog, the others are still enabled. This number (5) corresponds to nothing obvious: at one time, there is only 1 instance of the File Provider (a Finder Extension) installed. if I use the pluginkit command line tool to list the extensions, it only reports 3 known versions of this extension. As a developer I'm puzzled by this list with duplicates. As an end user, I'm totally puzzled by this list with duplicates. macOS Tahoe 26.5 (25F71) [Q] What is this list in the Login Items & Extensions pane supposed to represent? Is it known to be buggy when it comes to its contents?
1
0
260
3w
provider(_:didActivate:) callback intermittently not triggered, causing widespread audio loss for users
Hi everyone, I am facing a critical issue where the CallKit provider delegate method provider(_:didActivate:) is intermittently not triggered. This occasionally results in a total loss of audio during some VoIP calls, while other calls work perfectly fine. Here is the sequence of steps I am currently implementing: Report Incoming Call: The app receives a VoIP push notification and reports the call using reportNewIncomingCall(with:update:completion:). Answer Action: The user taps the answer button, and the app processes the CXAnswerCallAction. Configure Audio Session: Inside the provider delegate, I configure the AVAudioSession category and mode (e.g., setting category to .playAndRecord and mode to .voiceChat). Note: As per Apple's guidelines, I do not call setActive(true) manually, expecting CallKit to activate it automatically. Despite following this standard flow, there are times when provider(_:didActivate:) is skipped entirely, meaning the audio engine fails to initialize for that specific call session. We are currently receiving a large volume of user complaints regarding this issue, as it heavily impacts the core calling experience in production. Could an Apple engineer or anyone from the community look into this? Any insights into what might be causing CallKit to occasionally fail to activate the audio session or how to work around this would be highly appreciated. Thank you!
4
0
540
3w
Using main.swift entry point for iOS, iPadOS and tvOS platforms
The context is partially expressed in an earlier post. In summary: There is an iOS App target that contains minimal code, only to load a Framework explicitly at runtime using dlopen and dlsym, instead of the usual load-time imports in Apple platforms. For iOS app (C++ (primary) and Swift), the entry point is a UIApplicationDelegate conformer class - AppDelegate, marked with @main. But the problem is, the AppDelegate class cannot remain in the App target, which has barely any logic. The App target is a thin loader. The AppDelegate contains some methods such as application(_:didRegisterForRemoteNotificationsWithDeviceToken:) that needs some logical processing, which is not present in the App target. Instead of using dlsym (to hand over to the Framework) for every AppDelegate event that doesn't have a broadcast notification, the thought was to move the AppDelegate class into the Framework, and the entry point in App target is now main.swift. This keeps the Framework clean and minimal with the following steps: Interop to C++ Explicitly loading the MachO binary inside the Framework using dlopen Loading the symbol using dlsym Invoking the Framework entry point Then, the Framework entry point in C++ creates the UIApplication class and the UIApplicationDelegate using UIApplicationMain(_:_:_:_:) method, which doesn't return as it transfers control to the UIApplicationDelegate. This is against the recommended @main entry point, but based on research, @main seems like syntactic sugar to avoid writing boilerplate code. But in my case, which needs to avoid instantiating the UIApplicationDelegate in the App target, using main.swift, even for an iOS app, is the best fit. I understand that main thread has to be returned back to the OS asap for processing user events etc., and the intent is to not execute the entire startup logic of the app in main thread. Wanted to confirm if this approach of using main.swift entry point is valid for iOS, iPadOS and tvOS apps too and in which case, these flows can converge to macOS, which is already using main.swift approach.
3
0
477
3w
CMWaterSubmersionManager returns CMErrorDomain code 105
Dear All, I am developing a watchOS app for Apple Watch Ultra that needs to use the Apple depth / water submersion APIs with the entitlement. The app is configured with the shallow depth and pressure entitlement right now, and I have verified that the entitlement is present both in the signed Watch app and in the embedded provisioning profile. App configuration: Platform: watchOS Device: Apple Watch Ultra Entitlement used: com.apple.developer.submerged-shallow-depth-and-pressure = true Info.plist contains: WKSupportsAutomaticDepthLaunch = true WKBackgroundModes includes underwater-depth I verified the built Watch app with: codesign -d --entitlements :- /path/to/WatchApp.app The output contains: com.apple.developer.submerged-shallow-depth-and-pressure I also verified the embedded provisioning profile with: security cms -D -i /path/to/WatchApp.app/embedded.mobileprovision The embedded profile also contains: com.apple.developer.submerged-shallow-depth-and-pressure The built Watch app Info.plist also confirms: WKSupportsAutomaticDepthLaunch = true WKBackgroundModes includes underwater-depth At runtime, my diagnostics show: Requested source: Automatic or Apple Sensor Runtime source: Automatic / Apple Sensor Capability resolved by the app: Shallow Resolved provider: Apple Sensor — Shallow Sample source: Apple Shallow CMWaterSubmersionManager.waterSubmersionAvailable: true Depth automation: available Provider start is called First provider event is received Submersion state: unknown No submersion event is received No depth measurement is received No temperature sample is received Provider state: error Raw error: Domain: CMErrorDomain Code: 105 Description: The operation couldn’t be completed. The relevant runtime failure is: CMErrorDomain 105 The app also does not appear in: Apple Watch Settings → General → Auto-Launch → When Submerged This is the key point that I cannot clarify from the documentation. My questions are: Is the entitlement com.apple.developer.submerged-shallow-depth-and-pressure sufficient for a watchOS app to appear in: Apple Watch Settings → General → Auto-Launch → When Submerged? Is the shallow depth entitlement sufficient to receive runtime events from CMWaterSubmersionManager, including submersion and depth measurements? Or is the full submerged depth entitlement required for: appearing in the “When Submerged” auto-launch list; receiving CMWaterSubmersionManager submersion events; receiving CMWaterSubmersionManager depth measurements? What does CMErrorDomain code 105 mean in the context of CMWaterSubmersionManager? If the shallow entitlement is sufficient, what other conditions could cause CMWaterSubmersionManager to return CMErrorDomain 105 before delivering any submersion or depth samples? To summarize: The shallow entitlement is present in the source entitlements file. The shallow entitlement is present in the signed Watch app. The shallow entitlement is present in the embedded provisioning profile. The built Info.plist contains WKSupportsAutomaticDepthLaunch = true. The built Info.plist contains WKBackgroundModes = underwater-depth. CMWaterSubmersionManager.waterSubmersionAvailable returns true. The app does not appear in the Watch “When Submerged” list. CMWaterSubmersionManager fails with CMErrorDomain 105 before delivering submersion/depth samples. Any help will be strongly appreciated. Thank you.
0
0
255
3w
I want to measure the time my smartphone has been turned off.
These days, we live our lives completely surrounded by and immersed in smartphones. It seems there isn't a single person among us who isn't. This is because we can find all kinds of information, meet friends, and enjoy our leisure time on our smartphones. However, there is one thing we are overlooking. It is the emotion you will feel toward the people around you as you die on the day you come to pass away. What is that emotion? It is regret. That regret is likely the longing to enjoy physical intimacy, conversation, travel, and everyday life more. That is why I am developing an app with a special feature. I am developing an app that helps users self-regulate and maintain moderation in their smartphone usage—something we are addicted to and love so much, yet often fail to realize that it is poison. This app is designed to encourage mutual moderation and provide rewards. Ironically, this app is designed to operate on the smartphone itself. The reason is that if the smartphone is a tiger's den, then to catch the tiger, one must enter the tiger's den. While conceptualizing and proceeding with development, I encountered a completely insurmountable wall. This is because the iPhone cannot accurately measure the screen-off time. I earnestly hope that if there is a team or developer working on the iPhone framework, you can resolve this issue. If you can extend the extension or take measures to allow access to that data within the SDK, I believe I will be able to complete this app. I look forward to your help.
0
0
232
3w
WeatherKit REST API returns 401 NOT_ENABLED although App ID and Key are enabled
Title: WeatherKit REST API returns 401 NOT_ENABLED although App ID and WeatherKit key are enabled Body: I am integrating WeatherKit REST API for an iOS app, but every request returns: HTTP 401 {"reason":"NOT_ENABLED"} Configuration summary: The App ID has WeatherKit enabled in App Services. The App ID also has WeatherKit enabled in Capabilities. The WeatherKit key shows WeatherKit enabled in the Keys page. A Service ID has been created. The backend generates an ES256 JWT using the .p8 private key. The decoded JWT header and payload have been verified. I have redacted the actual Team ID, Key ID, Bundle ID, and Service ID here for security reasons. Test A: JWT header.id = TEAM_ID.SERVICE_ID JWT payload.iss = TEAM_ID JWT payload.sub = SERVICE_ID kid = WEATHERKIT_KEY_ID exp - iat = 3600 seconds Result: HTTP 401 {"reason":"NOT_ENABLED"} Test B: JWT header.id = TEAM_ID.BUNDLE_ID JWT payload.iss = TEAM_ID JWT payload.sub = BUNDLE_ID kid = WEATHERKIT_KEY_ID exp - iat = 3600 seconds Result: HTTP 401 {"reason":"NOT_ENABLED"} Since Apple returns NOT_ENABLED instead of INVALID_AUTH_TOKEN, the JWT appears to be structurally accepted, but WeatherKit is not enabled for the authenticated identifier/key combination. Questions: For WeatherKit REST API, should the JWT sub claim use the Service ID or the App Bundle ID? What exactly causes HTTP 401 NOT_ENABLED? Is there any additional WeatherKit REST API enablement required besides enabling WeatherKit on the App ID and creating a WeatherKit key? Could this be an account-side entitlement propagation issue?
1
0
242
4w
Changing extension name of the Framework bundle
I'm working on a suite of apps supporting macOS, iOS and iPadOS (potentially tvOS, watchOS and visionOS in the future). Each of these App targets contain minimal code to only load the framework dynamically instead of the recommended load-time imports for Apple platforms. The rationales for runtime loading of framework (using dlopen and dlsym) is expressed in earlier post - fyi. Each app can load multiple frameworks at runtime. Instead of naming the frameworks like this - AppName_purpose1.framework, AppName_purpose2.framework, AppName_purpose3.framework, can it be named as AppName.purpose1, AppName.purpose2, AppName.purpose3 etc? Basically, change the Framework bundle extension name from .framework to a custom name based on purpose. The folder's extension name is changed, but it's still a framework bundle. The advantage of this approach is, in my project, Frameworks belonging to each of the apps cleanly distinguish themselves with a concise name. While this post is about Apple platforms, I'm also checking if other platforms allow to change the names of dynamic libraries (windows allows change). Using my custom extension can standardize the dynamic library's extension name across all platforms. Easy framework name construction - The Framework name is now the same as the App bundle name, which can be queried and this string can be appended with an appropriate extension to load all the Frameworks. Is it possible to change the extension name of the Framework bundle from the default .framework? If yes, how?
3
0
447
Jul ’26
Using wildcard for applinks in iOS stopped working
Hi everyone, I've been working on an application that provides different subdomains for different customers, so we need to support app linking with all of them. However, using wildcard notation like applinks:*.domain.com doesn't work, while hardcoding applinks:subdomain.domain.com works fine. The association file is being served from both the main domain and subdomains. It used to work fine about a month ago, and I can't find any recent breaking changes on Apple's side . Any ideas why this could happen. ?
4
0
1.1k
Jul ’26
Applinks for any subdomain not opening the app
My Entitlements file contains the following (removed some non related entries): <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>com.apple.developer.associated-domains</key> <array> <string>webcredentials:app.mydomain.org</string> <string>applinks:*.mydomain.org</string> </array> </dict> </plist> Now when I tap on a link such as abc.mydomain.org, the app is not opened. If I change the generic applinks key from *.mydomain.org to a specific domain, this works correctly and it opens the app as expected. (This makes me think the website part of the AASA file is correct). Since I need to support a lot of subdomains (think about hundreds in the near future), I really need the wildcard to work. Do you have any tips on how to make this work?
1
0
417
Jul ’26
AASA file on CDN not found more than one week
Last week our Universal Links stopped working. We made some changes and uploaded a new AASA file, but https://app-site-association.cdn-apple.com/a/v1/(domain) still returns 404 Not Found for all our domains. When I query directly from our server like domain/.well-known/apple-app-site-association, it returns 200 and the file is accessible. Could you help us resolve this issue? Our app relies on working Universal Links (deep links). Thank you!
1
0
356
Jul ’26
ODR Legacy Technology Issues
Hello, We are currently evaluating ways to reduce the app size of the my App. The app contains approximately 200~250 MB of bundled static resources, and we are considering converting these resources into On-Demand Resources(ODR) in order to reduce the initial download and installation size of the app. However, we noticed that ODR is currently marked by Apple as a Legacy Technology. Since we would like these resources to continue being hosted and distributed through Apple CDN / App Store infrastructure, the first alternative we considered is Managed Background Assets, rather than regular Background Assets. We understand that regular Background Assets are available on iOS 16 and later, but they mainly address background download scheduling for apps. What we are specifically looking for is the resource hosting and distribution capability, similar to ODR, where assets can be hosted and delivered through Apple’s infrastructure. This is why we are considering Managed Background Assets. However, my App currently supports devices starting from iOS 14, while the key capabilities of Managed Background Assets require newer iOS versions. As a result, this solution cannot fully cover users who are still on older iOS versions, such as iOS 14 through iOS 18. Given this background, we would like to ask Apple the following questions: Does Apple have any plan to discontinue ODR-related services in the future, especially the App Store-hosted ODR asset download service? If the ODR service is changed or discontinued in the future, would it affect already released App Store apps that rely on ODR asset downloads on older iOS versions? For apps that still need to support iOS 14 and later, while also relying on Apple CDN / App Store infrastructure for resource hosting and distribution, does Apple still recommend using ODR? For apps that cannot immediately raise their minimum supported iOS version to the version required by Managed Background Assets, is there a recommended transition strategy? If ODR services are discontinued in the future, will Apple provide an alternative resource distribution solution that supports older iOS versions, or would developers need to build and maintain their own resource hosting and download system? We would like to better understand the long-term availability and potential risks of using ODR on older iOS versions, so that we can make an appropriate decision for future app size reduction and asset delivery in the App. Thank you.
Replies
1
Boosts
0
Views
319
Activity
2w
Inquiry regarding MetricKit cpuExceptionDiagnostics timestamps, totalSampledTime, and app status
Dear Apple Developer Support Team, I am writing to seek clarification on the timeline behavior and app status associated with the MetricKit cpuExceptionDiagnostics payload. In a recent diagnostic log collected from production, we observed the following values: timeStampBegin: "2026-07-07 10:37:00" timeStampEnd: "2026-07-07 10:37:00" totalSampledTime: "168 sec" Since both timeStampBegin and timeStampEnd share the exact same second (10:37:00), but the totalSampledTime indicates a continuous sampling duration of 168 seconds, we are having trouble accurately correlating this incident with our internal server logs. Could you please clarify the following questions: What exactly does the timestamp "2026-07-07 10:37:00" represent? Is it the sampling start time, the sampling end time, or the moment the diagnostic log was generated/written by the system? If "2026-07-07 10:37:00" represents the log generation time (or the moment the exception was triggered), how should we determine the actual start and end times of the 168-second sampling window? For instance, does it mean the sampling occurred strictly before this timestamp (from 10:34:12 to 10:37:00), or is there a different calculation method? Does a cpuExceptionDiagnostics event imply that the app crashed or was terminated by the OS? Or is it merely a non-fatal telemetry log capturing heavy CPU usage/resource limit violations while the app remained running? Understanding the precise timeline and lifecycle impact of MetricKit diagnostics is crucial for us to correlate client-side resource issues with backend performance and user activities. Thank you for your time and guidance. Best regards
Replies
0
Boosts
0
Views
240
Activity
3w
ShareLink with custom UT type not opening in my app
Hey all, my first time posting on these forums as I've finally become completely stumped. I'm working to implement a ShareLink to share data between users on my app, and have gotten pretty far (file saves, sends correctly), but am having significant issues getting the link to open in my app when sharing by email and not getting any action at all when tapping a shared link in iMessage. I'll go through my setup below: I have declared my new UTType, and created my new model which conforms to transferable here: struct transferTemplate: Codable { var id: UUID = UUID() var name: String = "TempName" var words: [String] = ["word1","word2"] } extension transferTemplate: Transferable { static var transferRepresentation: some TransferRepresentation { CodableRepresentation(contentType: .oltemplate) } } extension UTType { static var oltemplate: UTType { UTType(exportedAs: "com.overloadapp.oltemplate") } } I have declared the document type in my info.plist: <key>CFBundleDocumentTypes</key> <array> <dict> <key>CFBundleTypeName</key> <string>Template Session</string> <key>LSHandlerRank</key> <string>Owner</string> <key>LSItemContentTypes</key> <array> <string>com.overloadapp.oltemplate</string> </array> </dict> </array> I have declared the Exported Type Identifier: <key>UTExportedTypeDeclarations</key> <array> <dict> <key>UTTypeConformsTo</key> <array> <string>public.json</string> </array> <key>UTTypeDescription</key> <string>Template Session</string> <key>UTTypeIconFiles</key> <array/> <key>UTTypeIdentifier</key> <string>com.overloadapp.oltemplate</string> <key>UTTypeTagSpecification</key> <dict> <key>public.filename-extension</key> <array> <string>oltemplate</string> </array> <key>public.mime-type</key> <array> <string>application/json</string> </array> </dict> </dict> </array> I've also included the "LSSupportsOpeningDocumentsInPlace" boolean to True in the PLIST. My physical ShareLink setup is: @State private var transferred: transferTemplate = transferTemplate(name: "NameTemplate", words: ["One","Two"]) ... ShareLink(item: transferred, preview: SharePreview("Share your template", image: Image("tanLogo"))) Heres where the above code gets you: ShareLink brings up the share sheet and allows you to send the file (with the .oltemplate file extension). Sharing via iMessage will send a file, but within iMessage, the file cannot be opened at all. By email, the file can be opened but does not show any information. If you open the ShareSheet within the email attachment, you can manually choose to open the file in my app. If the file is saved to "Files", it will open my app when it is tapped (work as intended). Heres what I have tried to fix this: Modifying the Exported File Type "Conforms to" value. Ive used public.data, public.text, public.json. Including and not including the mime type I've scoured forums trying to solve this issue, and it doesn't seem like there is a clear cut solution for this issue. I appreciate any help you can provide! Please let me know if I can include any more helpful information.
Replies
1
Boosts
1
Views
1.5k
Activity
3w
Swift thread continuation crash when calling isEligibleForAgeFeatures
Hi, We’ve been observing crashes when calling “try await DeclaredAgeRange.AgeRangeService.shared.isEligibleForAgeFeatures”. Our crash logs show a “suspend resume partial function” crash from libswift_Concurrency.dylib swift::runJobInEstablishedExecutorContext. Based on our analysis, this is because once Apple’s eligibility check completes, it attempts to resume the Swift task continuation directly on its own internal background thread instead of yielding back to the Swift cooperative thread pool. Because the caller task inherits @MainActor isolation (due to a UIViewController being passed into our pipeline further up as it’s needed for requestAgeRange), the Swift runtime crashes when trying to reconcile the @MainActor context on Apple's foreign background thread. Has anyone encountered this and found a fix, and is this a known issue? Thanks!
Replies
1
Boosts
0
Views
232
Activity
3w
[iOS 17.1.1 issue] MSMessageLiveLayout not rendering after MSMessagesAppViewController.willBecomeActive in iOS 17.1.1
Hello dear community, I have an iMessage extension running perfectly on iOS 16.4, but on 17.0.1 and 17.1.1 it's having real issues. Messaging in iMessage on the iOS 17.0.1 simulator isn't working at all. MSMessageLiveLayout works perfectly on iOS 16.4, but on iOS 17.1.1 (physical iPhone 15, 14, 13, 12, SE 2020) the MSMessagesAppViewController won't render after didStartSending and subsequent willBecomeActive. The iPhones will just show "Loading...". I debugged through it, couldn't find any issues and works perfectly fine on iOS 16.4 both in the simulator and on a physical device. I'm debugging through the physical devices with XCode, but couldn't find any root cause on why. Has anyone experienced similar issues with MSMessagesAppViewController in iOS 17.1.1? Any ideas on how to fix this? Thanks, Jan
Replies
3
Boosts
1
Views
889
Activity
3w
Spotlight on finds title attribute (OS27 b3)
Hi, it seems that something in OS27b3 changed regarding Core Spotlight: Whatever I try, Siri and Spotlight only seem to find the text inside the title or displayName attribute. But attributes like textContent or contentDescription or keywords seem to be ignored. Those attributes are still found, when I do a manual search using CSUserQuery or using the AppEntityDefinition.spotlightQuery(_:) in App Intent Testing. I have already filed a Feedback – but wonder whether anyone else is having this issue? FB23635795 Thanks, Friedrich
Replies
2
Boosts
0
Views
304
Activity
3w
App Group data sharing does not work sometimes between HostApp and Service extension.
Hi There, My app is a legacy project built with Objective C. The host app shared data with the service extension by using NSUserDefaults *userDefault = [[NSUserDefaults alloc] initWithSuiteName:@"group.com.myapp.project"]; and it worked until a customer recently reported a bug (iOS 18.6). After debugging, I found that data sharing from the host app to the service extension was not working correctly. The host app updated a field's value, but the service still used the old or stale value, causing the issue. HostApp saved info 2026-06-01 13:44:07.020 [INFO] (VMP)(ThreadID: 0x10a85c000): "Saved Vomo information { "EXT_AP_IP" = 1c28af0f9d73; "EXT_PING_DND" = 0; "EXT_PING_USER_NAME" = aaa08AA541F8; "EXT_SERIAL_ACK_TIME" = "2026-06-01 20:44:07 +0000"; "EXT_SERIAL_NO" = 689; "EXT_SERVER_NAME" = "10.xxx.xxx.182"; "EXT_VOICE_LOGIN" = 1; }" Service extension read value: 2026-06-01 13:46:09.678 [INFO] (VMP) - (EXTENSION)(ThreadID: 0x1050a41d0): "start Vomo with Server: [10.xxx.xxx.79] and userName [aaa08AA541F8]" I can see the value shared from host app is: 10.xxx.xxx.182, but service extension still took the stale value 10.xxx.xxx.79 First I thought it is synchronized issue, however, apple deprecated those API, CFPreferencesAppSynchronize((__bridge CFStringRef)@"group.com.myexample.project"); How to ensure the shared value successfully delivered to service extension? Thanks.
Replies
5
Boosts
0
Views
372
Activity
3w
Does an opt-in leaderboard using an abstracted on-device score comply with DPLA 3.3.3(P)?
I am the developer of a screen time awareness app currently on the App Store. It uses the Family Controls and DeviceActivity frameworks, with the distribution entitlement approved, to show users their own cumulative screen time since install. All tracking today is fully on-device and nothing leaves the user's phone. I am planning an optional social feature and I want to confirm Apple's position before building it, because I want to stay clearly within the Developer Program License Agreement, specifically Section 3.3.3(P) regarding data received through the Family Controls framework. Here is how the feature would work: The app monitors the user's own device activity via DeviceActivityMonitor threshold events. This is the same mechanism the app already uses for its on-device counter. On-device, that counter is converted into an abstracted, gamified score. The score is not expressed in hours, minutes, or any unit of time, and the app never displays it as time. If, and only if, the user opts in to the feature, the app uploads a self-chosen username, the date the user's count began, and the user's abstracted score values to my backend. Score values may be computed over different time windows, for example a lifetime score alongside daily, weekly, or monthly scores, but they are all the same abstraction: no raw time totals, no per-app or per-category data, no contacts, and no identifiers beyond what the account itself requires. Friends who have mutually opted in see each other's usernames and scores on a leaderboard. The app never displays another person's screen time, and no time values are stored server-side. The feature is off by default, data is encrypted in transit and at rest, and users can delete their account and all associated data from within the app at any time. The privacy policy will disclose all of this. My question: does transmitting this opt-in, abstracted score, derived on-device from DeviceActivity threshold events, comply with DPLA Section 3.3.3(P) and the intended use of the Family Controls framework? If this specific design is not acceptable, is there any form of opt-in social comparison feature that would be, and what constraints would it need to satisfy? I am aware of earlier threads here where sending screen time data off-device was flagged as non-conforming, which is exactly why I am asking before writing any code rather than after. I would rather design this correctly from the start than risk a rejection later. Thank you for your time. Happy to provide any additional detail about the design.
Replies
0
Boosts
0
Views
212
Activity
3w
Problems with SensorKit data calls
The Deligate 'didFetchResult' method of fetching data past 24 hours from SensorKit is not being called. It is confirmed that you have already granted full access to the SensorKit and that data on the Ambient value in the device's personal information -> research sensor & usage data are recorded. It is possible to export to an lz4 file. I want to have the data after 24 hours called to the app, but other Deligate methods are called, but only Deligate that gets the illumination value is not called. Is it understood that only data past 24 hours can be imported after startRecoding() is called? If so, in order to receive data past 24 hours, do I have to continue to receive the illumination data value in the background for more than 24 hours to receive the Ambient value afterwards? import Foundation import SensorKit import UIKit final class SensorKitManager: NSObject, ObservableObject, SRSensorReaderDelegate { static let shared = SensorKitManager() private let ambientReader = SRSensorReader(sensor: .ambientLightSensor) var availableDevices: [SRDevice] = [] @Published var ambientLightData: [AmbientLightDataPoint] = [] var isFetching = false var isRecordingAmbientLight = false private override init() { super.init() setupReaders() checkAndRequestAuthorization() } private func setupReaders() { ambientReader.delegate = self } // MARK: - Permission Request func requestAuthorization() { SRSensorReader.requestAuthorization(sensors: [.ambientLightSensor]) { [weak self] error in DispatchQueue.main.async { guard let self = self else { print("Permission request aborted") return } if let error = error { print("Permission request failed: \(error.localizedDescription)") } else { print("Permission request succeeded") self.startRecordingAmbientLightData() } } } } func checkAndRequestAuthorization() { let status = ambientReader.authorizationStatus switch status { case .authorized: print("Ambient light sensor access granted") startRecordingAmbientLightData() case .notDetermined: print("Ambient light sensor access undetermined, requesting permission") requestAuthorization() case .denied: print("Ambient light sensor access denied or restricted") @unknown default: print("Unknown authorization status") } } // MARK: - Ambient Light Data Logic func startRecordingAmbientLightData() { guard !isRecordingAmbientLight else { print("Already recording ambient light data.") return } print("Starting ambient light data recording") isRecordingAmbientLight = true ambientReader.startRecording() fetchAmbientLightData() fetchAmbientDeviceData() } func fetchAmbientLightData() { print("Fetching ambient light data") let request = SRFetchRequest() let now = Date() let fromTime = now.addingTimeInterval(-72 * 60 * 60) let toTime = now.addingTimeInterval(-25 * 60 * 60) request.from = SRAbsoluteTime(fromTime.timeIntervalSinceReferenceDate) request.to = SRAbsoluteTime(toTime.timeIntervalSinceReferenceDate) print("Fetch request: \(fromTime) ~ \(toTime)") ambientReader.fetch(request) } private func displayAmbientLightData(sample: SRAmbientLightSample) { print("Ambient light: \(sample.lux.value) lux") print("Current ambientLightData content:") for data in ambientLightData { print("Timestamp: \(data.timestamp), Lux: \(data.lux)") } } // MARK: - Device Data Logic private func fetchAmbientDeviceData() { print("Fetching device information") let request = SRFetchRequest() let now = Date() let fromDate = now.addingTimeInterval(-72 * 60 * 60) let toDate = now.addingTimeInterval(-24 * 60 * 60) request.from = SRAbsoluteTime(fromDate.timeIntervalSinceReferenceDate) request.to = SRAbsoluteTime(toDate.timeIntervalSinceReferenceDate) if availableDevices.isEmpty { print("No devices available") ambientReader.fetchDevices() } else { for device in availableDevices { print("Starting data fetch (Device: \(device))") request.device = device ambientReader.fetch(request) print("Fetch request sent (Device: \(device))") } } } // MARK: - SRSensorReaderDelegate Methods func sensorReader(_ reader: SRSensorReader, didFetch devices: [SRDevice]) { availableDevices = devices for device in devices { print("Fetched device: \(device)") } if !devices.isEmpty { fetchAmbientDeviceData() } } func sensorReader(_ reader: SRSensorReader, fetching fetchRequest: SRFetchRequest, didFetchResult result: SRFetchResult<AnyObject>) -> Bool { print("sensorReader(_:fetching:didFetchResult:) method called") if let ambientSample = result.sample as? SRAmbientLightSample { let luxValue = ambientSample.lux.value let timestamp = Date(timeIntervalSinceReferenceDate: result.timestamp.rawValue) // Check for duplicate data and add it if !ambientLightData.contains(where: { $0.timestamp == timestamp }) { let dataPoint = AmbientLightDataPoint(timestamp: timestamp, lux: Float(luxValue)) ambientLightData.append(dataPoint) print("Added ambient light data: \(luxValue) lux, Timestamp: \(timestamp)") } else { print("Duplicate data, not adding: Timestamp: \(timestamp)") } // Output data self.displayAmbientLightData(sample: ambientSample) } return true } func sensorReader(_ reader: SRSensorReader, didCompleteFetch fetchRequest: SRFetchRequest) { print("Data fetch complete") if ambientLightData.isEmpty { print("No ambient light data within 24 hours.") } else { print("ambientLightData updated") for dataPoint in ambientLightData { print("Added ambient light data: \(dataPoint.lux) lux, Timestamp: \(dataPoint.timestamp)") } } } }
Replies
1
Boosts
0
Views
834
Activity
3w
SensorKit: didFetchResult not being called
Hello, I have an app for a research study that has been approved and authorized to use SensorKit. All my permissions, entitlements and authorizations are in order, but I still can't get any data. The didFetchResult is not being called even though didCompleteFetch is called. I have waited for over 24 hours, but it still returns no samples. Please, I would appreciate any help on this issue. Thank you func sensorReader( _ reader: SRSensorReader, fetchingRequest: SRFetchRequest, didFetchResult result: SRFetchResult<AnyObject> ) { receivedResultsInCurrentFetch = true print("✅ SensorKit fetch result received for: \(sensorKey)") AppLogger.shared.log("SensorKit fetch result received for \(sensorKey)") if let sample = result.sample as? T { print("✅ SensorKit sample matched expected type for \(sensorKey): \(T.self)") AppLogger.shared.log("SensorKit sample matched expected type for \(sensorKey): \(T.self)") processSample(sample) } else { print("❌ SensorKit sample did not match expected type for \(sensorKey): \(T.self)") AppLogger.shared.log("SensorKit sample did not match expected type for \(sensorKey): \(T.self)") } } func sensorReader(_ reader: SRSensorReader, didCompleteFetch request: SRFetchRequest) { if receivedResultsInCurrentFetch, let lastRequestedUpperBound { session.setSensorKitLastFetchTime(lastRequestedUpperBound, for: sensorKey) print("✅ SensorKit fetch completed with samples for \(sensorKey). Checkpoint updated.") } else { print("⚠️ SensorKit fetch completed for \(sensorKey) with no samples.") AppLogger.shared.log("SensorKit fetch completed for \(sensorKey) with no samples. Keeping previous checkpoint so delayed SensorKit data is not skipped.") } isFetchInFlight = false completePendingFetches(success: true) print("✅ SensorKit fetch completed for: \(sensorKey)") AppLogger.shared.log("Fetch request completed for sensor type: \(T.self)") }
Replies
1
Boosts
0
Views
346
Activity
3w
What is supposed to be listed in the Extensions list for File Providers?
In the System Settings > General > Login Items & Extensions - Extensions pane, when I select the By App tab, I can see multiple instances of extensions for different applications and sub-types. e.g. Books (from Apple) is listed twice with the Sharing subtype. For the specific extension I'm checking, I can see multiple instances listed for the File Provider sub-type. The number of instances does not seem to correspond to anything. There are 5 instances listed and it seems like these are not exact duplicates because when I disable one using the (i) dialog, the others are still enabled. This number (5) corresponds to nothing obvious: at one time, there is only 1 instance of the File Provider (a Finder Extension) installed. if I use the pluginkit command line tool to list the extensions, it only reports 3 known versions of this extension. As a developer I'm puzzled by this list with duplicates. As an end user, I'm totally puzzled by this list with duplicates. macOS Tahoe 26.5 (25F71) [Q] What is this list in the Login Items & Extensions pane supposed to represent? Is it known to be buggy when it comes to its contents?
Replies
1
Boosts
0
Views
260
Activity
3w
provider(_:didActivate:) callback intermittently not triggered, causing widespread audio loss for users
Hi everyone, I am facing a critical issue where the CallKit provider delegate method provider(_:didActivate:) is intermittently not triggered. This occasionally results in a total loss of audio during some VoIP calls, while other calls work perfectly fine. Here is the sequence of steps I am currently implementing: Report Incoming Call: The app receives a VoIP push notification and reports the call using reportNewIncomingCall(with:update:completion:). Answer Action: The user taps the answer button, and the app processes the CXAnswerCallAction. Configure Audio Session: Inside the provider delegate, I configure the AVAudioSession category and mode (e.g., setting category to .playAndRecord and mode to .voiceChat). Note: As per Apple's guidelines, I do not call setActive(true) manually, expecting CallKit to activate it automatically. Despite following this standard flow, there are times when provider(_:didActivate:) is skipped entirely, meaning the audio engine fails to initialize for that specific call session. We are currently receiving a large volume of user complaints regarding this issue, as it heavily impacts the core calling experience in production. Could an Apple engineer or anyone from the community look into this? Any insights into what might be causing CallKit to occasionally fail to activate the audio session or how to work around this would be highly appreciated. Thank you!
Replies
4
Boosts
0
Views
540
Activity
3w
Using main.swift entry point for iOS, iPadOS and tvOS platforms
The context is partially expressed in an earlier post. In summary: There is an iOS App target that contains minimal code, only to load a Framework explicitly at runtime using dlopen and dlsym, instead of the usual load-time imports in Apple platforms. For iOS app (C++ (primary) and Swift), the entry point is a UIApplicationDelegate conformer class - AppDelegate, marked with @main. But the problem is, the AppDelegate class cannot remain in the App target, which has barely any logic. The App target is a thin loader. The AppDelegate contains some methods such as application(_:didRegisterForRemoteNotificationsWithDeviceToken:) that needs some logical processing, which is not present in the App target. Instead of using dlsym (to hand over to the Framework) for every AppDelegate event that doesn't have a broadcast notification, the thought was to move the AppDelegate class into the Framework, and the entry point in App target is now main.swift. This keeps the Framework clean and minimal with the following steps: Interop to C++ Explicitly loading the MachO binary inside the Framework using dlopen Loading the symbol using dlsym Invoking the Framework entry point Then, the Framework entry point in C++ creates the UIApplication class and the UIApplicationDelegate using UIApplicationMain(_:_:_:_:) method, which doesn't return as it transfers control to the UIApplicationDelegate. This is against the recommended @main entry point, but based on research, @main seems like syntactic sugar to avoid writing boilerplate code. But in my case, which needs to avoid instantiating the UIApplicationDelegate in the App target, using main.swift, even for an iOS app, is the best fit. I understand that main thread has to be returned back to the OS asap for processing user events etc., and the intent is to not execute the entire startup logic of the app in main thread. Wanted to confirm if this approach of using main.swift entry point is valid for iOS, iPadOS and tvOS apps too and in which case, these flows can converge to macOS, which is already using main.swift approach.
Replies
3
Boosts
0
Views
477
Activity
3w
CMWaterSubmersionManager returns CMErrorDomain code 105
Dear All, I am developing a watchOS app for Apple Watch Ultra that needs to use the Apple depth / water submersion APIs with the entitlement. The app is configured with the shallow depth and pressure entitlement right now, and I have verified that the entitlement is present both in the signed Watch app and in the embedded provisioning profile. App configuration: Platform: watchOS Device: Apple Watch Ultra Entitlement used: com.apple.developer.submerged-shallow-depth-and-pressure = true Info.plist contains: WKSupportsAutomaticDepthLaunch = true WKBackgroundModes includes underwater-depth I verified the built Watch app with: codesign -d --entitlements :- /path/to/WatchApp.app The output contains: com.apple.developer.submerged-shallow-depth-and-pressure I also verified the embedded provisioning profile with: security cms -D -i /path/to/WatchApp.app/embedded.mobileprovision The embedded profile also contains: com.apple.developer.submerged-shallow-depth-and-pressure The built Watch app Info.plist also confirms: WKSupportsAutomaticDepthLaunch = true WKBackgroundModes includes underwater-depth At runtime, my diagnostics show: Requested source: Automatic or Apple Sensor Runtime source: Automatic / Apple Sensor Capability resolved by the app: Shallow Resolved provider: Apple Sensor — Shallow Sample source: Apple Shallow CMWaterSubmersionManager.waterSubmersionAvailable: true Depth automation: available Provider start is called First provider event is received Submersion state: unknown No submersion event is received No depth measurement is received No temperature sample is received Provider state: error Raw error: Domain: CMErrorDomain Code: 105 Description: The operation couldn’t be completed. The relevant runtime failure is: CMErrorDomain 105 The app also does not appear in: Apple Watch Settings → General → Auto-Launch → When Submerged This is the key point that I cannot clarify from the documentation. My questions are: Is the entitlement com.apple.developer.submerged-shallow-depth-and-pressure sufficient for a watchOS app to appear in: Apple Watch Settings → General → Auto-Launch → When Submerged? Is the shallow depth entitlement sufficient to receive runtime events from CMWaterSubmersionManager, including submersion and depth measurements? Or is the full submerged depth entitlement required for: appearing in the “When Submerged” auto-launch list; receiving CMWaterSubmersionManager submersion events; receiving CMWaterSubmersionManager depth measurements? What does CMErrorDomain code 105 mean in the context of CMWaterSubmersionManager? If the shallow entitlement is sufficient, what other conditions could cause CMWaterSubmersionManager to return CMErrorDomain 105 before delivering any submersion or depth samples? To summarize: The shallow entitlement is present in the source entitlements file. The shallow entitlement is present in the signed Watch app. The shallow entitlement is present in the embedded provisioning profile. The built Info.plist contains WKSupportsAutomaticDepthLaunch = true. The built Info.plist contains WKBackgroundModes = underwater-depth. CMWaterSubmersionManager.waterSubmersionAvailable returns true. The app does not appear in the Watch “When Submerged” list. CMWaterSubmersionManager fails with CMErrorDomain 105 before delivering submersion/depth samples. Any help will be strongly appreciated. Thank you.
Replies
0
Boosts
0
Views
255
Activity
3w
I want to measure the time my smartphone has been turned off.
These days, we live our lives completely surrounded by and immersed in smartphones. It seems there isn't a single person among us who isn't. This is because we can find all kinds of information, meet friends, and enjoy our leisure time on our smartphones. However, there is one thing we are overlooking. It is the emotion you will feel toward the people around you as you die on the day you come to pass away. What is that emotion? It is regret. That regret is likely the longing to enjoy physical intimacy, conversation, travel, and everyday life more. That is why I am developing an app with a special feature. I am developing an app that helps users self-regulate and maintain moderation in their smartphone usage—something we are addicted to and love so much, yet often fail to realize that it is poison. This app is designed to encourage mutual moderation and provide rewards. Ironically, this app is designed to operate on the smartphone itself. The reason is that if the smartphone is a tiger's den, then to catch the tiger, one must enter the tiger's den. While conceptualizing and proceeding with development, I encountered a completely insurmountable wall. This is because the iPhone cannot accurately measure the screen-off time. I earnestly hope that if there is a team or developer working on the iPhone framework, you can resolve this issue. If you can extend the extension or take measures to allow access to that data within the SDK, I believe I will be able to complete this app. I look forward to your help.
Replies
0
Boosts
0
Views
232
Activity
3w
WeatherKit REST API returns 401 NOT_ENABLED although App ID and Key are enabled
Title: WeatherKit REST API returns 401 NOT_ENABLED although App ID and WeatherKit key are enabled Body: I am integrating WeatherKit REST API for an iOS app, but every request returns: HTTP 401 {"reason":"NOT_ENABLED"} Configuration summary: The App ID has WeatherKit enabled in App Services. The App ID also has WeatherKit enabled in Capabilities. The WeatherKit key shows WeatherKit enabled in the Keys page. A Service ID has been created. The backend generates an ES256 JWT using the .p8 private key. The decoded JWT header and payload have been verified. I have redacted the actual Team ID, Key ID, Bundle ID, and Service ID here for security reasons. Test A: JWT header.id = TEAM_ID.SERVICE_ID JWT payload.iss = TEAM_ID JWT payload.sub = SERVICE_ID kid = WEATHERKIT_KEY_ID exp - iat = 3600 seconds Result: HTTP 401 {"reason":"NOT_ENABLED"} Test B: JWT header.id = TEAM_ID.BUNDLE_ID JWT payload.iss = TEAM_ID JWT payload.sub = BUNDLE_ID kid = WEATHERKIT_KEY_ID exp - iat = 3600 seconds Result: HTTP 401 {"reason":"NOT_ENABLED"} Since Apple returns NOT_ENABLED instead of INVALID_AUTH_TOKEN, the JWT appears to be structurally accepted, but WeatherKit is not enabled for the authenticated identifier/key combination. Questions: For WeatherKit REST API, should the JWT sub claim use the Service ID or the App Bundle ID? What exactly causes HTTP 401 NOT_ENABLED? Is there any additional WeatherKit REST API enablement required besides enabling WeatherKit on the App ID and creating a WeatherKit key? Could this be an account-side entitlement propagation issue?
Replies
1
Boosts
0
Views
242
Activity
4w
Changing extension name of the Framework bundle
I'm working on a suite of apps supporting macOS, iOS and iPadOS (potentially tvOS, watchOS and visionOS in the future). Each of these App targets contain minimal code to only load the framework dynamically instead of the recommended load-time imports for Apple platforms. The rationales for runtime loading of framework (using dlopen and dlsym) is expressed in earlier post - fyi. Each app can load multiple frameworks at runtime. Instead of naming the frameworks like this - AppName_purpose1.framework, AppName_purpose2.framework, AppName_purpose3.framework, can it be named as AppName.purpose1, AppName.purpose2, AppName.purpose3 etc? Basically, change the Framework bundle extension name from .framework to a custom name based on purpose. The folder's extension name is changed, but it's still a framework bundle. The advantage of this approach is, in my project, Frameworks belonging to each of the apps cleanly distinguish themselves with a concise name. While this post is about Apple platforms, I'm also checking if other platforms allow to change the names of dynamic libraries (windows allows change). Using my custom extension can standardize the dynamic library's extension name across all platforms. Easy framework name construction - The Framework name is now the same as the App bundle name, which can be queried and this string can be appended with an appropriate extension to load all the Frameworks. Is it possible to change the extension name of the Framework bundle from the default .framework? If yes, how?
Replies
3
Boosts
0
Views
447
Activity
Jul ’26
Using wildcard for applinks in iOS stopped working
Hi everyone, I've been working on an application that provides different subdomains for different customers, so we need to support app linking with all of them. However, using wildcard notation like applinks:*.domain.com doesn't work, while hardcoding applinks:subdomain.domain.com works fine. The association file is being served from both the main domain and subdomains. It used to work fine about a month ago, and I can't find any recent breaking changes on Apple's side . Any ideas why this could happen. ?
Replies
4
Boosts
0
Views
1.1k
Activity
Jul ’26
Applinks for any subdomain not opening the app
My Entitlements file contains the following (removed some non related entries): <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>com.apple.developer.associated-domains</key> <array> <string>webcredentials:app.mydomain.org</string> <string>applinks:*.mydomain.org</string> </array> </dict> </plist> Now when I tap on a link such as abc.mydomain.org, the app is not opened. If I change the generic applinks key from *.mydomain.org to a specific domain, this works correctly and it opens the app as expected. (This makes me think the website part of the AASA file is correct). Since I need to support a lot of subdomains (think about hundreds in the near future), I really need the wildcard to work. Do you have any tips on how to make this work?
Replies
1
Boosts
0
Views
417
Activity
Jul ’26
AASA file on CDN not found more than one week
Last week our Universal Links stopped working. We made some changes and uploaded a new AASA file, but https://app-site-association.cdn-apple.com/a/v1/(domain) still returns 404 Not Found for all our domains. When I query directly from our server like domain/.well-known/apple-app-site-association, it returns 200 and the file is accessible. Could you help us resolve this issue? Our app relies on working Universal Links (deep links). Thank you!
Replies
1
Boosts
0
Views
356
Activity
Jul ’26