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

kext for x86_64 + arm64e change into only x86_64 after codesign.
I have a kext in app, and I can run it well on Xcode, but I cannot successfully run kextload command after archive. According to the error message, I then use "lipo -archs" to check kext archs, I found some strange things. Checkout the result of app in Xcode product directory: The result of app in Archive directory: Is there a way to resolve this issue? Where might the mistake be? Or Can I just copy app and code sign, notarize the app, then provide it for others to use?
1
0
362
Aug ’24
Open specific web extension in safari settings (iOS/App/Swift)
Hi all, I have a problem with trying to use UIApplication.shared.canOpenURL to open a specific web extension in the safari settings. When executing the code below the safari extension menu is shown but not the settings for the specific extension: if let url = URL(string: "App-prefs:SAFARI&path=WEB_EXTENSIONS/NAME_OF_EXTENSION") { if UIApplication.shared.canOpenURL(url) { UIApplication.shared.open(url, options: [:], completionHandler: nil) } } However, the weird thing is that when executing the above I can see some kind of an event that looks like it tries to click the specific extension. Furthermore, if I keep the settings open and tries to execute the code again it actually works, and the specific web extension's settings is open. Hope someone can help.
0
0
292
Aug ’24
Push Location Service Entitlement
Hello! Back on April 4th our team requested the push location service entitlement. Our app requires very similar background tracking as Find my or Life 360 where users agree to share locations and another user might want to prompt for an update. Since submitting on April 4th, we have received no response or update from our request. I've called and emailed with developer support 20+ separate times (They've escalated it at least 10 times at this point) with no response either. I've also submitted new requests in case our original got lost. Is there anyone else we can contact or talk with to get any progress? The developer support team is even at a loss for how long this is taking now. We are just completely lost on what our next step could be
1
1
327
Aug ’24
Authenticate Safari Extension with Web Application
Hi :) I am building browser extension that is integral part of our bigger web service. Since it needs to authenticate with our web application to use its api. Extension was originally developed for the Chrome and there everything works perfectly fine without any additional work. When I am authenticated on the platform I am able to use extension on any website and while making api calls from extensions background script to the platform backend the cookie is automatically attached to it. I just do fetch without any headers etc everything works out of the box. Then I used the xcrun safari-web-extension-converter and converted the chrome extension to safari. I tested local build as well as build submitted to test flight and none of these seems to work the same way as on chrome. Meaning I am not able to make this safari extension pick up the cookie from my web application. I found that if I disable: prevent cross-site tracking in Safari Settings it works. But obviously its not a solution for the normal users. Can anyone help me to make it work? I am not very familiar with apple dev environment.
3
0
497
Aug ’24
iOS Safari extension background doesn't show any console logs
My Safari extension (based off a Chrome one) is working fine in a Mac OS Safari version but when I try to run it on the phone I'm experiencing some bugs in communication with the backend, which I cannot troubleshoot because when I click on Develop > my_phone > Safari Extension Background Content I don't see any logs in there. Where the background logs are supposed to appear? How can I find them? I don't see them in Xcode either.
2
0
499
Aug ’24
Error in Apple Pay UIExtenstion.
Dear Team, We are facing an issue while development of Apple Pay UIWallet Extension. Kindly let us know below points to make it easy integration or development of apple pay wallet UIextension. What are the steps to open / recognise wallet to open NonUI Extension or UIExtension. Is there any dependancy on PNO data. Once Dynamic card details fetched from service is it Manual provision or Backend service need to be integrate. Thanks in Advance, Rajesh Addanki.
0
0
222
Aug ’24
DNS Proxy Invalidation in inactive state
Hi, I have been working on the app with NE Filter Providers for a while now and it seems to work well. However, unlike Content Filter Providers, DNS Proxy is invalidated when device is inactive state. It shows status "Invalid" for just a couple seconds before to changes to "Starting" and eventually "Running". That's not a major issue, but I would like to know what's causing this behaviour and if there is a way to fix it. I am using custom DoH in my DNS Proxy for flows proxying. And if the server times out to respond, app sends rcode 5 (Refused) for requested flow. At the same time, app shouldn't crash because all errors are handled appropriately. Would be very grateful for any thoughts, thank you!
0
0
392
Aug ’24
DNS Proxy invalidation in inactive state
Hi, I have been working on the app with NE Filter Providers for a while now and it seems to work well. However, unlike Content Filter Providers, DNS Proxy is invalidated when device is inactive state. It shows status "Invalid" for just a couple seconds before to changes to "Starting" and eventually "Running". That's not a major issue, but I would like to know what's causing this behaviour and if there is a way to fix it. I am using custom DoH in my DNS Proxy for flows proxying. And if the server times out to respond, app sends rcode 5 (Refused) for requested flow. At the same time, app shouldn't crash because all errors are handled appropriately. Would be very grateful for any thoughts, thank you!
0
0
411
Aug ’24
Can TodayExtensions and WidgetKit Coexist in an App
I understand that TodayExtension will be deprecated in iOS 18, and we have integrated WidgetKit into our app. However, we have encountered some issues during the app update process. Specifically, we noticed that the TodayExtension might not appear in the tools list or sometimes the TodayExtension appear "Unable to Load" Could you please advise on the possible causes of this issue? Is there a way to resolve it if we want to keep both types of widgets active?
3
0
734
Aug ’24
In iOS 18, browser.tabs.getSelected returns 'Undefined' for the Safari iOS App Extension
I was able to obtain the URL in iOS 17+ and lower versions by using the browser.tabs.getSelected method in background.js, and it was successful. I upgraded to iOS 18 and now this function is returning 'Undefined'. As a result, the Safari Extension feature is broken. Is this browser.tabs.getSelected no longer available or deprecated as of iOS 18? As an alternative, browser.tabs.query functions. is a useful substitute for that.
3
0
585
Aug ’24
ControlWidgetToggle can't be refresh when it action with a LiveActivityIntent.
Hi, I'm trying to implement the iOS18 ControlWidget features. When i turn on a ControlWidgetToggle that action with a LiveActivityIntent, the toggle will turn off automatic. The toggle state is read from my sharemanger, but it state won't refresh even i use the ControlCenter.shared.reloadAllControls(). Here is my code. struct TimerLiveActivityControl: ControlWidget { var body: some ControlWidgetConfiguration { StaticControlConfiguration(kind: Self.kind) { ControlWidgetToggle(isOn: ShareManager.shared.isLiveActivityTimerOn, action: LiveActivityTimerIntent()) { isTurnedOn in Image(systemName: isTurnedOn ? "fan.fill":"fan") Text(isTurnedOn ? "Turned off" : "Turned On") } label: { Text("Live Activity Timer") } } } } struct LiveActivityTimerIntent: LiveActivityIntent, SetValueIntent { static var title: LocalizedStringResource { "Live Activity timer" } @Parameter(title: "is Turned On") var value: Bool @MainActor func perform() async throws -> some IntentResult { TimerLiveActivityTimer.shared.duration = 10 TimerLiveActivityTimer.shared.startTimer() return .result() } } func startTimer() { self.startActivity() self.isLiveActivityTimerOn = true Timer.scheduledTimer(withTimeInterval: TimeInterval(self.duration), repeats: false) { timer in self.isLiveActivityTimerOn = false ControlCenter.shared.reloadAllControls() self.endActivity() } //The ControlWidgetToggle can't refresh even i refresh it all time Timer.scheduledTimer(withTimeInterval: TimeInterval(0.1), repeats: true) { timer in ControlCenter.shared.reloadAllControls() } } However the code can work if I use a single SetValueIntent. My Xcode version is 16.0 beta, use iOS 18.0 simulator.
1
0
475
Aug ’24
system extension failed to validate
I facing issue where the system extension i try to install have message: no related kext found for sysex 'com.apple.usbsoundriver' com.apple.usbsoundriver:extension failed to validate! uninstalling... uninstalling invalid extension com.apple.usbsoundriver Is internet access is required for system extension validation? I install the driver without internet access. This work in some others machine, only fresh reformated Mac machine without internet connection have this issue. Why is this so?
10
0
584
Oct ’24
FileProvider extensions Mac Catalyst availability and workarounds
A have the application with iOS and Mac Catalyst versions and I need to make a cloud client for the app's documents. FileProvider would be the great choice for this feature, but I can't believe it doesn't support Mac Catalyst. At this moment I'm almost certain that NSFileProviderReplicatedExtension does not support Mac catalyst officially. And if it so, It would be great to hear the exact status and future plans if any. Unofficially, I managed to run it. I switched the extension's target Supported Destination from Mac Catalyst to Mac and it started to compile. This move seems legit to me. But domain also had to be created, and this part was a way trickier. I've added new bundle to host app(iOS and catalyst), but with supported platform - macOS in build settings. There I created an NSObject subclass DomainManager which calls NSFileProviderManager's addDomain method in its createDomainIfNeeded(), which is also exposed in public extension to NSObject - a kind of "informal protocol" The catalyst app creates bundle by name and loads principal class (DomainManager), but as NSObject reference, and then calls createDomainIfNeeded() method on it. The location defined by domain appears in Finder sidebar, and the dataless item "a file" appears in this location, as defined by stub implementation in the extension enumerator method. This means file system instantiated the extension instance under Mac catalyst and called the protocol method on it. I.e. it seem to work. But the question is whether this solution is stable and legit for the App Store distribution. Or is it pandora box with unforeseeable consequences for user data? Thanks in advance.
3
1
502
Aug ’24
modifyHeaders safari extension not works
Does safari support modification of request headers by using declarativeNetRequest? I want to change the sec-fetch-dest, sec-fetch-mode value in request header using declarativeNetRequest. So I just set the manifest value as follows. { "manifest_version": 3, ... "name": "modifyHeader test", "description": "sample extension", "version": "1.0", ... "permissions": [ "declarativeNetRequest", "declarativeNetRequestWithHostAccess", "activeTab" ], "declarative_net_request": { "rule_resources": [ { "id": "ruleset_for_test", "enabled": true, "path": "test_rules.json" } ] }, "host_permissions": [ "<all_urls>" ], .... "content_scripts": [{ "js": [ "content.js" ], "matches": [ "*://www.acmicpc.net/*" ] }], .... } And test_rules.json is as follows { "id": 1, "priority": 1, "action": { "type": "modifyHeaders", "requestHeaders": [ { "header": "sec-fetch-dest", "operation": "set", "value": "document" }, { "header": "sec-fetch-mode", "operation": "set", "value": "navigate" } ] }, "condition": { "domains":["acmicpc.net"], "resourceTypes": ["xmlhttprequest"] } } However, safari does not change the request header. So I just wonder does safari allow modification of headers through declarativeNetRequest.
2
0
418
Aug ’24
declarativeNetRequest modifyHeaders support in Safari macOS (17.1(19616.2.9.11.7))
Is declarativeNetRequest with action type modifyHeaders supported in safari web extension? To modify request headers with declarativeNetRequest, I just modify the manifest.json as below. { "manifest_version": 3, .... "permissions": [ "declarativeNetRequest", "declarativeNetRequestWithHostAccess", "activeTab" ], "declarative_net_request": { "rule_resources": [ { "id": "ruleset_for_extension", "enabled": true, "path": "rules.json" } ] }, "host_permissions": [ "<all_urls>" ], "background": { "service_worker": "background.js" }, "content_scripts": [{ "js": [ "content.js" ], "matches": [ "*://www.acmicpc.net/*" ] }], .... } And rules.json is as follows { "id": 1, "priority": 1, "action": { "type": "modifyHeaders", "requestHeaders": [ { "header": "sec-fetch-dest", "operation": "set", "value": "document" }, { "header": "sec-fetch-mode", "operation": "set", "value": "navigate" } ] }, "condition": { "domains":["acmicpc.net"], "resourceTypes":["xmlhttprequest"] } } It builds successfully but not modify headers with as intended even though the permission in safari is enabled.
0
0
286
Jul ’24
iOS file provider extension services
Using NSFileManager's getFileProviderServicesForItemAtURL method, I can list services made available by a file provider for a given item from an app unrelated to the file provider, obtain a handle to the proxy object and cast that object to the target protocol. However, attempts to invoke the protocol yield: "The connection to service named com.apple.mobile.usermanagerd.xpc was invalidated: failed at lookup with error 159 - Sandbox restriction." The documentation for the supportedServiceSourcesForItemIdentifier method implemented by the extension suggests only the app containing the extension can exercise the service but the documentation for getFileProviderServicesForItemAtURL does not. Should I be able to access a service from a file provider extension from an unrelated app? If so, how can the sandbox restriction be addressed?
2
0
534
Aug ’24
Wallet UI extension with capacitor
Hello, I'm trying to build a wallet UI extension for card push provisioning of Apple Pay. I try to add a user authentication step to the wallet app extension. I went through the documentations and app demo, but all the guidelines are based on swift UI, while I want to reuse the code from my Angular containing app (html, css, typescript) compiled to iOS native app with capacitor. Does anyone have any experience how this can be done? Do I need to separate the authentication logic in my Angular project and compile it to a separate iOS native app using capacitor? Thank you in advance.
1
1
376
Jul ’24