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

Post

Replies

Boosts

Views

Activity

Notification Service Extension not getting invoked on macOS
I’m testing remote push notifications on macOS, and although notifications are received and displayed correctly, my Notification Service Extension (NSE) never gets invoked. The extension is properly added as a target in the same app, uses the UNNotificationServiceExtension class, and implements both didReceive(_:withContentHandler:) and serviceExtensionTimeWillExpire(). I’ve also set "mutable-content": 1 in the APNS payload, similar to how it works on iOS — where the same code correctly triggers the NSE. On macOS, however, there’s no sign that the extension process starts or the delegate methods are called. import UserNotifications class NotificationService: UNNotificationServiceExtension { override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) { let modified = (request.content.mutableCopy() as? UNMutableNotificationContent) modified?.title = "[Modified] " + (modified?.title ?? "") contentHandler(modified ?? request.content) } override func serviceExtensionTimeWillExpire() { // Called if the extension times out before finishing } } And the payload used for testing: { "aps": { "alert": { "title": "Meeting Reminder", "body": "Join the weekly sync call" }, "mutable-content": 1 }, "MEETING_ORGANIZER": "Alex Johnson" } Despite all correct setup steps, the NSE never triggers on macOS (while working fine on iOS). Can anyone confirm whether UNNotificationServiceExtension is fully supported for remote notifications on macOS, or if additional configuration or entitlement is needed?
3
0
91
3w
PhotoKit Background Upload Extension not working on iOS 26.2 iPhone 17 Simulator
Hi, I’m trying to implement the new PhotoKit PHBackgroundResourceUploadExtension. I created the extension, enabled full photo library access in the host app, and registered the extension point using the string: com.apple.photos.background-upload. However, when I attempted to enable the extension with: try library.setUploadJobExtensionEnabled(true) I received the following error: Error Domain=PHPhotosErrorDomain Code=-1 "(null)" This happens when running the app on Xcode 26.1 and 26.2 Beta, using the iPhone 17 Pro Max simulator (iOS 26.1 and 26.2). My question is: Is this extension supported on the simulator? I’m asking because at the moment it’s difficult for me to test this on a physical device. Also, What's the meaning of the error? Thanks.
0
1
228
3w
Visual Intelligence: App Intent Not Found?
I'm making a PoC for Visual Intelligence integration in iOS. It's a very simple setup... the extension will always reply with a couple of static "results" just so I can verify that it's working and figure out how to handle receiving app activation from the Intents framework. The app seems to be registering the VI intent correctly, because I see my app's name in the tab list of providers for search results, but when I select my app, I always get no results. I looked at the console for the moment I'm selecting my app and seeing this error: error 16:37:09.433057-0600 duetexpertd [com.hairlessape.VisualIntelligenceProvider.VIAppIntent] Unable to get connection interface: Error Domain=LNConnectionErrorDomain Code=1100 "Unable to locate `com.hairlessape.VisualIntelligenceProvider.VIAppIntent` for the `com.apple.appintents-extension` extension point" No amount of web searching or AI interrogation has produced any headwind here. I've checked the build product and I can see the VIAppIntent.appex file in the Extensions\ folder of my app bundle. I've triple checked the bundle identifiers, code file membership, installed the app from an IPA, restarted my phone, etc. I cannot get my intent to be queried and it's very frustrating. I've put the PoC project on Github: https://github.com/JoshuaSullivan/VisualSearchForVI
5
0
120
3w
Sharing a JPEG via Action or Share Extension fails in Photos on macOS
We have a Share Extension that fails in Photos on macOS when trying to share a JPEG image for the following reason: From the NSItemProvider we get from the NSExtensionItem.attachments, we try to load the image using loadFileRepresentation(forTypeIdentifier: “public.image”, completionHandler: …). This fails for .jpeg images in the library. There seems to be a mismatch in expected and actual file extension internally. Here is the log: Error copying file type public.image. Error: Error Domain=NSItemProviderErrorDomain Code=-1000 "Cannot load representation of type public.jpeg" UserInfo={NSLocalizedDescription=Cannot load representation of type public.jpeg, NSUnderlyingError=0x1527c1a80 {Error Domain=NSItemProviderErrorDomain Code=-1 "Cannot copy file at URL file:///Users/frank/Library/Containers/com.apple.Photos/Data/tmp/TemporaryItems/ShareKit-Exports/7CCFA760-AAC9-42B0-812D-68F051ED1543/F912E593-2BE5-4E70-86AB-7657A40657E5/IMG_3517.jpg." UserInfo={NSLocalizedDescription=Cannot copy file at URL file:///Users/frank/Library/Containers/com.apple.Photos/Data/tmp/TemporaryItems/ShareKit-Exports/7CCFA760-AAC9-42B0-812D-68F051ED1543/F912E593-2BE5-4E70-86AB-7657A40657E5/IMG_3517.jpg., NSUnderlyingError=0x152789670 {Error Domain=NSItemProviderErrorDomain Code=-1 "Cannot create a temporary file. Error: Undefined error: 0" UserInfo={NSLocalizedDescription=Cannot create a temporary file. Error: Undefined error: 0}}}}}``` In the specified folder, there is an image, however, it’s named IMG_3517.jpeg, not IMG_3517.jpg. This seems to be a bug in Photo’s item provider implementation. If we use loadObject(ofClass: URL.self, completionHandler: …) instead, we get the correct .jpeg URL in the completion handler.
3
1
1.3k
4w
Action Extensions: How do Amazon & Google open their apps?
Both follow the same pattern: show the image that is being shared along with a CTA button about doing something with it in their app. When you tap the button, their app opens. Is there some kind of magic conditions that tapping the button creates that makes extensionContext.open(_ URL: URL, completionHandler: ((Bool) -> Void)?) accept a URL for opening the app? Or are they just using the "walk the responder chain" hack and using the user's intent to do something in their app as sufficient justification for using it? I've tried opening a registered URL scheme for my app synchronously with the button tap, but it still is refusing to open (callback returns false).
0
0
32
Nov ’25
App crashes due to a third-party library we use making a bad memory access.
Is there a way to prevent or handle our application's crash if a third-party library makes a bad memory access? Basically, I want to know if using a buggy library (that causes bad memory access) will automatically make our application inherit those crashes, leading to our app crashing as well. If there is a way to prevent the crash, what methods can be used to do so? Thread 13: EXC_BAD_ACCESS (code=1, address=0x3a7d300)
2
0
171
Nov ’25
Share Extension not working on macOS Tahoe and Photos App
When my Share Extension receives an image from the macOS Photos app on Tahoe, the NSItemProvider passes a URL to an image file in a temporary location. All attempts to read that file fail silently, such as with NSImage(contentsOfFile) I can see that the file does exist in Finder. This code did work in previous macOS versions. It seems like a permissions issue, but startAccessingSecurityScopedResource had no effect. Other platforms work, other apps work, such as shares from Finder, which shares via data instead of a url. I'm really stuck. Has anyone else run into this? // make sure provider has a conforming item if itemProvider.hasItemConformingToTypeIdentifier(imageType) { do { let data = try await itemProvider.loadItem(forTypeIdentifier: imageType, options: nil) // data may be image NativeImage, Data, or a URL to an image file. // figure out which by casting, then attempt to load uiImage if let image = data as? NativeImage { print("found NativeImage") self.images.append(image) } else if let data = data as? Data { print("found Data") if let image = NativeImage(data: data) { self.images.append(image) } } else if let url = data as? URL{ print("found URL") if let image = NativeImage(contentsOfFile: url.path) { print("loaded from URL") self.images.append(image) } } }catch{ print("⛔️ Share Extension Error: \(error.localizedDescription)") } }
1
0
109
Nov ’25
Unable to Provision Payment pass to Apple Wallet via Wallet Extensions.
We are working with two types of wallet passes. Provisioning works successfully for one pass type via wallet extensions, but the same process is not functioning for the other. For the second pass type, we are able to generate the required data for pull provisioning and send it to Apple. Additionally, in-app push provisioning for this pass type completes without issue. We would appreciate guidance on how to further debug and resolve this provisioning problem.
0
0
38
Nov ’25
Unable to retrieve already provisioned passes via Apple Wallet Extension
We have updated the PNO metadata to include the associatedApplicationIdentifiers for our wallet extensions and the issuer app. While we are able to successfully provision the card to Apple Wallet via pull provisioning, we are unable to retrieve the payment passes that have already been provisioned. How can we address this issue? let passLibrary = PKPassLibrary() let paymentPassLibrary = self.passLibrary.passes(of: .secureElement) paymentPassLibrary is an empty array even though we have passes provisioned.
0
0
45
Nov ’25
Uploading asset resources in the background
1.May I ask if the Background Upload can run normally in the Release version of ios 26.1? I used the Release version of ios 26.1 for debugging and found that the background upload couldn't be triggered for a long time. I debugged in ios 26.2 and found that background upload could be triggered normally, but kept triggering an Error: "Error returned from daemon: error Domain=com.apple.accounts Code=7 "(null)"
1
0
251
Nov ’25
Custom Keyboard Extension Not Showing in Settings for Activation
Hi everyone, I’m developing a React Native iOS app that includes a custom keyboard extension for sending stickers across apps. The project builds successfully, and the main app installs fine on my test device. However, I’m not seeing the keyboard extension appear under Settings → General → Keyboard → Keyboards → Add New Keyboard, which means I can’t activate it or grant access. At this point, I’m not even sure if the extension is actually being installed on the device along with the main app. Here’s what I’ve done so far. I created a Keyboard Extension target in Xcode, set the correct bundle identifiers and provisioning profiles, and enabled “Requests Open Access” in the extension’s Info.plist. I built and installed the app on a physical device rather than the simulator to ensure proper testing. My main questions are: how can I confirm that the extension is being installed on the device, and if it isn’t, what might prevent it from installing even though the build completes successfully? Any insights, troubleshooting steps, or guidance would be greatly appreciated.
0
0
672
Nov ’25
Warning on Archiving - ExtensionKit extension not embedded
Hello! Ive been working on a package tracking app for iOS and was looking forward to pushing it to TestFlight for some testers to use. When I go to archive the package, I get a warning about the "...TrackerIntents.appex is an ExtensionKit extension and must be embedded in the parent app bundle's Extensions directory, but is embedded in the parent app bundle's Tracker.app/Extensions directory". The extension is for siri integration with shortcuts. I have done quite a lot of things to try and diagnose this but cant seem to get passed this warning. I know it's a warning but would rather it not exist. Ideally I would think its a matter of "moving" the items but in the navigation area, I dont see an extensions area. The main app target has it in the dependencies along with the EmbedExtensionKit Extensions in the Build Phases. Any ideas or configs I can try? I can provide more information if needed. This is on the latest Xcode version 26.0.1 for iOS 26. Thank you.
1
2
94
Nov ’25
WKWebView crashes in SSO App Extension on iOS 26 during loadRequest
We have a SAML-based SSO App Extension that uses WKWebView to load the SAML login request. This implementation has been working correctly on iOS versions prior to 26. However, starting with iOS 26, the extension consistently crashes when calling WKWebView.load(_:). The crash occurs inside WebKit, specifically in: /Library/Caches/com.apple.xbs/Sources/WebKit/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp at WebKit::WebPageProxy::loadRequest(...) No app-level exception is thrown, and the extension terminates with: Thread 10: EXC_BREAKPOINT (code=1, subcode=0x1a31dbe00) It appears that WKWebView initialization or WebsiteDataStore creation is now restricted in extension contexts on iOS 26, but this change is not documented in the SDK release notes. Could you please confirm if this is an intentional sandbox restriction in iOS 26 or a regression in WebKit? Steps to reproduce: Implement an App Extension using ASAuthorizationProviderExtensionAuthorizationRequest. Create a WKWebView instance in the extension. Attempt to load a SAML login request (POST request with headers). Observe immediate crash on iOS 26 (works fine on earlier versions). Expected behavior: WKWebView should load the request or fail gracefully as in prior releases, without crashing the extension process. Request: Please clarify if WKWebView usage inside extensions is officially unsupported as of iOS 26, and if so, recommend an alternative approach for handling SSO flows.
5
0
918
Nov ’25
Background shield application reliability
Hello! I am working on a screentime app and wondering if anyone has had success achieving reliable background shield application while using com.apple.ManagedSettingsUI.shield-configuration-service? I recently switched from com.apple.deviceactivity.shield-configuration (which worked reliably but isn't accepted by TestFlight) and have not found any consistency getting shields to apply while the app is backgrounded. I believe this is a known limitation of ManagedSettingsUI and want to know if there are successful workarounds or any specific patterns/timing that improve consistency?
1
0
113
Nov ’25
iOS 26: Maps share sheet no longer provides com.apple.mapkit.map-item and only shares short maps.apple/p/... URLs (how to get coordinates?)
Since iOS 26, the Apple Maps share sheet no longer provides a com.apple.mapkit.map-item attachment when sharing a location to my Share Extension. Additionally, on real devices the shared URL is now a short link (https://maps.apple/p/...), which does not contain coordinates. On the simulator, the URL still includes coordinates (as in previous iOS versions). I'm trying to find the official or recommended way to extract coordinates from these new short URLs. Environment: Devices: iPhone (real device) on iOS 26.0 / 26.0.1 Simulator: iOS 26.0 / 26.0.1 simulator (behaves like iOS 18 — see below) App: Share Extension invoked from Apple Maps -> Share -> my app Xcode: 26.0.1 Steps to Reproduce Open Apple Maps on iOS 26 (real device). Pick a POI (store/restaurant). Share -> choose my share extension. iOS 18 and earlier (lldb) po extensionContext?.inputItems ▿ Optional<Array<Any>> ▿ some : 1 element - 0 : <NSExtensionItem: 0x60000000c5d0> - userInfo: { NSExtensionItemAttachmentsKey = ( "<NSItemProvider: 0x600002930d20> {types = (\"public.plain-text\")}", "<NSItemProvider: 0x600002930c40> {types = (\"com.apple.mapkit.map-item\")}", "<NSItemProvider: 0x600002930bd0> {types = (\"public.url\")}" ); } Typical URL: https://maps.apple.com/place?address=Apple%20Inc.,%201%20Apple%20Park%20Way,%20Cupertino,%20CA%2095014,%20United%20States&coordinate=37.334859,-122.009040&name=Apple%20Park&place-id=I7C250D2CDCB364A&map=explore iOS 26 (lldb) po extensionContext?.inputItems ▿ 1 element - 0 : <NSExtensionItem: 0x6000000058d0> - userInfo: { NSExtensionItemAttachmentsKey = ( "<NSItemProvider: 0x600002900b60> {types = (\"public.url\")}", "<NSItemProvider: 0x600002900fc0> {types = (\"public.plain-text\")}" ); } URL looks like: https://maps.apple/p/U8rE9v8n8iVZjr On simulator iOS 26 same missing map-item provider - but the URL is still long and contains coordinates, like this: https://maps.apple.com/place?coordinate=37.334859,-122.009040&name=Apple%20Park&.. Issue The short URLs (maps.apple/p/...) cannot be resolved directly - following redirects ends with: https://maps.apple.com/unsupported The only way I've found to get coordinates is to intercept intermediate redirects - one of them contains the expanded URL with coordinate=.... Example of my current workaround: final class RedirectSniffer: NSObject, URLSessionTaskDelegate { private(set) var redirects: [URL] = [] func urlSession(_ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest) async -> URLRequest? { if let url = request.url { redirects.append(url) } return request } } Then I look through redirects to find a URL containing "coordinate=". This works, but feels unreliable and undocumented. Questions Was the removal of com.apple.mapkit.map-item from the Maps share payload intentional in iOS 26? If yes, is there a new attachment type or API to obtain an MKMapItem? What’s the official or supported way to resolve https://maps.apple/p/... to coordinates? Is there any MapKit API or documented URL scheme for this? Is intercepting redirect chains the only option for now? Why does the iOS 26 simulator still return coordinate URLs, while real devices don't?
2
0
247
Oct ’25
How to open up an extension point to a third-party app (extension)
According to the documentation, using Scope(restriction: .none) can expose the extension point to third-party app extensions. Below is my implementation, which ultimately results in an error. Code for declaring the extension point: @available(iOS 26.0, *) extension AppExtensionPoint { @Definition static var priceExtension: AppExtensionPoint { Name("priceExtension") UserInterface(false) Scope(restriction: .none) } } Code for locating the extension point: monitor = try await AppExtensionPoint.Monitor(appExtensionPoint: .priceExtension) When executing the code to locate the extension point, the following error occurs: However, in practice, I found that declaring the extension point in this way results in an error when trying to locate it: Error Domain=com.apple.extensionKit.errorDomain Code=19 "Failed to add observer" UserInfo={NSLocalizedDescription=Failed to add observer}
3
0
78
Oct ’25
Card provisioning not working from Apple Wallet Extension
We have developed Apple Wallet Extension for our App. The in-app provisioning for the card is working. However when we try to add the card from Wallet extension it gives error saying "Your issuer does not yet offer support for this card". From the apple documentation we can see the issues is same as mentioned in Scenario 2 at following link https://applepaydemo.apple.com/in-app-provisioning#8.4 We are getting eligibilityStatus as 0 Below is the response from Wallet captured using SysDiagnosis https://crt-pod1-smp-device.apple.com:443/broker/v4/devices/0434320BCB1A90022306073796318273728D0A367FA927F4/cards 200 Time profile: 1.77856 seconds { x-conversation-id = ...... Content-Type = "application/json" x-pod = "crt-pod1" x-xss-protection = "1; mode=block" Server = "Apple" x-pod-region = "paymentpass.com.apple" regionbrokerurl = "https://crt-pod1-smp-device.apple.com:443/broker" Date = "Wed, 06 Aug 2025 11:39:30 GMT" Content-Length = "488" x-envoy-upstream-service-time = "1400" Strict-Transport-Security = "max-age=31536000; includeSubdomains" cross-origin-opener-policy = "same-origin" x-keystone-correlationid = ...... x-content-type-options = "nosniff" Vary = "accept-language" x-frame-options = "SAMEORIGIN" } { applicationIdentifier = ......; auxiliaryCapabilities = { }; cardType = 4; deviceProvisioningDataExpected = 1; eligibilityStatus = 0; identifier = ......; learnMoreURL = "https://www.apple.com/ae/apple-pay/banks/ae/en-ae.html"; nonce = ......; paymentApplications = ( { appletTypeIdentifier = Argon; paymentType = Credit; } ); region = "paymentpass.com.apple"; sanitizedPrimaryAccountNumber = 7008; sanitizedPrimaryAccountPrefix = ""; }
1
0
120
Oct ’25
Unable to upload an iOS app with Extensions to the AppStore
Hi, I've tried adding Extensions (using ExtensionFoundation) to one of my iOS apps. They work using Xcode on my devices, but when I upload them to the AppStore, I get the following error: ITMS-90349: Invalid Info.plist value - The value of the EXExtensionPointIdentifier key, AsheKube.app.a-Shell.localWebServer, in the Info.plist of “a-Shell.app/Extensions/localWebServer.appex” is invalid. Please refer to the App Extension Programming Guide at https://developer.apple.com/library/content/documentation/General/Conceptual/ExtensibilityPG/Action.html#/apple_ref/doc/uid/TP40014214-CH13-SW1. I could not find relevant information on the web page pointed. I've tried different values for the "EXExtensionPointIdentifier", but none of them work. This value was generated by Xcode, since I did set the user-defined build setting EX_ENABLE_EXTENSION_POINT_GENERATION = YES, as explained in the instructions. At this point, I have no idea how to fix this issue.
2
0
203
Oct ’25