Extensions

RSS for tag

Give users access to your app's functionality and content throughout iOS and macOS using extensions.

Posts under Extensions tag

200 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Predicitive Text is presenting suggestions in incorrect language when 3rd party keyboard is installed
I'm the developer of a third-party keyboard app, Snippety - Snippets Manager, which is designed for using snippets rather than regular typing. One of my users has encountered a strange issue: after installing my keyboard (even when it is not actively in use), the predictive text bar starts showing suggestions in Polish. This happens despite the Polish language not being installed on the device. The issue resolves as soon as my keyboard is uninstalled from the system settings. Interestingly, my application (including the keyboard) does not support the Polish language, nor is Polish specified anywhere in the app. The app was developed and published from macOS in English. This seems to be an iOS bug. The only language-related configuration in my keyboard is the PrimaryLanguage key in the Info.plist file, which I set to "mul" because the keyboard is not intended for typing. I also tried setting it to "mis", but the issue persists. The video presenting this issue on an iPhone 15 simulator running iOS 17.5: https://www.dropbox.com/scl/fi/xjdyucxpmv1cv0mnmwzvd/prdictive-text-issue.mp4?rlkey=aphznpdti08pz8xl84ojbyxz3&dl=0 Info.plist for my keyboard: My project settings: Steps to reproduce: Configure iOS to use English language only, with English keyboard Enable predictive text feature in the system Install Snippety keyboard Use the regular keyboard & start typing "dzie" Actual result: Polish predictions appear even though the Polish language is not installed or declared by the keyboard. Expected result: The predictive text should present predictions based on system settings. What is even more weird, I discovered that when I add the keyboard in system settings, it automatically installs Polish language in the system settings. I even changed PrimaryLanguage to "de" (German) in Info.plist but it still installs Polish. See: https://www.dropbox.com/scl/fi/aiv5g4z331zwy827zj47v/incorrect-language-installed.mp4?rlkey=16v5gqmb6mj8yuyyd7jwmjnsw&dl=0 Any ideas what could be wrong? I also created a ticket: #FB13949087 I also found a similar issue from 2018 (O_O) reported here: https://stackoverflow.com/questions/53069262/ios-adds-new-preferred-language-when-installing-my-3rd-party-keyboard
2
0
276
Jun ’24
Safari Web Extension runs fine on Simulator, but not on Device
I am writing this Web Extension for Safari. It is designed to run on both macOS and iOS. The extension-specific javascript/css/etc files are shared between the platforms. What I observe is that the extension is running fine on macOS. It also runs fine on the iOS Simulator. However, on my device, just nothing happens when activating the extension. No errors are output to the console either. I found it out the hard way, when I already released the extension in the AppStore, and installed it on a friend's iPhone. Does anyone have a clue where I even could start debugging? Or better: maybe there is just a simple checkbox that that I should (un)check?
0
0
244
Jun ’24
What is a timeout period for message filter extension's network query
In the documentation of deferQueryRequestToNetwork method which is used to do a network request on message filter extension. There is no mention of timeout period applied to network requests. https://developer.apple.com/documentation/sms_and_call_reporting/ilmessagefilterextensioncontext/2880240-deferqueryrequesttonetwork So my question is what is the timeout period of the deferQueryRequestToNetwork method? And is there some changelog to know has this value changed in some iOS version.
1
0
184
Jun ’24
What is timeout period in message filter extension's network query
In the documentation of deferQueryRequestToNetwork method which is used to do a network request on message filter extension. There is no mention of timeout period applied to network requests. https://developer.apple.com/documentation/sms_and_call_reporting/ilmessagefilterextensioncontext/2880240-deferqueryrequesttonetwork So my question is what is the timeout period of the deferQueryRequestToNetwork method? And is there a changelog that this timeout has changed at some point during iOS update?
0
0
163
Jun ’24
Can I have multiple types of ControlWidget?
I am trying to add more than one ControlWidget in iOS 18 and I get an error and not sure whether I am doing anything wrong or there is a bug (or maybe it's not supported by design?) I get the following error: encountered an error: Error Domain=com.apple.dt.deviceprocesscontrolservice Code=8 "Failed to show Widget 'check.ios18-test.intent-ext-ui' error: Error Domain=FBSOpenApplicationServiceErrorDomain Code=1 "The request to open "com.apple.springboard" failed." UserInfo={NSLocalizedFailureReason=The request was denied by service delegate (SBMainWorkspace)., BSErrorCodeDescription=RequestDenied, NSUnderlyingError=0x600000cb7060 {Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=2 "Please specify the widget kind in the scheme's Environment Variables using the key '_XCWidgetKind' to be one of: " These are the two ControlWidgets I am trying to create: struct GetPointIntent: AppIntent { static let title: LocalizedStringResource = "Get Point" func perform() async throws -> some IntentResult { return .result() } } struct LeftButton: ControlWidget { static let kind: String = "check.ios18-test.left" var body: some ControlWidgetConfiguration { StaticControlConfiguration(kind: Self.kind) { ControlWidgetButton(action: GetPointIntent()) { Label("Plus", systemImage: "arrowshape.left") Text("\(AppState.points)") } } .displayName("Left") .description("Left Move") } } struct RightButton: ControlWidget { static let kind: String = "check.ios18-test.right" var body: some ControlWidgetConfiguration { StaticControlConfiguration(kind: Self.kind) { ControlWidgetButton(action: GetPointIntent()) { Label("Plus", systemImage: "arrowshape.right") } } .displayName("Right") .description("Right Move") } } @main struct intent_ext_uiBundle: WidgetBundle { var body: some Widget { RightButton() LeftButton() } } The app builds but upon running I get the mentioned error from Xcode
2
0
299
Jun ’24
HKObserverQuery not working in background
I'm developing a single target watchOS app that obtains HealthKit information. I have the "Background Delivery" option checked under "Signing & Capabilities" for the watch target. The app does HKObserverQueries in the foreground that work as I would expect. But when I click the Digital Crown to return to clock face, the HKObserverQuery activity stops. I'm using Xcode 15.4, on Mac 14.5 and a Apple Watch Series 4 running 10.5.
2
0
259
Jun ’24
Adding Mention support in Mail.app using MailKit APIs
Hi, Can I use the MailKit API to add mention support to Mail App. Where I write "@deepak" and my extension suggests me emails starting with the name "deepak" from my contacts. I see there is MEComposeSessionHandler.viewControllerin the mail kit API. But I think, according to the WWDC demo, it can only create UI in the toolbar section of the compose window. Any help will we appreciated here!
0
0
255
Jun ’24
iOS 17.5.1 safari extension - background scripts not working properly
We had developed an iOS Safari web extension (which uses non-persistent background scripts) that functioned properly until iOS 17.3. However, I've encountered inconsistent behavior on iOS 17.4.1, 17.5, and 17.5.1. Upon further debugging, I noticed that the background scripts often become idle and are unloaded frequently. They are not loaded again even for the registered webNavigation events and only trigger when interacting with the extension popup menu. This is also mentioned here. I had tried this in both manifest versions 2 & 3. I had tried using service_worker for background scripts. But, none of it seems to resolve this issue. Could you please clarify if this is a bug or an intended behavior? Our extension relies on webNavigation events without users having to interact with the popup menu often.
1
7
539
3w
GlobalProtect(GP) and AnyConnect(AC) are both VPN apps. They both create a TUN interface and set default route to this interface.
macOS MacOS 14 Apple Silicon DESCRIPTION OF PROBLEM GlobalProtect(GP) and AnyConnect(AC) are both VPN apps. They both create a TUN interface and set default route to this interface. Test cases: AC connect first and GP connect second, both work fine. GP connect first and AC connect second, AC failed with some "route error". Our question is why the route failed for AC if GP already set the default route? Does MacOS has some limitations for the default route? STEPS TO REPRODUCE GlobalProtect(GP) and AnyConnect(AC) are both VPN apps. They both create a TUN interface and set default route to this interface. Test cases: AC connect first and GP connect second, both work fine. GP connect first and AC connect second, AC failed with some "route error".
0
0
190
May ’24
File Provider Extension Fails to Launch but Still Appears on Side Bar
I am developing a Mac File Provider Extension. When testing installation from-scratch, The File Provider Name does appear on the side bar. However, the text '[App Name] encountered an unexpected error. Items may be out of date .....Try Again' appears at the top of the Finder window when opening the File Provider's Domain. Along with this text, there is a persistent 'Loading...' that is displayed in the middle of the Finder view. The File Provider seems to immediately get in a bad state. This does not happen at all during development. I am also noticing some logs in console that indicate some sort of issue. These 3 seem to be relevant. Any ideas or insight what could be going on? create-item(propagated:<root dbver:0 domver:<nil>>) why:itemChangedRemotely|diskImport sched:default.1717009685.233681#1717009069.3164978 error:<NSError: Cocoa 4101 "Couldn’t communicate with a helper application." Underlying={NSError: NSFileProviderInternalErrorDomain 7 "A connection to the extension “REMOVED ID” could not be made." Underlying={NSError: com.apple.extensionKit.errorDomain 2 "The operation couldn’t be completed. (com.apple.extensionKit.errorDomain error 2.)" UserInfo={(omitted)}}}}}>> → <requested:<p:root n:"i{31}e" dir child:0 m:rwxS ct:1717009068.969699 mt:1717009068.969699>> [duration 33ms44µs] Failed to create extensionProcess for extension 'REMOVED ID' error: Error Domain=com.apple.extensionKit.errorDomain Code=2 "(null)" UserInfo={NSUnderlyingError=0x7fa0ce9d28b0 {Error Domain=com.apple.extensionKit.errorDomain Code=2 "(null)" UserInfo={NSUnderlyingError=0x7fa0ce9d2ad0 {Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x7fa0ce9d33e0 {Error Domain=NSPOSIXErrorDomain Code=111 "Unknown error: 111" UserInfo=0x7fa0ce9d2900 (not displayed)}}}}}} Launch failed with error: Error Domain=com.apple.extensionKit.errorDomain Code=2 "(null)" UserInfo={NSUnderlyingError=0x7fa0ce9d2ad0 {Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x7fa0ce9d33e0 {Error Domain=NSPOSIXErrorDomain Code=111 "Unknown error: 111" UserInfo={NSLocalizedDescription=Launchd job spawn failed}}}}}
1
0
306
May ’24
Concurrent XPC connections to an extension process and its scenes?
When using ExtensionKit, is it expected that an app would be able to open concurrent XPC connections to both an extension process (via AppExtensionProcess.makeXPCConnection) and that extension's scenes (via EXHostViewController.makeXPCConnection)? I'm finding that if I make a connection to an extension process, communication with the process works fine until I try to make a connection to a scene in that extension ... at which point the extension receives SIGKILL and an OSLaunchdErrorDomain code 137 "Service does not support the specified action" error is logged to the console. Similarly, if I first make one or more connections to extension scenes, communication with the scenes works fine until I try to make a connection to the extension process ... at which point the same result and error occur. So it seems that I can either communicate with an extension process or that extension's scenes, but not both. Is this an expected limitation, or should I be able to communicate with an extension process and its scenes at the same time?
3
0
254
Jun ’24
How to use camera extension with external app
Hi, I'm new to coding for MacOS but I'm building a Godot app that I wish to be able to have create a virtual camera on MacOS via button click. I plan to use the GDExtension feature to interface with code for MacOS to do this. I was looking into what would be involved with this and came across the Camera Extension that can be bundled with MacOS apps that can be used to create a virtual camera. Is it possible to bundle this extension with a library or framework that I can then interact with using C++ in a GDExtension (an external app). I realise the extensions can only be registered from within the Application folder so the assumption is that the Godot app would be installed there.
1
0
258
May ’24
How to immediately cause eviction for Item upon creation?
I am developing a FileProvider extension on Mac. I was wondering what the most reliable way to evict a document as soon as possible after createItem is called for the respective item. Our use-case for this is as follows: Users can 'bulk-import' items into a FileProvider folder, and we want our application to immediately evict the item as soon as possible once the item's content is uploaded to the server. This is to save space on the user's machine. So, what is the best way to accomplish immediate eviction after item creation? I've tried calling evictItem from within the createItem function itself, but that yields many errors and can cause slowness.
3
0
418
May ’24
NO EXTENSIONS INSTALLED on Settings > Safari > Extensions
I'm developing an extension on Xcode, trying to test on my iPhone 7 plus. When I connect my iPhone with my Mac that Xcode is running on, and click Run, the app shows up on my iPhone. But when I check Settings > Safari > Extensions, it says "NO EXTENSIONS INSTALLED. Extensions customize the way Safari works. Extensions can change the appearance or behavior of web content, add buttons to Safari, and more." I'm using : Xcode : Version 14.0.1 Mac OS monterey : Version 12.7.5 iPhone 7 plus : Version 15.8.2
1
0
258
May ’24
'iCloud' displayed when File Provider Item is marked as 'Shared'
I am developing a File Provider on Mac. I am marking some items within the domain as 'shared' via the NSFileProviderItemProtocol. However, the text 'Folder shared on iCloud by me' appears in Finder when these items are marked as shared. Is this correct? My provider has nothing to do with iCloud, which is, of course, the cloud developed by Apple. Is there a way to change this text or remove it? I've attached an image that shows the problem.
1
0
372
May ’24
Finder Sync Extension develop in macos 14.4 but crash in macos 10.15
Hello, I am developing a Finder plugin for a MacOS application. It was working fine during development and testing on os version 14.4. However, when I tried running the application on os version 10.15, it notworking.If I run the plugin binary directly, it will crash. crash info: Time Awake Since Boot: 1100 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_INSTRUCTION (SIGILL) Exception Codes: 0x0000000000000001, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Termination Signal: Illegal instruction: 4 Termination Reason: Namespace SIGNAL, Code 0x4 Terminating Process: exc handler [719] Application Specific Information: Configuration error: Couldn't retrieve XPCService dictionary from service bundle. Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libxpc.dylib 0x00007fff71b04bfb _xpc_copy_xpcservice_dictionary.cold.1 + 14 1 libxpc.dylib 0x00007fff71af2fcd _xpc_copy_xpcservice_dictionary + 106 2 libxpc.dylib 0x00007fff71af2e27 xpc_main + 61 3 com.apple.Foundation 0x00007fff3a0a5e6f -[NSXPCListener resume] + 155 4 com.apple.pluginkit.framework 0x00007fff6258decb 0x7fff62575000 + 102091 5 com.apple.pluginkit.framework 0x00007fff6258dbf4 0x7fff62575000 + 101364 6 com.apple.pluginkit.framework 0x00007fff6258e2b2 0x7fff62575000 + 103090 7 com.apple.Foundation 0x00007fff3a11eb4c NSExtensionMain + 49 8 libdyld.dylib 0x00007fff718a5cc9 start + 1 This issue just requires creating the simplest APP project + FinderSyncExtension project in Xcode 14.4 on macOS. Set the minimum supported system to 10.15 to reproduce the issue. How can I resolve it?
16
0
476
Jun ’24
Can iOS extension use the same binary as app?
I have an iOS SwiftUI app which uses some extensions like NotificationServiceExtension, NotificationContentExtension, WidgetExtension etc. I noticed that each extension uses its own process and has its own bundle with the .appex extension... and is packaged within the app bundle, with .app extension. In my case, most of my logic is in C++ and when the app starts up, it needs to 'startup' the C++ layer. Now, in WidgetExtension, if it's going to read data from disk and update its interface, I need to initialise my C++ layer first. The same can be said for NotificationServiceExtension. This is leading me to include all my C++ artefacts into the extension target as well. Here's my problem: If the size of my app (containing all my C++ artefacts) is 10MB and I'm using 20 extensions (say), the final size of the shipped app bundle is 10MB + (20 * 10MB) = 210MB, since extension bundle (.appex) is packaged within the app bundle (.app). Since the app and the extensions are using the same C++ artefacts, I was hoping to have one binary in the bundle. The app and its extensions will point to this binary. When the app is launched, the app entry point (struct conforming to App protocol) is invoked, in case of widget, the widget entry point (WidgetBundle) is invoked and so on for each extension. This will reduce the final size of the app bundle. Is it possible to have one binary and the app target, all extension targets would use this binary for there functioning?
1
0
327
May ’24