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

App Intents is not able to start an outgoing call with CallKit when the app is backgrounded
I am currently working on integrating an app with Siri, adding support for starting VOIP calls and sending messages. Although it is understood it is recommended to use SiriKit for calling and messaging, I would like to allow users to select a profile to use for calling. As far as I am aware the notion of selecting a profile to call from is not something SiriKit supports, therefore, it was decided to go with App Intents to allow for more control over the parameters utilized to start calls. After integrating VOIP calling with App Intents, I noticed CallKit is not able to start calls when the App Intent is invoked from the background. I get the following error: Error Domain=com.apple.CallKit.error.requesttransaction Code=6 "(null)” This seems to correspond to the CXErrorCodeRequestTransactionError invalidAction. This error only happens when the intent is invoked from the background. Changing the App Intent property openAppWhenRun to true solves the issue as it brings the app to foreground before running the intent. However, I would like to support starting calls from the background to avoid making users unlock their phones prior to starting a call with Siri to make it a truly hands-free experience. I suspect the desired behavior is possible, most likely with SiriKit, as some famous VOIP calling apps (i.e. WhatsApp, Messenger, etc) exhibit the behavior I described. However, is there any way to start calls from the background with App Intents? Or is the desired behavior something exclusive to SiriKit? I have pasted three code snippets below that can replicate the issue. At the moment I am on Xcode Version 15.3, macOS Sonoma 14.6.1, and testing on iOS 16.6.1 To demonstrate the issue I have created the following CXProviderDelegate: class CallManager: NSObject, CXProviderDelegate { func startCall() { let callKitProvider = CXProvider(configuration: CXProviderConfiguration()) callKitProvider.setDelegate(self, queue: nil) let callKitController = CXCallController() let recipient = CXHandle(type: .generic, value: "Demo Outgoing Call") let uuid = UUID() let startCallAction = CXStartCallAction(call: uuid, handle: recipient) let transaction = CXTransaction(action: startCallAction) callKitController.request(transaction) { error in if let error { print(error) } else { print("no errors") } } callKitProvider.reportOutgoingCall(with: uuid, connectedAt: nil) } func providerDidReset(_ provider: CXProvider) { // no-op, not required to demonstrate the issue } } Then, I have a UIViewController that is the only screen of this example app: class ViewController: UIViewController { @IBOutlet weak var startCallButton: UIButton! override func viewDidLoad() { super.viewDidLoad() startCallButton.addTarget(self, action: #selector(buttonTapped), for: .touchUpInside) } @objc func buttonTapped() { let manager = CallManager() manager.startCall() } } As for app intents, I put together a very simple intent to trigger the start of an outgoing call: struct StartCall: AppIntent { static var title: LocalizedStringResource = "Start Call" static var openAppWhenRun = false func perform() async throws -> some IntentResult { let manager = CallManager() manager.startCall() return .result() } } When the UIViewController is presented and I tap the button to start a call I see the green call banner appear and "no errors" is printed to the console as intended. However, when I open the Shortcuts app and run the app intent, the green banner does not appear and the message Error Domain=com.apple.CallKit.error.requesttransaction Code=6 "(null)” is printed to the console.
1
0
761
Oct ’24
Feedback Assistant nonresponse
Hi All, Had a question. Is there a point to submit anything through the feedback assistant (https://feedbackassistant.apple.com)? I mean it doesn't seem like any engagement occurs through the platform on any issues submitted.
2
0
217
Dec ’24
MacOS Sequoia install error
Good day. Installed Sequoia Developer Beta. After that, the laptop started to behave incorrectly, programs over 1 GB stopped installing, updates were not installed, sometimes it rebooted spontaneously. Decided to roll back. With the help of another Macbook, I managed to install 14.6.1. Errors remained. Updates are not installed. Tried to restore through the recovery menu, error at 52 minutes, using a boot disk, the same error. What else can I do? Mac Book Pro M1 16gb/2tb
0
0
305
Dec ’24
Need help debugging Universal Links
Hi! Instead of using username/password authentication, I wanted to use a magic link to authenticate users of my app to simplify the process. However, on the app review, it got rejected because of the magic link: Guideline 2.1 - Performance - App Completeness Issue Description The app exhibited one or more bugs that would negatively impact App Store users. Bug description: The Magic Link failed to open the installed app. Review device details: - Device type: iPad Air (5th generation) - OS version: iPadOS 18.1 Next Steps Test the app on supported devices to identify and resolve bugs and stability issues before submitting for review. If the bug cannot be reproduced, try the following: - For new apps, uninstall all previous versions of the app from a device, then install and follow the steps to reproduce. - For app updates, install the new version as an update to the previous version, then follow the steps to reproduce. Resources - For information about testing apps and preparing them for review, see Testing a Release Build. - To learn about troubleshooting networking issues, see Networking Overview. I had no luck to reproduce this. The magic links trigger my application on all my testing devices. I also had external testers using TestFlight and it works for all of them as well. The only time where I can see it failing is if I archive the IPA and install it on an external service like AWS Device Farm or BrowserStack App Live. But here it is very hard to debug because I think I cannot get the sysdiagnose file and I don't know if it is even supposed to work in this case because those devices are not associated with my developer account. I read countless links, tutorials and discussions on this topic but it did not really help. https://developer.apple.com/documentation/technotes/tn3155-debugging-universal-links https://developer.apple.com/documentation/xcode/allowing-apps-and-websites-to-link-to-your-content Here is my set-up: I added the Associated Domains capability to my app. There under Domains I put applinks:subdomain.domain.com Under https://subdomain.domain.com/apple-app-site-association and https://subdomain.domain.com/.well-known/apple-app-site-association I host this file with JSON content header: { "applinks": { "apps": [], "details": [ { "appID": "<TEAM>.<TestAppIdentifier>", "paths": [ "/magiclink/*", "/activate/*" ] }, { "appID": "<TEAM>.<Identifier>", "paths": [ "/magiclink/*", "/activate/*" ] } ] } } My main entry point of the app has a .onOpenURL { url in handleOpenURL(url) } on the ContentView() If I go to https://app-site-association.cdn-apple.com/a/v1/subdomain.domain.com, I see the file correctly as I specified it above. If I go on my development phone to Settings > Developers > Universal Links > Diagnostics and I enter one of the "magic links" into the field, it says with a checkmark Opens Installed Application. https://getuniversal.link/ says my AASA file is valid. Any suggestion on what I could do to further debug or resolve this is highly appreciated.
3
0
579
Nov ’24
App Directories And Data
Hello everyone, I hope you’ll all bear with me as I get up to speed. My background is in Unix, procedural languages, mission critical databases and enterprise applications. I’ve just started heading a team with an iOS app used in healthcare that contains confidential patient information (PHI) that's governed by HIPAA and FDA cybersecurity, etc. It seems there’s some contention in the team over whether the app, SQLite db, and medical images belong in the Documents or an Application Support directory in the Library. From everything I’ve read, it seems that Apple’s intent is Library/Application Support. Two questions: Which is the correct location? And hopefully, a few compelling justifications. On one of our iPads, the app stopped displaying what was two years of data in SQLite. I haven’t yet tested for index corruption, however one of the programmers believes this resulted from an iOS update that needed space and cleared data in the cache (but that makes no sense to myself). Feedback highly appreciated. Many thanks, David Why, because somebody has to
4
0
559
Dec ’24
Building Issue
Hello, I am very new to programming with Xcode. I’ve been searching the forums and online but can’t seem to find an answer. My project is not displaying the triangle build button in the left corner, nor the status of the build. No issues with my code are apparent, yet it does not build and preview when I push build and clean in the product tab
1
0
249
Dec ’24
Any way to adjust the speechRecognitionMetadata pause duration?
Speech Framework I've been checking for SFSpeechRecognitionMetadata to determine the end of a sentence when using Voice Recognition. Yet it doesn't detect small pauses but only large ones, so that I've transcribed basically an entire paragraph before going onto the next one. Besides implementing your own timer, are there any other ways to have more natural pauses to detect the end of sentences, similar to the browser's Web Speech recognition? Since it's in Safari, I assume there should be some similar feature that can be equivalent in MacOS.
0
0
320
Dec ’24
Is it possible to connect a single third party UWB device (hardware or chip) to multiple iPhones at the same time?
Dear fellow iOS developers, I am interested in UWB technology and I am trying to build a dummy Indoor Navigation project. I will be placing 3 third party UWB devices (hardware or chips) at some distance apart from each other. I have 5 iPhones and I want to be able to connect all the 5 iPhones to the 3 UWB devices simultaneously and perform trilateration to get the iPhones x and y coordinates using the "distance" values obtained from the UWB devices (hardware or chips). I have tried this approach using Qorvo DWM3000 chips but problem is that after the first iPhone connection, the chip stops advertising itself. Is this approach possible? Also, it is compulsory to establish NISessions? Can't I skip creating NISessions? Thanks in advance. Forgive my english.
0
0
318
Dec ’24
Trackpad becomes non-clickable
Hello, I have a Macbook Pro, 13", 2020, M1 model. Sometimes when I use my macbook, the trackpad becomes non-clickable, the only solution seems to be to manually turn it off. It has happened multiple times the past couple months, which has drawn me to write this post. I don't see manually turning it off, as a viable way of getting around the issue, on the long run. Today I was writing an application, and it was one of those applications where you fill out a form online, and it was not saveable. My trackpad stopped working and I had to turn off my macbook and lost all progress. Does anyone have any tips, tricks or information on what is happening? Is this just something that happens with older models? What can I do?
1
0
178
Dec ’24
Instant access to call log with new ios 18 commands
Hello, I am wondering about developing my application. Can the new commands available with iOS 18 give me access to the call log (recent calls)? With a request prior to installing the application for example. I saw that Truecaller has just launched an update on iOS to offer the same features as Android, i.e. capture the call log. Apple allows applications like Truecaller to integrate their spam databases into the iOS caller ID system. I wonder by which command! Otherwise, I can perhaps use the "SMS and Call Spam Reporting" commands and divert them to retrieve the call log. To tell you the truth, I'm trying to find, for my application, a way to retrieve recent call data to create a call dashboard of certain calls, by retrieving the name or phone number, call date, call time and call duration. Does anyone have an idea?
4
0
1.4k
Oct ’24
Apple app site association CDN cache does not work with IPv6 only servers.
Hi, We have an IPv6 only server setup, where we have put AASA file as required: https://qa-jen.noknoktest.com/.well-known/apple-app-site-association But Apple CDN does not found it: https://app-site-association.cdn-apple.com/a/v1/qa-jen.noknoktest.com Is there any restriction on IPv6 only servers? Everything works with our other IPv4 servers. Note: With alternate mode configuration in application, the AASA is accessible to devices. There is no any geo restriction or IP filtering for server. What is missing to force CDN cache the file fro mentioned server?
8
0
1.9k
Oct ’24
Family Controls Issues with Multiple Functionalities
I am developing an application that utilizes Family Controls to restrict the use of certain apps. Currently, I am using the following extensions: DeviceActivityMonitor, ShieldConfiguration, and ShieldAction. Issue Overview: While blocking a single application functions correctly, a problem arises when implementing multiple functionalities that use these extensions for the same application. STEPS TO REPRODUCE Functionality 1: Maximum Time in App Description: Blocks the app after 15 minutes of continuous use. Functionality 2: Conscious Opening Description: Upon opening the app, it is blocked for 10 seconds and then automatically unlocked. Steps to Reproduce the Bug: Open the Application: The app opens normally. Trigger Functionality 2 The app is blocked and displays the blocking screen corresponding to Functionality 2: Conscious Opening. Continue Using the App After 10 seconds, the app unlocks, and I continue using it. Important: If the app is closed at this point, the bug does not occur. Trigger Functionality 1 After 15 Minutes After 15 minutes of continuous use, the app should block according to Functionality 1: Maximum Time in App. Expected Behavior: The blocking screen for Functionality 1 is displayed. Actual Behavior: The blocking screen for Functionality 2 is displayed instead. Technical Observations: By adding logs in ShieldConfiguration, I observed that the configuration does not refresh correctly when the app is blocked a second time while still in use. If the app is closed and reopened, the correct blocking screen for Functionality 1 is displayed as expected.
0
0
261
Dec ’24
steam game crash. HELP
Process: ArmA3 [9180] Path: /Users/USER/Library/Application Support/Steam/*/ArmA3.app/Contents/MacOS/ArmA3 Identifier: com.vpltd.Arma3 Version: 1.82.0 (20230605.1) Code Type: X86-64 (Translated) Parent Process: launchd [1] User ID: 501 Date/Time: 2024-10-19 11:33:49.3660 +0100 OS Version: macOS 15.1 (24B5077a) Report Version: 12 Anonymous UUID: C2C26AB0-3885-5F5F-E3E0-4D98B373493E Sleep/Wake UUID: 8FDB755C-9D72-4485-BB5A-BD8593ADEF9F Time Awake Since Boot: 31000 seconds Time Since Wake: 8273 seconds System Integrity Protection: enabled Notes: PC register does not match crashing frame (0x0 vs 0x10011E9BB) Crashed Thread: 33 E.d3d11.BackendThread Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000018 Exception Codes: 0x0000000000000001, 0x0000000000000018 Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11 Terminating Process: exc handler [9180] VM Region Info: 0x18 is not in any region. Bytes before following region: 4294967272 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL UNUSED SPACE AT START ---&gt; __TEXT 100000000-101b74000 [ 27.5M] r-x/r-x SM=COW /Users/USER/Library/Application Support/Steam/*/ArmA3.app/Contents/MacOS/ArmA3 Error Formulating Crash Report: PC register does not match crashing frame (0x0 vs 0x10011E9BB) Thread 0:: E.runloop Dispatch queue: com.apple.main-thread 0 ??? 0x7ff895c16a84 ??? 1 libsystem_kernel.dylib 0x7ff8059d9e0e mach_msg2_trap + 10 2 libsystem_kernel.dylib 0x7ff8059e8622 mach_msg2_internal + 84 3 libsystem_kernel.dylib 0x7ff8059e0f16 mach_msg_overwrite + 649 4 libsystem_kernel.dylib 0x7ff8059da0ff mach_msg + 19 5 CoreFoundation 0x7ff805aff9dd __CFRunLoopServiceMachPort + 143 6 CoreFoundation 0x7ff805afe3ed __CFRunLoopRun + 1393 7 CoreFoundation 0x7ff805afd84c CFRunLoopRunSpecific + 550 8 HIToolbox 0x7ff811618ec3 RunCurrentEventLoopInMode + 292 9 HIToolbox 0x7ff81161e8a4 ReceiveNextEventCommon + 646 10 HIToolbox 0x7ff81161ea42 _BlockUntilNextEventMatchingListInModeWithFilter + 66 11 AppKit 0x7ff809381b6f _DPSNextEvent + 902 12 AppKit 0x7ff809db66b4 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1290 13 gameoverlayrenderer.dylib 0x11a99b2fe 0x11a97c000 + 127742 14 ArmA3 0x100060dbd 0x100000000 + 396733 15 ArmA3 0x1002e8cb0 0x100000000 + 3050672 16 CoreFoundation 0x7ff805af4d5e CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER + 137 17 CoreFoundation 0x7ff805b81254 ___CFXRegistrationPost_block_invoke + 86 18 CoreFoundation 0x7ff805b811aa _CFXRegistrationPost + 528 19 CoreFoundation 0x7ff805ac4bde _CFXNotificationPost + 817 20 Foundation 0x7ff806a3c08b -[NSNotificationCenter postNotificationName:object:userInfo:] + 82 21 AppKit 0x7ff80938b59f -[NSApplication _postDidFinishNotification] + 311 22 AppKit 0x7ff80938b2e4 -[NSApplication _
1
0
457
Oct ’24
Populating Top Hits Shortcuts in Search for My App
Hello, I have written a new app shortcut using the iOS AssistantIntent macro for the system.search scheme. It all works as it should. I can find it in the short cuts apps and if I search for my app in the Search feature of Springboard my app icon shows under top hits along with its associated search shortcut. When the shortcut is invoked it prompts for the text to search for and then it launches once the text is entered. This is fine but I would also like to have automatically created some additional shortcuts items where some of the common items I expect people to search for are already available so that when tapped they aren't prompted for search text and the intent is automatically launched with the query text. I'd like these to show up under top-hits for my app and in the shortcuts app as well. I noticed that if I manually create the shortcuts in the shortcuts app then they show up under top-hits. However as I said I would like for my app to provide these automatically but I am unsure how to go about this and which APIs I should using. Thx
0
0
248
Dec ’24