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

About AppShortcuts limit
I developed a shortcut feature for my app using the AppIntents framework, which can display a maximum of 10 shortcuts in the Shortcuts app. However, I've noticed that apps like Tesla and Porsche have a significantly larger number of shortcuts, far exceeding 10. After searching online, I found that they might be using Intent Extensions and the SiriKit framework. I customized an Intent through SiriKit, checked the option for "Intent is user-configurable in the Shortcuts app" and "Add to Siri." I can find this shortcut when I search for it, but it does not appear on the homepage or under the app category. Is there any way to resolve this?
4
0
160
Aug ’25
Translation framework error.
Hello everyone. I use Translation Framework in my application. During development everything was fine, Translation framework worked well, but after two or three days of using the production version (that was published in AppStore and available for others also!) - my application stopped working. Translation framework gives errors: Error sending 1 paragraphs Error Domain=TranslationErrorDomain Code=16 "Translation failed" UserInfo={NSLocalizedDescription=Translation failed, NSLocalizedFailureReason=Offline models not available for language pair} Failed to translate input 0; returning error: Error Domain=TranslationErrorDomain Code=16 "Translation failed" UserInfo={NSLocalizedDescription=Translation failed, NSLocalizedFailureReason=Offline models not available for language pair} Received unbridged NSError to API, converting to .internalError: Error Domain=TranslationErrorDomain Code=16 "Translation failed" UserInfo={NSLocalizedDescription=Translation failed, NSLocalizedFailureReason=Offline models not available for language pair} Once again - it worked when I developed it, it was released on the AppStore, and suddenly it stopped working!
4
2
184
Mar ’25
App Intents: How to test intent donation using IntentDonationManager?
Hello! I'm trying to donate an Intent to iOS using IntentDonationManager, following the methods described in the documentaion. try await IntentDonationManager.shared.donate(intent: MyIntent()) // succeeded However, I'm not seeing any effect of this action anywhere in the system (iOS 17 and 16). I have debugged it on both the simulator and a physical device, and I have also enabled the "Display Recent Shortcuts" toggle in the developer settings, but I still don't see any relevant suggestions appearing. Similarly, the issue also occurs with the old SiriKit framework, where INInteraction.donate(completion:) doesn't seem to have any observable effect. I recall that in iOS 15, the simulator would immediately present the donated Shortcut action on the lock screen and Spotlight page. However, starting from iOS 16 and continuing to the current iOS 17 beta 1/2, I haven't been able to achieve the same behavior using the same code. Another similar report: https://developer.apple.com/forums/thread/723109 So is there any way to test or verify the results of this donation action?
4
0
1.8k
Dec ’24
app crashed _CFRelease.cold.1
In my app, I implemented a screen recording functionality. But there was an unexpected crash. 0 CoreFoundation _CFRelease.cold.1 + 16 1 CoreFoundation ___CFTypeCollectionRelease 2 ReplayKit ___56-[RPScreenRecorder captureHandlerWithSample:timingData:]_block_invoke + 148 3 libdispatch.dylib __dispatch_call_block_and_release + 32 4 libdispatch.dylib __dispatch_client_callout + 16 5 libdispatch.dylib __dispatch_lane_serial_drain + 740 6 libdispatch.dylib __dispatch_lane_invoke + 388 7 libdispatch.dylib __dispatch_root_queue_drain_deferred_wlh + 292 8 libdispatch.dylib __dispatch_workloop_worker_thread + 540 9 libsystem_pthread.dylib __pthread_wqthread + 292
4
0
129
Jul ’25
ILMessageFilterSubAction symbol not found error on iOS 17.6
If I run an app with a Message Filter Extension on iOS 18 then it works as expected, however if its installed onto a phone with iOS 17.6.1 then there is the following error: dyld[1042]: Symbol not found: _$sSo40ILMessageFilterCapabilitiesQueryResponseC14IdentityLookupE21promotionalSubActionsSaySo0abI6ActionVGvs Referenced from: <C82A1045-98F4-3751-8080-413FD0B0DEEB> /private/var/containers/Bundle/Application/F295C156-9B20-4927-AEFA-C6983388B193/Myapp.app/PlugIns/MyMessageFilterExtension.appex/CequintTextFilterExtension.debug.dylib Expected in: <29BFFA34-9B52-3D14-A254-A0653545B72E> /System/Library/Frameworks/IdentityLookup.framework/IdentityLookup (App built using XCode 16.2). Here's code causing the issue: import IdentityLookup final class MessageFilterExtension: ILMessageFilterExtension {} extension MessageFilterExtension: ILMessageFilterQueryHandling, ILMessageFilterCapabilitiesQueryHandling { func handle(_ capabilitiesQueryRequest: ILMessageFilterCapabilitiesQueryRequest, context: ILMessageFilterExtensionContext, completion: @escaping (ILMessageFilterCapabilitiesQueryResponse) -> Void) { let response = ILMessageFilterCapabilitiesQueryResponse() response.transactionalSubActions = [.transactionalCarrier, .transactionalHealth, .transactionalPublicServices, .transactionalFinance, .transactionalWeather, .transactionalRewards, .transactionalOrders, .transactionalOthers, .transactionalReminders] response.promotionalSubActions = [.promotionalOffers, .promotionalOthers, .promotionalCoupons] completion(response) } Message filter sub actions were introduced in iOS 16, so why is this error occurring when the code is run on iOS 17, but its fine with iOS 18? This isn't specific to my app, its easily reproducable in two minutes - create an app, add a message filter extension target, change the template code to add a transactional or promotional sub action and then run and it'll occur. (Reported as issue FB16148083)
4
0
372
Jan ’25
Weird DateFormatter behavior
I am seeing a weird behavior of the date formatter (Full code is below). When run, this will give the following output: 57: 1 month, 3 weeks, 5 days 58: 1 month, 3 weeks, 6 days 59: 2 months 60: 2 months, 1 day 61: 2 months 62: 2 months, 1 day 63: 2 months, 2 days So both 59 days and 61 days are 2 months, and both 60 and 62 days are 2 months and 1 day. This of course is especially weird because this means, 2 months also comes after 2 months and a day. Can someone explain to me what is going on here? import Foundation let formatter = DateComponentsFormatter() formatter.unitsStyle = .full let calendar = Calendar(identifier: .gregorian) let today = calendar.date(from: DateComponents(year: 2025, month: 7, day: 26))! for day in 57...63 { let startDate = calendar.date(byAdding: .day, value: -day, to: today)! let components = calendar.dateComponents([.day, .weekOfMonth, .month,. year], from: startDate, to: today) let result = formatter.string(from: components)! print ("\(String(format: "%3d", day)): \(result)") }
4
0
279
Jul ’25
macOS 15.1 MFMailComposeViewController.canSendMail() returns false always
In my Catalyst app I use func setupMailComposer() { // Check if the device can send email guard MFMailComposeViewController.canSendMail() else { print("Mail services are not available") showMailErrorAlert() return } // Create and configure the mail composer let mailComposeVC = MFMailComposeViewController() mailComposeVC.mailComposeDelegate = self // Set the email details mailComposeVC.setToRecipients(["example@example.com"]) mailComposeVC.setSubject("Subject for your email") mailComposeVC.setMessageBody("This is the body of the email.", isHTML: false) // Attach a file (optional) if let filePath = Bundle.main.path(forResource: "example", ofType: "pdf"), let fileData = try? Data(contentsOf: URL(fileURLWithPath: filePath)) { mailComposeVC.addAttachmentData(fileData, mimeType: "application/pdf", fileName: "example.pdf") } // Present the mail composer self.present(mailComposeVC, animated: true, completion: nil) } Since I have updated to macOS 15.1 the canSendMail() function returns false although I have configured Apple Mail (like before in 15.0 where it worked flawlessly).
4
1
466
Apr ’25
About 0xBAADCA11 error
I am developing "local push" VoIP application. I have a question about issues I found while testing this app. After repeating a test for 24 hours in which a incoming call followed by an immediate disconnect 0.1 seconds later, the iPhone of incommig call side encountered a 0xBAADCA11 error, causing iOS to force-close the app. (The incidence is low, occurring three times in 17280 times incoming call(24 hours.)) This problem found on iOS17.6.1 (iPhone11Pro). When the same test was performed on iOS18.2 (iPhoneSE3), the problem did not occur. Did iOS take something measures against the 0xBAADCA11 error between iOS17.6.1 and iOS18.2? If yes, I want to encourage customers to upgrade to the latest iOS version, please tell me about it? ※I have attached an ips files and sysdiagnose file of the 0xBAADCA11 error occurring. (please refer sysdiagnose also if you need.) FjSoftPhone-2025-01-16-113049.ips FjSoftPhone-2025-01-16-175253.ips FjSoftPhone-2025-01-17-070449.ips [sysdiagnose_2025.01.17_14-24-48+0900_iPhone-OS_iPhone_21G93.tar.gz] https://drive.google.com/file/d/1CV8laKzdnQxvwaAIOwMcXL8rAYL2jq35/view?usp=sharing
4
0
702
Mar ’25
WeatherKit API inaccessible for some users
Hi All, I’m puzzled by this issue: my app uses WeatherKit to fetch hourly UV-index and temperature forecasts. The same build, running on the latest iOS, succeeds on most devices but consistently fails on a few. Strangely, the paired Apple Watch version retrieves the data without problems. Could WeatherKit be applying per-user throttling? Any insight would be greatly appreciated.
4
2
142
Jun ’25
LSRegisterURL resultCode -10819
I have an option in my app to set the URL Handler for smb or switch it back to Finder. But using my code below it always give me a -10819 error. Which is a generic kLSNotRegisteredErr, even those the documentation shows "Not currently used." func setDefaultHandler(bundleID: String) { DebugLogger.shared.log("Attempting to set \(bundleID) as default handler for SMB URLs") // Post Sonoma macOS requires user interaction to change default handlers // We'll register our app and then guide the user to System Settings // For our app, register it with Launch Services if bundleID != "com.apple.finder" { if let appBundleURL = Bundle.main.bundleURL as CFURL? { let registerResult = LSRegisterURL(appBundleURL, true) DebugLogger.shared.log("LSRegisterURL result: [\(appBundleURL)]\(registerResult)") } } // Check current handler using modern API let testSMBURL = URL(string: "smb://example.com")! if let handlerURL = NSWorkspace.shared.urlForApplication(toOpen: testSMBURL) { DebugLogger.shared.log("Current default handler is: \(handlerURL)") // Try to get the bundle ID from the URL var currentHandlerBundleID = "" if let bundle = Bundle(url: handlerURL) { if let handlerBundleID = bundle.bundleIdentifier { currentHandlerBundleID = handlerBundleID DebugLogger.shared.log("Current default handler bundle ID: \(handlerBundleID)") } } // Check if the current handler is already what we want let alreadySet = currentHandlerBundleID == bundleID DebugLogger.shared.log("Handler is already set correctly: \(alreadySet)") if alreadySet { let alert = NSAlert() alert.messageText = "Default Handler Status" alert.informativeText = "\(bundleID == "com.apple.finder" ? "Finder" : "LGN") is already set as the default handler for SMB URLs." alert.addButton(withTitle: "OK") alert.runModal() } else { // Guide the user to System Settings to change the handler promptToSetDefaultHandler(bundleID == "com.apple.finder" ? "Finder" : "LGN") } } else { DebugLogger.shared.log("Could not determine current handler") promptToSetDefaultHandler(bundleID == "com.apple.finder" ? "Finder" : "LGN") } }
4
0
340
Mar ’25
Database disk image is malformed in Call Blocking
I have an app developed by using the Callkit/Call-Blocking and received feedback from individual users, when using [cxcalldirectorymanager reloadextensionwithidentifier] to write call blocking data, it returned error code 11 with the following contents: errorCode: 11 errorDomain: com.apple.callkit.database.sqlite errorDescription: sqlite3_step for query 'DELETE FROM PhoneNumberBlockingEntry WHERE extension_id =?' returned 11 (11) errorMessage 'database disk image is malformed' I want to know the reasons for this error and how to solve it,Thanks!
4
3
1.1k
1w
Live Caller ID: Multiple userIdentifier values for same device - Expected behavior?
Hello! We're currently testing Live Caller ID implementation and noticed an issue with userIdentifier values in our database. Initially, we expected to have approximately 100 records (one per user), but the database grew to about 10,000 evaluationKey entries. Upon investigation, we discovered that the userIdentifier (extracted from "User-Identifier" header) for the same device remains constant throughout a day but changes after a few days. We store these evaluation keys using a composite key pattern "userIdentifier/configHash". All these entries have the same configHash but different userIdentifier values. This behavior leads to unnecessary database growth as new entries are created for the same users with different userIdentifier values. Could you please clarify: Is this the expected behavior for userIdentifier to change over time? If yes, is there a specific TTL (time-to-live) for userIdentifier? If this is not intended, could this be a potential iOS bug? This information would help us optimize our database storage and implement proper cleanup procedures. Thank you for your assistance!
4
1
420
Mar ’25
Question about including all project classes in ofClasses parameter when using NSKeyedUnarchiver.unarchivedObject(ofClasses:from:)
Hello, I have a question about data deserialization using NSKeyedUnarchiver in iOS SDK development. Current Situation: Previously, we were using the NSKeyedUnarchiver.unarchiveObject(with: Data) function We have changed to using the NSKeyedUnarchiver.unarchivedObject(ofClasses:from:) method to deserialize complex objects stored in UserDefaults We need to include all types in the ofClasses parameter, including Swift primitive types as well as various custom classes and structs within the project Questions: Implementation Approach: Is it correct pattern to include all classes defined in the project in the ofClasses array? Is this approach recommended? Runtime Stability: When using this approach, is there a possibility of runtime crashes? Are there any performance issues? Alternative Methods: If the current approach is not the correct pattern, what alternatives should we consider? Current Code Structure: All model classes conform to the NSSecureCoding protocol We use the requiringSecureCoding: true parameter We use a whitelist approach, explicitly listing only allowed classes I would like to know if this structure is appropriate, or if we should consider a different approach. Thank you.
4
0
126
3w
Pushkit/Callkit with unlocked SIM before first unlock
We have a problem in a scenario that SIM lock is disabled so after a phone reboots it has the Internet connection but it is still locked. When you call into the VOIP app the app is not being launched as the result (it seems reasonable because it wouldn't be able to access the keychain items etc...) but the OS still seem to enforce the rule that the app needs to report the new incoming call. When we then unlock the app we can see no more pushkit pushes are arriving (dropped on the floor in the console) but we get the three initial pushes that were send during the locked phase right after the app launch.
4
0
179
May ’25
What are the requirements of isSIMInserted api newly introduced from iOS 18 onwards
Hello Folks, I recently came through a new API introduced from iOS 18 onwards isSIMInserted and according to the document it is A Boolean property that indicates whether a SIM is present. I really appreciate Apple for introducing such an useful API but there are few queries on what are the requirements for using this API. Query 1: Do we need any special entitlements for making use of this API. ? If yes then what are those entitlements and are these entitlements available openly or we have to raise special request to apple for such entitlements? Query 2: What are the entries required to be added in info.plist for supporting the isSIMInserted api to work. Query 3: Is isSIMInserted api available for all type of apps because mine is a financial stock related app and i am looking forward to use this API for providing more security to the end user while registering through sms. As per the below link this api is only available for mobile Carrier apps but in official document there is no such mention. https://forums.developer.apple.com/forums/thread/760991 Please kindly help me on these queries ? Regards, Carol
4
0
660
Jan ’25
Issues with Multicast Operations using NWConnectionGroup and NWMulticastGroup
Hello, I've been encountering some challenges while working with NWConnectionGroup and NWMulticastGroup for multicast operations on iOS. I have a few doubts and issues that I would like to address: 1. NWMulticastGroup Initialization It seems that when initializing NWMulticastGroup, only one NWEndpoint can be passed, and attempting to pass multiple endpoints results in failure. Can someone confirm if this behavior is correct? 2. Interface Level Control Upon initializing NWConnectionGroup, it appears that packets are received on all interfaces without the ability to control this at the interface level. Is this correct? If not is there a way to configure NWConnectionGroup to receive packets on all interfaces? 3. Sending Behavior During the send operation, it appears that the data is sent through any one of the available interfaces, and there doesn't seem to be an option to configure it to send through all available endpoints. Is there a way to enable sending data through all available endpoints? Any insights, guidance, or solutions to these issues would be greatly appreciated. Has anyone else encountered similar problems or found workarounds for these limitations? Thank you for your assistance and support. Thanks, Harshal
4
0
778
Jan ’25
unifiedContacts identifier vs contactRelations identifier
The documentation specifies that when Contacts framework returns unified contacts that each fetched unified contact object (CNContact) has its own unique identifier that’s different from any individual contact’s identifier in the set of linked contacts and that when refetching a unified contact, that this identifier should be used. There is also an analogous identifier within the list of contactRelations, but each of these don't seem to corespondent to the unified contacts. For example, is a new contact (Sheryl Zakroff) is created in the simulator Contacts and their spouse is set to Hank Zakroff. However, the GUID created for the contactRelations identifier does not correlate to the original Hank Zakroff GUID and cannot be searched. Is this a bug or what is the indent of the contactRelations identifier? Here's a debug output of walking the unifiedContacts: Name: Hank Zakroff 2E73EE73-C03F-4D5F-B1E8-44E85A70F170 - Other : (555) 766-4823 - Other : (707) 555-1854 Name: David Taylor E94CD15C-7964-4A9B-8AC4-10D7CFB791FD - Other : 555-610-6679 Name: Sheryl Zakroff DE783BC8-7917-4138-93F6-3AF0FD4CE083 - Other : (707) 555-1854 - Spouse: <CNContactRelation: 0x60000000dd60: name=Hank M. Zakroff> - 534B467D-CA00-46D3-897C-16EEA782C9CF - Looking for ["534B467D-CA00-46D3-897C-16EEA782C9CF"] []
4
0
230
2d