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

LockedCameraCapture - Extension's view.frame size is smaller than app's one.
I'm developing Locked Camera Capture Extension. I noticed UIViewController's view.frame size on extension is smaller than app's one. It seems extension's View.frame is same as safe-area's frame. WWDC24 session Build a great Lock Screen camera capture experience doesn't mention this issue. It looks like bug for me or is it intended specification to avoid complexity for users ?
0
0
187
Oct ’24
Xcode 16 : dyld[4373]: Symbol not found:
I am getting following error from one of the pod frameworks while running the app (Build is a success). dyld[4373]: Symbol not found: __ZN5swift39swift51override_conformsToSwiftProtocolEPKNS_14TargetMetadataINS_9InProcessEEEPKNS_24TargetProtocolDescriptorIS1_EEN7__swift9__runtime4llvm9StringRefEPFPKNS_35TargetProtocolConformanceDescriptorIS1_EES4_S8_SC_E Referenced from: MyApp.app/Frameworks/vendor.framework/ Expected in: MyApp.app/Frameworks/Alamofire.framework/Alamofire Xcode 16
2
1
235
Oct ’24
Interface Orientation doesn't work for LockedCameraCapture extension.
I'm developing LockedCameraCapture extension. My extension can capture photo, save to system photo library and load from system photo library. That's pretty nice extension. I want to fix interface orientation to portrait for particular screen(capture screen). But I want some other screen to landscape orientation(photo viewing screen). So, I'm using "supportedInterfaceOrientations" property and "setNeedsUpdateOfSupportedInterfaceOrientations" method for interface orientation flexibility. This code implies the screen only supports portrait orientation. override var supportedInterfaceOrientations: UIInterfaceOrientationMask { .portrait } And I call this code to enable orientation setting. // UIViewController # viewDidLoad setNeedsUpdateOfSupportedInterfaceOrientations() My App work as expected, but my CaptureExtension doesn't work. My extension's capture screen can rotate Landscape and that's not intended behavior.
2
0
263
Oct ’24
Custom keyboard while using external keyboard for iPad
Hi! I'm developing a custom keyboard and my user reported that they can't switch to my keyboard while using external original iPad keyboard. Unfortunately, I can't test it on a real device and I can't find a way to test it using a simulator. My questions: Is it possible to simulate this case on a simulator? Is it possible to temporarily show a custom keyboard while using an external keyboard on iPad? I saw in the photos that this keyboard has a globe button, but my user told me that nothing happens when they hold or press hit.
1
0
231
Oct ’24
Can Logic Pro load an Audio Unit v3 in-process?
After investing more than a week into getting a bunch of audio unit projects converted into app + appex + framework, they all are now correctly loaded in-process in the demo host app that is part of Xcode's template. However, Logic Pro adamantly refuses to load them in-process. Does Logic Pro simply not do that ever, or is there some hint or configuration my plugins need to provide to enable that? If it is unsupported, will it be supported in some future version of Logic? The entire point of investing that week was performance, which is moot if it is impossible to test the impact of loading in-process in a real-world usage scenario.
0
0
255
Oct ’24
Get cookies - Safari web extension macOS 18.1
I have a macOS safari web extension and It can read the cookies of my website, but when I fully close safari and open it again the extension can't read the cookies anymore. When I try to inspect the cause in the console (safari > develop > web extension background content) everything starts to work again. My safari version is 18.1 (19619.2.8.111.1, 19619)
4
2
287
3w
Issue with Message Filter Extension service?
My server that backs my Message Filter Extension stopped receiving messages last night. I thought maybe I had broken something in the iOS code, even though I hadn't touched any of the logic related to filtering. So I rolled back my code to a previous version that was definitely working in both test and production and ran it on my test device, setting a breakpoint on the first line of the func handle(_ queryRequest: ILMessageFilterQueryRequest, context: ILMessageFilterExtensionContext, completion: @escaping (ILMessageFilterQueryResponse) -> Void) method in the extension. When sending a message to it from an unknown number, the breakpoint is never even hit. To ensure it was somehow not my code, I started a new blank app and added the Message Filter Extension target. Running it on my test device, it also doesn't ever hit the breakpoint. Is there some Apple service involved in determining whether to send unknown sender messages to Message Filter Extensions that might be down. Maybe it's a beta issue? I'm on iOS 18.1 Beta 4. But it seems odd that all of my users' devices would be encountering a beta-related issue at essentially the same time.
2
0
228
3w
Inconsistent Live Caller ID Lookup Performance
I've noticed delays with the Live Caller ID Lookup feature, taking around 3 to 6 seconds to complete, even on repeated lookups. This seems odd since there's no server activity during these repeats, suggesting the information might be coming from a cache. Most of the time, it’s fast, but there are cases when it's unexpectedly slow, and I haven’t quite figured out the pattern yet. Is anyone else seeing this issue? FB number FB15372765 - with sysdiagnose and video demonstrating the delay.
0
0
173
Oct ’24
How to add a Sticker App Extension to an existing app with an iMessage Extension?
I have a working iMessage app in the app store that does NOT have a companion app. iMessage app only. I now want to add stickers to it. I cannot get this to work; stickers do not show up in the stickers section, nor in the "Manage Sticker Apps" section. Problem exists on Xcode 16, latest OS, on all simulators and devices. I tried adding a new "Sticker App Extension" target to the project. I tried adding just the Stickers.xcassets file to the exsisting iMessage extension and the app itself. I tried googling but all examples and tutorials show how to create a complete stickers app, which works correctly. But I do not want the app. Notable mention: If I create a new "Stickers app" project it works, but if I then try to add an iMessage app extension, THAT does not work so I then have a reverse situation in which the stickers extension DOES work but the iMessage app doesn't. I somehow have the feeling that an app cannot have both an iMessage Extension and a Stickers App Extension but the documentation is, of course, in true Apple style, lacking. So how to add a Sticker App Extension to an existing app with an iMessage Extension?
1
0
248
2w
Can MailKit be used to manage existing messages?
I would like to create a MailKit extension that will allow me to manage my existing messages. I would like to move them around form folder to folder and reqad and update their headers to store some metadata that will be used by the extension. Looking at the documentation for MailKit suggests that I can only implement 4 types of handlers (content blocker, action handler, compose handler and security handler). I can’t see anything in the docs about being able to get a list of messages in the inbox and manipulate them. Am I missing something? I’d love to hear from someone who knows more about this topic before I get into a dead-end rabbit hole. cheers, -tomek
0
0
182
Oct ’24
Sonoma/Xcode 16 Share extensions do not work
My app has extensions, including a share extension. When I upgraded to Sonoma and Xcode 16, the share extension compiles but it does not show up as an share option in any apps. The other extensions are working correctly. So I then created a blank project from scratch and created a new share extension using the included wizard. I added the appropriate extension options, and no matter what I tried, even TRUEPREDICATE, the share extension will not show. I confirmed the target deployment matches the main project and went through every possible check. No matter what I do, the share extension will not show (tested on ios 15, 16,17, and 18. I am pretty certain that there is a bug in either X code 16 or in X code 16 with Sonoma. Please verify - try to create a share extension and see if it works. Help is appreciated.
4
2
283
Oct ’24
Question with Message Filter Extension
Hi. I created a Message Filter Extension target to filter spam sms messages, deferring the request to my backend. The extension makes the call and send this payload: POST /server-endpoint HTTP/1.1 Accept: */* Content-Type: application/json; charset=utf-8 Content-Length: 148 { "_version": 1, "query": { "sender": "14085550001", "message": { "text": "This is a message" } }, "app": { "version": "1.1" } } My question is, is possible modify this payload to send the "receiver" number (is possible get the receiver number in this extension?), or use an identifier, to let my backend know which user number the filter was applied to. I think is impossible because the extension makes the call and create the payload, and I don't see anything in docs to add other prop, but there's other way to know the "receiver" number of the sms? Thanks:)
1
0
153
Oct ’24
Using MatterSupport framework to add Matter device to our system
1, I add an Matter extension named TRMatterExtension, using the Template in Xcode. 2, check the InfoPlist with the TRMatterExtension module, I see the NSExtension key with two key which are like this: 3,The RequestHandler.swift file is like this: import os import MatterSupport let logger = Logger(subsystem: "com.airdroitech.commissionMtr2", category: "MatterExtension") // The extension is launched in response to MatterAddDeviceRequest.perform() and this class is the entry point // for the extension operations. class RequestHandler: MatterAddDeviceExtensionRequestHandler { override init() { logger.log("QAWI3 - init") super.init() } override func validateDeviceCredential(_ deviceCredential: MatterAddDeviceExtensionRequestHandler.DeviceCredential) async throws { // Use this function to perform additional attestation checks if that is useful for your ecosystem. logger.log("QAWI3 - validateDeviceCredential") } override func selectWiFiNetwork(from wifiScanResults: [MatterAddDeviceExtensionRequestHandler.WiFiScanResult]) async throws -> MatterAddDeviceExtensionRequestHandler.WiFiNetworkAssociation { // Use this function to select a Wi-Fi network for the device if your ecosystem has special requirements. // Or, return `.defaultSystemNetwork` to use the iOS device's current network. logger.log("QAWI3 - Returning default system network") return .defaultSystemNetwork } override func selectThreadNetwork(from threadScanResults: [MatterAddDeviceExtensionRequestHandler.ThreadScanResult]) async throws -> MatterAddDeviceExtensionRequestHandler.ThreadNetworkAssociation { // Use this function to select a Thread network for the device if your ecosystem has special requirements. // Or, return `.defaultSystemNetwork` to use the default Thread network. return .defaultSystemNetwork } override func commissionDevice(in home: MatterAddDeviceRequest.Home?, onboardingPayload: String, commissioningID: UUID) async throws { // Use this function to commission the device with your Matter stack. logger.log("QAWI3 - Starting commissioning flow") } override func rooms(in home: MatterAddDeviceRequest.Home?) async -> [MatterAddDeviceRequest.Room] { // Use this function to return the rooms your ecosystem manages. // If your ecosystem manages multiple homes, ensure you are returning rooms that belong to the provided home. return [.init(displayName: "Living Room")] } override func configureDevice(named name: String, in room: MatterAddDeviceRequest.Room?) async { // Use this function to configure the (now) commissioned device with the given name and room. } } 4, I add Privacy - Local Network Usage Description and Bonjour services [ _matter._tcp _matterc._udp _matterd._udp ] to the main target's InfoPlist. 5, click a button to call MatterAddDeviceRequest.perform(), the code is as the following: let homes = [MatterAddDeviceRequest.Home(displayName: "TRHome")] let topology = MatterAddDeviceRequest.Topology(ecosystemName: "TR", homes: homes) let request = MatterAddDeviceRequest(topology: topology) do { try await request.perform() print("Successfully set up device!") } catch { print("Failed to set up device with error: (error)") } 6, Result: Most times, Matter devices can be added to the KeyChain and the commission window of the Matter device could be opened. But sometimes the MatterSupport window will show "Pairing Failed". The total error is: [1E1D8753] Failed to perform Matter device setup setup: Error Domain=HMErrorDomain Code=18 "Pairing Failed" UserInfo={HFErrorUserInfoOptionsKey={ HFErrorUserInfoOptionDescriptionKey = "Pairing Failed"; HFErrorUserInfoOptionTitleKey = "\U65e0\U6cd5\U6dfb\U52a0\U914d\U4ef6"; }, NSLocalizedDescription=Pairing Failed, NSUnderlyingError=0x3009e8240 {Error Domain=HAPErrorDomain Code=15 "Failed to pair Matter Accessory in time" UserInfo={NSLocalizedDescription=Failed to pair Matter Accessory in time, NSUnderlyingError=0x3009e86c0 {Error Domain=HAPErrorDomain Code=24 "(null)"}}}}. From the log I can see, the Function selectWiFiNetwork(from wifiScanResults: [MatterAddDeviceExtensionRequestHandler.WiFiScanResult]) async throws -> MatterAddDeviceExtensionRequestHandler.WiFiNetworkAssociation of the RequestHandler.swift file will be called and commissionDevice(in home: MatterAddDeviceRequest.Home?, onboardingPayload: String, commissioningID: UUID) will NOT called. Sometimes the RequestHandler class will not be called at all, this means the first function validateDeviceCredential will not be called. But ,when this happens, the iPhone will Continuously can NOT add device for a long time, sometimes it gets better inexplicably. Even under normal circumstances, the probability of successfully adding a device is less than 50% and very slowly. When using Apple Home app, the success rate is very high, almost 100%, and very fast. So, can you help me identify where the problem is and what areas need attention? Thank you very much! Finally, I often encounter logs like this: nw_browser_dns_service_browse_callback [B3] not in ready or waiting state Do you know what it means and whether it will affect the equipment distribution network? My testing machine is iPhone 12, operating on iOS 18 and above 17.0. Thank you very much!
3
0
321
Sep ’24