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

Symbol not found error running Message Filter Extension on iOS 17.6.1 but no problem with iOS 18.2
If I run an app with a Message Filter Extension on a handset with iOS 18.2 then it runs fine, however if I run the exact same app with no changes on a different phone which has iOS 17.6.1 installed then the following error occurs when the extension is enabled within Settings: dyld[631]: Symbol not found: _$sSo40ILMessageFilterCapabilitiesQueryResponseC14IdentityLookupE21promotionalSubActionsSaySo0abI6ActionVGvs
0
0
67
16h
Apple Wallet extension
I'm implementing Apple wallet extension in an iOS app. Currently following this documentation https://developer.apple.com/documentation/passkit/implementing-wallet-extensions I'm facing challages while testing the extension. Any suggestion how can i test it during developmet. Like if i want to test the storyboard from Wallet UI extension. Any suggestions or helping material would be appriciated.
0
0
34
1d
Push Notifications after update to 18+ iOS
Dear Apple Engineer, We have problem in the banking application after update iOS to 18, 18.1 or 18.1.1. No notifications appear on the locked screen, even in the notification center. On lower version push notifications apparently correctly. What have we checked so far is: certificates profiles app with push notifications extension and without it usage of setBadgeCount(_:withCompletionHandler:) instead of applicationIconBadgeNumber Our sample payload with encrypted data: { "aps":{ "alert":"Message from Bank", "badge":0, "sound":"default", "mutable-content":1, "category":"" }, "Type":"", "MessageId":"", "Id":"8ebf0c13-83cf-4029-ac13-91d026c3770a", "Media-url":"", "alternativeTitle":"New message", "priority":5, "EncryptedData":"eyJ0eXAiOiJibTplbmMtdjEiLCJhbGciOiJibTppb3MtZWNkaCIsImVuYyI6ImJtOkExMjhHQ00tSVYxNiIsImVuY19raWQiOiI5OUIyN0E4NC1CQzRFLTRGMzQtQjBGNC0yMTcyMEYxQTFEN0EifQ...BDdxycY-ZWPC7BgI_07efVSgjKyGyGVKlcNtZSslWJePrwJkJyIxFBr07XtayB0I2jv6Vc8AdUpdvMJ-daVzkPYMZ7pQA_X0Pg8RPRS2GnPkhyhK3XNkLRMsjG6CkSafYaqSeLMEpdF2Q-QkajvO3ojnRl1C-Bp9FpNbeaCwJXwqjEMKKhggRsKH8zdk7XcYhZX5_hARbBkIFLrCX1Xzyypp_PfZ23v9Pbd8aHmAf7FQdYN6xbfyoL5XEaDrCjGi-up2n1nlcTeEfkXHBunitUzQulmrjo86GJS0ldhF0mEMZ3_t6ObbjeKijYExMeYHxeCe89Yg10TvZI6kP4xizpJijG9cz75X3VI3I4SgeR8BuZRcb5eTQKWWzGW7u6LD1QtV3PWFCtv942CSz62kPPo-dD0248Fqm5HwxZejQSrZKjYQQ87dkzB0q7p2Q_M0z2Y-bRfNRXJl8VaF5X6-2KwLq47zwrQYUIcEHdag3J05X0SzBiImAdbh2zQz074QqEEpoU1F6C89LHKFxAw", "IsSigned":false } What do you need to analyze the problem? Identifiers, sample application? Best regards, Michał iOS Developer.
1
0
141
1w
Inconsistent Wallet App Behavior with Mocked Data in PKIssuerProvisioningExtensionHandler
We are implementing Apple Pay and Wallet features in our app and using mocked data for testing purposes. Specifically, in the status(completion:) method of PKIssuerProvisioningExtensionHandler, we return: passEntriesAvailable: true, remotePassEntriesAvailable: true, requiresAuthentication: true, In the passEntries(completion:) method, we provide mocked data for our card. The issue is that the app icon inconsistently appears under the "From Apps on Your iPhone" section in the Wallet app. Sometimes it shows up as expected, but other times it does not. On recent occasions, when the app is selected and mocked authorization is paased, the behavior includes a system error 'Cannot Add Card' even though we provided status that indicates that the app has available cards for Wallet. For reference: The app uses two bundle IDs supporting in-app provisioning and PNO Pass Metadata has not been configured yet. Could you help clarify the potential reasons for this inconsistent behavior?
1
1
115
4d
Swift Testing tests in enum (namespace) extensions are acting strange
Using Xcode 16.1 (16B40). When adding a test suite with tests in an extension to an enum: The tests can be compiled and executed as expected (by clicking the diamond), and e.g. "Reveal in Test Navigator" works as expected. But after the tests have been executed, there is no check or cross diamond icons in the Test Navigator, If I right click the empty diamond in the margin for one of the tests and click "Jump to report", Xcode shows an alert saying "No test found matching the identifier MyEnumNameSpace/SomeTests/example()", which is very strange. Steps to reproduce: Create a new iOS app project using SwiftUI and Swift Testing. Add a file in the app target defining an enum namespace: public enum NamespaceDefinedInSomeApp {} Replace the content of the already created …Tests.swift file with: import Testing @testable import SomeApp // This works as expected: @Suite struct SomeTests { @Test func example() async throws { #expect(true) } } // This compiles and executes but acts strange: extension NamespaceDefinedInSomeApp { @Suite struct SomeTests { @Test func example() async throws { #expect(true) } } } // This compiles and executes but acts strange: enum AnotherNamespace {} extension AnotherNamespace { @Suite struct SomeTests { @Test func example() async throws { #expect(true) } } }
1
1
149
1w
Removing Cookie HTTP Header via declarativeNetRequest
I'm porting to Safari a Chrome/Firefox Extension that makes use of declarativeNetRequest.updateDynamicRules to remove some HTTP headers from requests to a specific URL. This works mostly fine, except for some headers for which this is not allowed by WebKit, such as the Priority header (which is however served by Safari). An annoying corner-case I found is that of the Cookie header. When trying to remove it from the request by adding the following rule { id: <rule id>, priority: <rule priority>, action: { type: "modifyHeaders", requestHeaders: [{ "header": "Cookie", "operation": "remove" }] }, condition: { urlFilter: <my url>, resourceTypes: ["main_frame", "sub_frame"] } } nothing error is thrown, yet the Cookie header is still being sent. This rule however works for other headers, such as Referer. Changing "Cookie" for "cookie" does not help. Questions: Is there an alternative way of removing the Cookie header from the HTTP request? Is this just a bug in WebKit? Is there any way of removing "unsupported" headers such as Priority? Any help or references are appreciated. Edited: more specific description of the corner-case.
0
0
221
2w
Finder File Previews lock files on SMB shares
I've developed a new Quicklook data-based preview extension for a custom file type that generates an image preview of the file. I previously used a Quick Look generator plug-in but support for it was deprecated and now removed in macOS Sequoia. My app opens files using a open(url.path, O_RDWR | O_NONBLOCK | O_EXLOCK) call. The locking flags are used to prevent other clients from writing the file if it's already open. I discovered that when Finder is showing the “large” file previews (such as when in column or gallery modes) from a SMB share, the open call fails with EWOULDBLOCK as if the file is locked. It does work just fine on local files. Opening with O_SHLOCK also has the issue. Surprisingly it does work just fine for previews that return Plain Text data instead of Image data. Using the lsof command, it seems like the Quicklook process has some kind of lock on the file. This is the output of the lsof command: COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE QuickLook 48487 XXXX txt REG 1,15 125000611 3161369 Attached is a test project that tries a few different opening and locking functions. It also includes a test file and a sample image preview extension that displays a red square. When everything is working, regular console messages show the progress of the tests. When the file is on a SMB share and selected in Finder Gallery mode, the open test will fail with a fault message in the console. Notably, locking with flock works, which is weird because it should have similar semantics according to the man page for open(2). Filed this as FB15051186
5
0
163
1w
Can I tell when my iOS Widget is running on MacOS (when Use IPhone Widgets is on)
I have an iOS Widget that also can load on the Mac when the Use iPhone Widgets setting is turned on on the Mac in Desktop & Dock. I want to use a different url scheme to open video clips from the widget if it is being clicked on iOS or the Mac. I tried using ProcessInfo.processInfo.isiOSAppOnMac but it always thinks it is on iOS. I also tried looking for the user document path to see if it was /var/mobile/ or /Users/. but it always thinks it is /var/mobile. I assume this is as it is not really a catalyst app but a WidgetKit extension from the phone. Is there anyway I can figure out when the widget is running on the mac? Thanks!
5
0
138
2w
Cannot lauch Share Extension from Photos
I am encountering an issue where the Share Extension in my app fails to launch intermittently. In my project, NSExtensionPrincipalClass is set to ComposeShellVC. When the Share Extension launches successfully, the following log entry appears, indicating that ComposeShellVC is being created: 09:21:09.339190+0800 2254529 ViewServices com.apple.UIKit compose-shareextension Received request to create view controller: self: <_UIViewServiceViewControllerOperator: 0x109194c00>; class: compose_shareextension.ComposeShellVC; contextToken: 42EA1BDB-5CDF-4EBD-8503-8A9A04BCE41C However, when the bug happens, this entry is absent during the failed launches. Additionally, I am unable to set breakpoints within the Share Extension to further investigate. Could you provide guidance on the next steps to diagnose this issue? Any advice on debugging techniques or tools that can help pinpoint the cause of this behavior would be greatly appreciated.
2
0
125
2w
My File Provider Extension cannot be started sometimes
We use File Provider Extension in our main app, and it is working fine. We always call "NSFileProviderManager.add(_:completionHandler:)" function to start the extension, and "NSFileProviderManager.disconnect(reason:options:completionHandler:)" to temporarily quit the extension with the reason which will be shown in the Finder at the top of the FP domain folder. But sometimes, when the main app calls the above functions, the following issue cases occur, and the extension does not start/stop: The completionHandler function doesn't get called (As we noticed, we waited for 2 minutes. Then, we restarted the main app.) One of the following errors returned: i) "The application cannot be used right now", ii) "Couldn't communicate with the helper application", iii) "No valid file provider found with identifier" Here, the important thing is that restarting the main app once or twice clears the issue, and the extension starts. But it is frustrating to restart the app each time we get this issue. We want to know the following things: Why and when do the above issues occur? Why do they occur only sometimes, and how does the app restart clear the issue? How do we resolve them without restarting the main app? This has become a critical issue, so a detailed explanation would be greatly appreciated. TIA.
0
0
189
3w
Running Sensitive Code in a Separate Process for iOS XCFramework
Hello everyone, We have an iOS XCFramework that we distribute to our clients, and we're exploring ways to enhance its security. Specifically, we’d like to isolate the most sensitive code by running it in a separate process, making it harder to tamper with. During our research, we considered using XPC for iOS but found its functionality to be quite limited. We also explored App Extensions, but unfortunately, they cannot be integrated into an XCFramework. This leads us to the question: Is it possible to spawn a new process to run in parallel with the main one in iOS? If so, could you provide guidance or suggest alternative approaches to achieve this within the constraints of iOS development? Thank you in advance for your insights and advice! Best regards, Stoyan
1
3
179
2w
Device activity report data View is hidding when change the tab
I am working on the device activity report. and fetched data is loading on the chart. I am developing app using TabbarController. when I go to another tab and come back to the chart screen, it disappears. Here, I am working on a storyboard using Swift language, and device activity reports can be fetched only with SwiftUI. So, the problem is with it? Following the current code. @State private var context: DeviceActivityReport.Context = .init(rawValue: "Daily Activity") @State private var report: DeviceActivityReport? @State private var filter = DeviceActivityFilter( segment: .daily( during: Calendar.current.dateInterval( of: .day, for: .now )! ) // users: .all // devices: .init([.iPhone, .iPad]) ) @State var isReload: Bool = false var body: some View { ZStack { if isReload { LoadingView(title: "Data is loading...") } else if let report = report { report } else { DeviceActivityReport(context, filter: filter) } } .onAppear { DispatchQueue.main.async { report = DeviceActivityReport(context, filter: filter) } } } struct LoadingView: View { var title: String = "Please wait..." var body: some View { HStack { ProgressView(title) .font(.system(size: 14, weight: .medium)) .progressViewStyle(.horizontal) .tint(Color(.darkGray)) .padding(8) } .background(Color(.white)) .cornerRadius(8) .clipped() } }
0
0
202
4w
App with iMessage extension AND sticker pack
Im not a dev but trying to create something trying to create an app that includes an iMessage extension AND a sticker pack. My first attempt I tried to create a iMessage app but apparently I cant include a sticker pack. Ive tried to create a shell app with a sticker pack and iMessage extension but it's just not working. Can someone please let me know how I can do this. How can I get an iMessage extension app and a sticker pack installed at the same time from the same app. Ive tried everything, tried creating a seperate iOS app with sticker pack and iMessage extension and nothing. A lot of times a get an error like "CompileAssetCatalogVariant failed with a nonzero exit code"" If I remove the sticker pack builds successfully. thank you in advance
0
0
156
4w
Handle InSendMessageIntent in the app
Hi, I'm implementing InSendMessageIntent handling in our app. I can handle InSendMessageIntent through extension, but handling also includes business logic like authorisation status and some heavy operation which I can't expose from the main target. I tried to handle it in-app, but func application(_ application: UIApplication, handlerFor intent: INIntent) -> Any? didn't trigger. At the first glance the configuration looks correct - the InSendMessageIntent is added under INIntentsSupported and UIApplicationSupportsMultipleScenes is set to YES in info.plist. After that reply with message button disappeared from the incoming Voip callKit screen. So I had a question - Is this intent possible to be handled in-app?
0
0
135
Nov ’24
Live Caller ID on iOS does not work - client requests not reaching backend
I'm reaching out to see if anyone else is experiencing issues with the Live Caller ID feature on iOS. We recently encountered a problem where the feature stopped working entirely. Here's a brief overview of the situation: We were monitoring test traffic on our backend and noticed everything came to a halt around 1:00 AM UTC on November 15th. After this time, any attempts to reach our backend through calls failed completely. I tested this across multiple devices running iOS 18.2 and iOS 18.0. I used both TestFlight builds and development builds via Xcode, which should communicate directly with our backend. I experienced the problem on our main application as well as a dedicated test app. To troubleshoot further, I even set up a local server on localhost and tried directing requests there, but the requests did not reach the local server when a call was received. Further debugging in Console.app revealed the following error: identity request returned error: Error Domain=com.apple.CipherML Code=400 "Error Domain=com.apple.CipherML Code=401 "Unable to request data by keywords batch: failed to fetch token issuer directory" However, when I manually tried to hit our server endpoint using curl, the request successfully reached the server: curl https://our_server/something hb_method=GET hb_uri=/something [Hummingbird] Request -- log on backend This suggests that while our backend is responsive, the requests from the iOS client side are simply not being initiated.
6
3
498
1w
iOS Action and Share Extensions disappear for users
Several users have reported that my iOS Action and Share Extensions is not visible. Now one of the TestFlight users has reported the same. Notice this user has been using the app for one year, so they know how to use it. Doing FaceTime and them sharing the screen, we have tried: Deleting app and downloading from App Store Deleting app, turning device off (call was off) and turning it on, downloading from App Store Deleting app, turning device off (call was off) and turning it on, downloading from TestFlight They can open the app, they just do not see the extensions. I would have thought it was the activation rules inside of the InfoPlist, but they are the same for all users and my other testers are not facing the issue. Device is iPhone 16 Pro, iOS 18.1 What other steps could I follow? What other information could I gather to fix this?
1
0
130
Nov ’24
Missing flows for content filter on macOS 15 Sequoia
We use as content filter in our app to monitor flows, we gather data about the flow and block flows deemed suspicious. Our content filter is activated/deactivated by a UI app but the flows are reported via XPC to a separate daemon process for analysis. As of macOS 15, we are seeing cases where flows are missing or flows are not received at all by the content filter. The behaviour is not consistent, some devices seem to receive flows normally but others don't. It appears Intel devices are much less prone to showing the problem, whereas Arm devices routinely exhibit missing flows. On macOS 14 or earlier, there is no sign of missing flows. Testing on earlier beta versions of macOS 15 did not appear to show the problem, however I can't rule out if issue was present but it wasn't spotted. Experimenting with simple examples of using a content filter (e.g. QNE2FilterMac) does not appear to reproduce the issue. Questions, What has changed between macOS 14 and 15 that could be the cause of the lack of flows? Is our approach to using an app activated content filter reporting to a daemon connected via XPC unsupported?
5
1
415
Nov ’24