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

Configuring a MacOS application using MDM preferences
Hello. I have a MacOS application to be distributed in a .pkg that is signed and notarized. For the application to work, it needs some settings defined by us (non-secret strings that differ per client). My thought has been to use a .mobileconfig to send these settings using the com.apple.ManagedClient.preferences PayloadType. I can see these settings land correctly into the /Library/Managed Preferences directory (in the correct domain) when distributed using Apple Business Essentials as the MDM. However, I cannot read the settings using NSUserDefaults OR CFPreferences in objective-c (i've tried with my app unsigned and signed, but not signed ant notarized so far). I've seen some posts here and there about managed preferences being deprecated, so I'm not sure if this is my issue or if i'm simply reading the preferences incorrectly. I'll admit the conflict of some of these posts has me a bit confused about how the preferences subsystem works / whether it should be used at all. I'm on MacOS 15.3. Two questions: Does anything stand out as to why I wouldn't be able to read these properties? Is there a better method I should be using to allow sending config via MDM to set application settings? Thanks in advance!
1
0
218
Feb ’25
iOS 18.3.1 - QLPreviewControllerView closing triggers AX Lookup problem - errorCode:1100 error:Permission denied portName:'com.apple.iphone.axserver' PID:1022
Since iOS 18.3.1, In lower iOS versions it works fine though. QLPreviewController shows a blank white screen instead of showing the document. Additionally, it does not display the 'Done' option at the top-right to close the view. Presenting the QLPreviewController works fine to display the document, but for the second time, it renders the blank white screen as described. While launching QLPreviewControllerView for the first time. I'm receiving the following message in the console and it displays the document. LaunchServices: store (null) or url (null) was nil: Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=72, _LSFunction=_LSServer_GetServerStoreForConnectionWithCompletionHandler} Attempt to map database failed: permission was denied. This attempt will not be retried. Closing the QLPreviewController with the help of the 'Done' option from top-right or swipe to close triggers the following message in the console. Connection to appex interrupted AX Lookup problem - errorCode:1100 error:Permission denied portName:'com.apple.iphone.axserver' PID:1022 ( 0 AXRuntime 0x00000001d2cd7758 _AXGetPortFromCache + 796 1 AXRuntime 0x00000001d2cdd02c AXUIElementPerformFencedActionWithValue + 700 2 UIKit 0x0000000258cdf488 7F0274D9-D3C9-3193-B606-1C74BE53B86C + 1537160 3 libdispatch.dylib 0x0000000101bb888c _dispatch_call_block_and_release + 32 4 libdispatch.dylib 0x0000000101bba578 _dispatch_client_callout + 20 5 libdispatch.dylib 0x0000000101bc2454 _dispatch_lane_serial_drain + 840 6 libdispatch.dylib 0x0000000101bc325c _dispatch_lane_invoke + 408 7 libdispatch.dylib 0x0000000101bd06fc _dispatch_root_queue_drain_deferred_wlh + 328 8 libdispatch.dylib 0x0000000101bcfd0c _dispatch_workloop_worker_thread + 580 9 libsystem_pthread.dylib 0x0000000225ea4680 _pthread_wqthread + 288 10 libsystem_pthread.dylib 0x0000000225ea2474 start_wqthread + 8 ) Trying to open he document again, Ultimately results in the white blank screen to be displayed with no options to close. It displays the Navigation bar only for the fraction of time. Leading users to force close the app and start again.
1
0
215
Mar ’25
Issue with Missing Private Key After Adding Push Notification Certificate to Keychain
Hi All, I have created a Push Notification certificate from my Apple Developer account. After downloading the aps.cer file and adding it to my Keychain, the certificate was added successfully, but the private key is missing. Has anyone encountered a similar issue in the past? What could be causing this problem?
0
0
412
Dec ’24
Request Array with AppIntent
Hi everyone, i'm trying to request in a AppIntent an array of strings. But I want to give the user the chance to add more than one String. Yet, I do it so: import AppIntent struct AddHomework: AppIntent { // some Parameters @Parameter(title: "Tasks") var tasks: [String]? @Parameter(title: "New Task") //Only for the special request var input: String? private func collectTasks() async throws -> [String] { var collectedTasks: [String] = tasks ?? [] while true { if !collectedTasks.isEmpty { let addMore = try await $input.requestConfirmation(for: "Möchtest du noch eine Aufgabe hinzufügen?") if !addMore { break } } let newTask = try await $input.requestValue("Please enter your task:") collectedTasks.append(newTask) } return collectedTasks } @MainActor func perform() async throws -> some IntentResult { let finalTasks = try await collectTasks() // some more code return .result() } } But this is not working. The Shortcut is ending without requesting anything. But it is not crashing. I would thankfully for some help.
0
0
320
Feb ’25
ios18.2 public beta - Wallpaper/AOD issue
Hi all. Since upgrading to a new iPhone 16 pro, running 18.2 public beta, I'm having issue with my wallpaper/Lock Screen. If AOD is turned OFF, my lock screen is almost too dim to read, and the chosen Lock Screen wallpaper has a blurred effect on it. if AOD is ON, the screen is still too dim to read, and the wallpaper is just a faint shade of the colour of the image chosen.
1
0
386
Dec ’24
How to remotely disable or block apps on a child’s device using FamilyControls and DeviceActivity API?
After reading Apple documentation (FamilyControls, DeviceActivity, ManagedSettings, ManagedSettingsUI, ScreenTime) and testing the API, I do not find a way to get the child's device apps on the parent device in order to block them or disable them for a certain time. Is there a way of doing it? Or can it only be done locally on the child device?
2
0
511
Mar ’25
Touchscreen gestures in CarPlay aren't recognized in the app
Touchscreen gestures in CarPlay aren't recognized in the app (delegate CPMapTemplateDelegate functions aren't called). Tried also in the Coastal Roads demo app to add test functions to check that pan functions are called - the same: func mapTemplateDidBeginPanGesture(_ mapTemplate: CPMapTemplate) { MemoryLogger.shared.appendEvent("Did begin pan gesture.") } func mapTemplate(_ mapTemplate: CPMapTemplate, panBeganWith direction: CPMapTemplate.PanDirection) { MemoryLogger.shared.appendEvent("Did begin pan gesture with direction \(direction.rawValue).") } Note: buttons (on carplay app) are working when pressing on them. Also, the desktop of carplay can be panned (by swipe gesture). Using Xcode 14.3, MacBook pro M1
2
0
688
Dec ’24
Live caller id lookup - Which secret key is used for PIR database HE encryption on test env
Hi, I'm trying to setup PIR service for live caller id lookup (in python but based on swift example: https://github.com/apple/live-caller-id-lookup-example). The swift example provides utilities for database setup and encryption, but I can't find any specification about which key is used for database encryption and how the ios system knows about this key in order to be able to construct the PIR requests. So my question is how does the PIR service communicate the secret key to ios system or vice versa? (specific to the test environment, before onboarding)
0
0
285
Feb ’25
iOS18 - NSInternalInconsistencyException
Does any ont encountered such crash? It only occured on iOS18 device. Application Specific Information: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '_endUndoGroupRemovingIfEmpty:: _UITextUndoManager 0x30d3bca50 is in invalid state, endUndoGrouping called with no matching begin UserInfo:(null)' Pthread id: 2420148 Thread 0 Crashed: 0 CoreFoundation __exceptionPreprocess + 164 1 libobjc.A.dylib objc_exception_throw + 88 2 Foundation -[NSUndoManager endUndoGrouping] + 0 3 Foundation __NSFirePerformWithOrder + 296 4 CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 36 5 CoreFoundation __CFRunLoopDoObservers + 552 6 CoreFoundation __CFRunLoopRun + 788 7 CoreFoundation CFRunLoopRunSpecific + 588 8 GraphicsServices GSEventRunModal + 164 9 UIKitCore -[UIApplication _run] + 816 10 UIKitCore UIApplicationMain + 340 11 application main (main.m:39) 12 (null) 0x00000001abfecde8 0x0 + 7180570088
1
0
623
Dec ’24
WeatherKit - missing ForecastHourly field documentation
where can we find documentation on the following fields included in payloads? They're not listed alongside the other fields in the documentation linked below: https://developer.apple.com/documentation/weatherkitrestapi/hourweatherconditions precipitationIntensity snowfallAmount Or if we can get the data type, unit used, and description here that would be great
0
0
258
Mar ’25
Critical SKAdNetwork Attribution
Subject/Title: Critical SKAdNetwork Attribution Failures (Bug Type: 237, Failure Type: 1201 in ASDErrorDomain) Issue Summary We are encountering repeated SKAdNetwork attribution failures (failureType: 1201 in ASDErrorDomain) for ad impression events processed through the ad network mj797d8u6f.skadnetwork. These failures are causing significant revenue losses, as ad impressions are not being properly attributed to installs. The issue occurs across multiple campaigns and involves both SKAdNetwork API 3.0 and 4.0, suggesting a systemic problem with attribution validation or network communication. This problem is critical as it disrupts advertisers’ ability to track conversions, optimize campaigns, and allocate budgets effectively. Technical Details Key Logs: Below are anonymized samples of the failed SKAdNetwork events: Log Sample 1 (Failure): { "bug_type": "237", "timestamp": "2025-01-07 22:49:15.00 -0500", "os_version": "iPhone OS 18.2.1 (22C161)", "roots_installed": 0, "incident_id": "78523BD9-1F58-4738-B526-8A8A63203214" } { "advertisementStoryId": "3D2E7EBB-1A57-4DF8-9375-2C465F423038", "apiVersion": "3.0", "eventType": "adImpression", "resultType": "finalized", "anonymous": true, "failureType": 1201, "failureDomain": "ASDErrorDomain", "clientEventId": "0F456623-584F-4913-BBD3-C3FD1219D104", "os": "iOS", "topic": "xp_amp_skad_perf", "adType": "app", "adNetworkId": "mj797d8u6f.skadnetwork", "eventTime": 1736305200000, "osBuildNumber": "22C161", "hardwareFamily": "iPhone", "api": "SKAdNetwork" } Log Sample 2 (Failure): { "bug_type": "237", "timestamp": "2025-01-07 22:49:15.00 -0500", "os_version": "iPhone OS 18.2.1 (22C161)", "roots_installed": 0, "incident_id": "0CBF612D-F0D9-449E-A34E-DE2DB92BEC0D" } { "advertisementStoryId": "946E568C-D2C1-478F-BFF3-4996C48F9B39", "apiVersion": "3.0", "eventType": "adImpression", "resultType": "finalized", "anonymous": true, "failureType": 1201, "failureDomain": "ASDErrorDomain", "clientEventId": "1A3D48FB-4452-4FD8-BB25-1195470A53DC", "os": "iOS", "topic": "xp_amp_skad_perf", "adType": "app", "adNetworkId": "mj797d8u6f.skadnetwork", "eventTime": 1736298000000, "osBuildNumber": "22C161", "hardwareFamily": "iPhone", "api": "SKAdNetwork" } Log Sample 3 (Success Example for Comparison): { "bug_type": "237", "timestamp": "2025-01-07 22:49:15.00 -0500", "os_version": "iPhone OS 18.2.1 (22C161)", "roots_installed": 0, "incident_id": "BFEAC86B-8195-4DB0-96FF-2028107256AD" } { "advertisementStoryId": "946E568C-D2C1-478F-BFF3-4996C48F9B39", "apiVersion": "3.0", "eventType": "adImpression", "resultType": "finalized", "anonymous": true, "clientEventId": "F6265488-E0FB-448A-A406-3F7254BCA9D7", "os": "iOS", "topic": "xp_amp_skad_perf", "adType": "app", "adNetworkId": "mj797d8u6f.skadnetwork", "eventTime": 1736294400000, "osBuildNumber": "22C161", "hardwareFamily": "iPhone", "api": "SKAdNetwork" } Failure Details: Failure Type: 1201 Failure Domain: ASDErrorDomain Ad Network ID: mj797d8u6f.skadnetwork API Versions Affected: 3.0, 4.0 Timeframe of Failures: All logs occur within 2025-01-07 22:00:00 UTC to 23:00:00 UTC. Environment: OS Version: iOS 18.2.1 (Build 22C161). Device Type: iPhone (hardwareFamily: iPhone). App Configuration: Includes the ad network ID in the Info.plist under SKAdNetworkItems. Impact Details Financial Loss: Based on failure rates, we estimate $20–$65/day per advertiser for small campaigns and $75–$375/day per advertiser for larger campaigns. If 100 advertisers are affected, daily losses range from $2,000–$37,500. Over a week, losses could exceed $70,000 to $262,500 or more. Operational Impact: Advertisers cannot track installs or optimize campaigns, leading to inefficient ad spending and potential budget reallocation to other networks. Damaged trust between advertisers and the ad network. Reputation Risk: Continued failures harm the credibility of the SKAdNetwork framework, critical in a post-ATT (App Tracking Transparency) ecosystem. Steps to Reproduce Serve an ad impression through the ad network mj797d8u6f.skadnetwork. Monitor SKAdNetwork attribution for that impression. Observe repeated failures (failureType: 1201) despite the resultType: finalized status. Recommendations for Investigation Attribution Timeout: Verify if these failures stem from delayed responses or missed attribution windows. Ad Network Configuration: Confirm the ad network’s integration complies with SKAdNetwork API 3.0 and 4.0 requirements. Infrastructure Review: Investigate potential bottlenecks or failures in Apple’s attribution servers (ASDErrorDomain) or communication delays. Contact Details Name: [Your Full Name] Role: [Your Role] (e.g., Ad Network Analyst/Developer) Organization: [Your Company Name] Email: [Your Email Address] Phone: [Your Phone Number] Submission Instructions You can submit this report via the following channels: Apple Feedback Assistant: https://feedbackassistant.apple.com/ Bug Reporting Tool: https://developer.apple.com/bug-reporting/ Apple DTS: https://developer.apple.com/support/technical/
0
0
355
Jan ’25
Control Center Widget icon disappear occasionally
Hi folks, We are trying to develop a widget on iPhone control center. We follow the Apple design guideline to export our resource file using custom icon and the button icon always show on debug build. However, when we deploy to TestFlight, under some scenario, such as app upgrade, we found that the icon image disappear occasionally. Anyone could help? Thank you in advance!
1
0
206
Feb ’25
Spotlight doesn't show .html file results
When I search for text in a .html file using the Command-Spacebar spotlight popup the .html file is never shown in the results. On the other hand the .html file does show in the result when I search in the Finder window search field, or when I search in the Terminal using mdfind. Why is this and how can I fix? I want to use spotlight to find .html files. You can reproduce the problem like this: echo spotlighttest > testone.txt % echo spotlighttest > testtwo.html % mdfind spotlighttest 2024-12-30 14:22:28.552 mdfind[28326:550500] [UserQueryParser] Loading keywords and predicates for locale "en_US" 2024-12-30 14:22:28.553 mdfind[28326:550500] [UserQueryParser] Loading keywords and predicates for locale "en" ~/Desktop/Spotlighttest/testone.txt ~/Desktop/Spotlighttest/testtwo.html I believe this shows that both files are index properly, but if you then do Command-Spacebar and search for "Spotlighttest" I think you will see that only testone shows as a result. Edit I believe this is a change in macOS 15.x and used to work correctly in previous macOS
6
0
451
Dec ’24
Contacts Framework Question
Hey, I would love to access the users Contact (ie. the Me Card) Apple recently released the Invites app and within this app you can find the users Contacts Photo. I tried to replicate this behaviour but I currently need to match based on a name or email or something else. I have no idea how to receive this data because when using the Invites app I only remember the app asking for Contacts permission and nothing else so far. let store = CNContactStore() let keysToFetch = [CNContactImageDataAvailableKey, CNContactImageDataKey, CNContactThumbnailImageDataKey] as [CNKeyDescriptor] let email = "test@test.de" let predicate = CNContact.predicateForContacts(matchingEmailAddress: email) do { let contacts = try store.unifiedContacts(matching: predicate, keysToFetch: keysToFetch) let imageDatas: [Data] = contacts.compactMap { $0.imageData } self.images = imageDatas.map { UIImage(data: $0) ?? UIImage() } } catch { print("Error fetching contacts: \(error)") } This is how I am retrieving the Image. MAYBE someone can help me out. Thank you so far ~ Flo
1
0
343
Feb ’25
What are causes of networkURLUnauthorized in a message filter extension
I'm getting ILMessageFilterError.networkURLUnauthorized returned in a message filter extension when calling deferQueryRequestToServer(). Googling for people who have had the same error, they didn't include the associated domain in the containing app. However I have added that. The server is set up at https://something.com:443, it has an apple association file located at https://something.com:443/.well-known/apple-app-site-association I have added associated domains to the app and the app extension of: messagefilter:something.com?mode=developer webcredentials:something.com?mode=developer Side question 1: are both needed or just the messagefilter? Side question 2: should the domain include the port :443? The server isn't publicly hosted hence I've appended ?mode=developer on the end as per the documentation. The extension's info.plist has ILMessageFilterExtensionNetworkURL added as something.com Question 3: Does this need the port adding too? With everything set up according to the documentation, apart from the questions above, what might be the cause of getting networkURLUnauthorized returned?
3
0
306
Jan ’25
CarPlay Not Working Properly
I just purchased a new 2025 Honda Civic Hybrid sedan with the highest trim package. The staff at the dealership set CarPlay up to my iPhone 16 Pro, and all was operating perfectly. Then, last week, I started noticing random connectivity problems with it (ie: no sound from my audio apps, “not connected” being displayed on the dashboard displa, etc.) I tried to think of what had changed with my setup, and the only change was that I updated to the latest iOS update 18.2 I scheduled a service appointment with the Honda dealer in hopes that Apple and Honda can confirm a fix for this issue. I’ll try to attach an image from my car’s dashboard display as an example of an error message that isn’t resolved.
0
0
264
Jan ’25
Sequoia - Messages not receiving after 7+ hrs of uptime
Issue: Using Messages in macOS Sequoia, I stop receiving any messages after 7+ hrs of the system being on. Troubleshooting: any messages sent to the target account doesn't show up when this issue occurs. I'm able to send messages from the target account which is received. only way to get it working is to reboot the computer but those messages sent never arrive to the target account even after reboot. upon reboot the behavior functions as expected. however the issue returns after 7hrs+ after reboot. logout and log back in when the system is in this state doesn't resolve the issue. only a reboot but the issues eventually returns. note the 7hrs+ is tested and is more accurately 7-10 hrs.
1
0
394
Dec ’24
How to get the real app language code + variation?
Hello, I have the app localised to many languages and its variants, like English from Australia or Dutch from Belgium. My phone language is en_UK and the region is configured to ES. I cannot find a way to get the regional language code (ex: en_au, nl_be), it always gets simplified to the language (ex: en, nl), or adds my device region (ex: en-ES, nl-ES). Here I attach some examples while I have the app on en_au Locale.preferredLanguages ▿ 3 elements - 0 : "en-ES" - 1 : "ca-ES" - 2 : "es-ES" Bundle.main.preferredLocalizations ▿ 1 element - 0 : "en" NSLocale.current.languageCode ▿ Optional<String> - some : "en" Locale.current ▿ en_001@rg=eszzzz (fixed en_001@rg=eszzzz) - identifier : "en_001@rg=eszzzz" - locale : "fixed en_001@rg=eszzzz" Locale.autoupdatingCurrent.languageCode ▿ Optional<String> - some : "en" Locale.current.languageCode ▿ Optional<String> - some : "en" Locale.preferredLanguages[0] "en-ES"
2
0
1k
Jan ’25