Post

Replies

Boosts

Views

Activity

System Extension failing to load in case of developer off and SIP enabled
I am working on developing a Mac app that will be distributed outside of the App Store. I have added the network extension which packaged in System Extension with packet tunnel capability. I have created a build following these steps here: https://developer.apple.com/forums/thread/737894 based on your suggestions in my accepted post: https://developer.apple.com/forums/thread/761251 It works fine in this case when the machine has SIP disabled and systemextensionsctl developer on. As soon as I have made changes on the machine to systemextensionsctl developer off and SIP enabled, System Extension stopped loading. I have copied the app to the "/Applications" directory before opening it. When I check the loading status of the system extension with the "systemextensionsctl list" command, it shows as "[validating by category]" Am I missing something? Thanks in advance.
1
0
119
3d
Detection of installed web browsers on Mac OS
Platform: macOS, Sonoma 14.6 Technology stack: Electron v29, TypeScript Hello, We're developing a desktop app for macOS that helps with automation of some browser related tasks, using Puppeteer and Chrome/Chromium browsers. One of the conditions of our app running is having Chrome/Chromium installed on the computer. To check if someone has installed one of the supported browsers our app runs the following command in the shell: mdfind "kMDItemKind == \'Application\'" it produces the list of installed apps and then we scan the list in the search of Chrome or Chromium. Recently we found out that the command's result is not consistent, because on some macOS computers the result is empty and we don't know why. Are we misunderstanding the usage of mdfind? Or maybe we should try a different way to check if Chrome or Chromium is installed on the computer running our app? Thank you.
2
0
73
4d
Can locked/hidden apps in iOS 18 be tracked by developers?
Hey everyone, I work on an app with VoIP calls and essential notifications features, and I'm curious about the new locked/hidden apps functionality in iOS 18. Specifically, does iOS 18 provide any way for developers to detect if a user has hidden their app from the home screen or app library? I want to notify users if they hide the app, core functionalities like VoiP calls and notifications might not work as expected. Furthermore, would critical alerts also be hidden from the notification center? Any insight on whether Apple exposes this information to developers, or if there are indirect ways to detect hidden status, would be greatly appreciated! Thanks in advance!
1
0
100
4d
Streaming HLS from hotspot IoT device on iOS
Hi, Brief background on what I'm trying to achieve: I have an IoT device that produces a HLS stream of saved videos when they are accessed through the device's broadcast hotspot. To access the hotspot, I use an NEHotspotConfiguration. When I use AVPlayer to watch the HLS stream, everything is fine! When I use a media pod (VLC) to try to consume the HLS stream, traffic goes over cellular network even though the device's host address is 192.168.1.254. I am under the impression this is ALWAYS a local network device. I haven't spent much time digging into the code for VLC to figure out why, but when I disable cell network in my app's settings, the VLC request resolves perfectly. I have been served radio silence on their forums and issues, so I thought if there's another solution this would be the place to ask! Is there something going on with the way iOS handles web requests to local network devices? My IoT device's hotspot never has internet access, and after reading Quinn's Extra-ordinary Networking advice (https://developer.apple.com/forums/thread/734348), I'm still lost for how I can force my request to go to the WiFi network rather than cellular... Does anyone have any recommendations? Thanks in advance!
1
0
79
2d
SwiftData - Context missing for optional
I have encountered an issue that when using a ModelActor to sync data in the background, the app will crash if one of the operations is to remove a PersistentModel from the context. This is running on the latest beta of Xcode 16 with visionOS 1.2 as target and in Swift 6 language mode. The code is being executed in a ModelActor. The error is first thrown by: #5 0x00000001c3223280 in PersistentModel.getValue<τ_0_0>(forKey:) () Thread 1: Fatal error: Context is missing for Optional(SwiftData.PersistentIdentifier(id: SwiftData.PersistentIdentifier.ID(url: x-coredata://97AA86BC-475D-4509-9004-D1182ABA1922/Reminder/p303), implementation: SwiftData.PersistentIdentifierImplementation)) func globalSync() async { await fetchAndSyncFolders() let result = await fetchReminders() switch result { case .success(let ekReminders): var localReminders = (try? await fetch(FetchDescriptor<Reminder>())) ?? [] // Handle local reminders with nil ekReminderID by creating new EKReminders for them for reminder in localReminders { if reminder.ekReminderID == nil { await self.createEkReminder(reminder: reminder) } } // Re-fetch local reminders to include newly created EKReminderIDs localReminders = (try? await fetch(FetchDescriptor<Reminder>())) ?? [] var localReminderDict = [String: Reminder]() for reminder in localReminders { if let ekReminderID = reminder.ekReminderID { if let existingReminder = localReminderDict[ekReminderID] { self.delete(model: existingReminder) } else { localReminderDict[ekReminderID] = reminder } } } let ekReminderDict = createReminderLookup(byID: ekReminders) await self.syncReminders(localReminders: Array(localReminderDict.values), localReminderDict: localReminderDict, ekReminderDict: ekReminderDict) // Merge duplicates await self.mergeDuplicates(localReminders: localReminders) save() case .failure(let error): print("Failed to fetch reminders: \(error.localizedDescription)") } }
23
16
1.7k
Jun ’24
App Clip Card not appearing on initial page load
I have no idea why my app clip card is not showing on initial url load, it doesn't even show when I refresh the page. The only thing that works is pull to refresh (once or more times). After that, it shows up. Is it possible to fix this issue and show app clip card on url load? Here's the appclip url (for some reason I can't post href): https://app.celer.life/reading-exercise Initial load: After pull to refresh:
2
0
85
5d
How to set NEDNSSettings port, or how to bind on port 53 for MacOS Network Extension?
In my Packet Tunnel Provider, I'm setting the NEDNSSettings to localhost as I have a local DNS server listening on port 53 (this is a dns forwarder which conditionally forwards to different upstreams based on rules). On iOS it works just fine, I'm able to listen on localhost:53 in the Network Extension, then set NEDNSSettings servers to "127.0.0.1". However on macOS due to the port being under 1024, I get a Permission denied OS code 13 error. I'm assuming this is due to the Network Extension not running as root. Can this be changed? This could be rectified if you could customize the port in NEDNSSettings, as the listener could be on port 5353, but it doesn't look like it is possible? Just wondering if there is some other way to accomplish what I'm trying to do in the macOS Network Extension?
4
0
90
5d
Per-App VPN (NEAppProxyProvider) extension fails to start when managed profile specifies certificate based authentication on iOS
Hi, we have an iOS application that runs a NEAppProxyProvider network extension. The configuration for the extension is delivered by MDM and we've noticed that some MDMs are beginning to force end users to select certificate based authentication as the auth type for the per-app VPN payload. This itself causes no problems, but when a certificate to use for the authentication is also provided in the profile, our extension fails to start. Our application does not use the credentials from the profile, certificate based or otherwise, so we aren't doing anything unusual with them either. We thought the problem might be caused because we lacked the com.apple.managed.vpn.shared entitlement that would be needed to access the certificate once it was on device (even though we never actually try to access it), but that did not fix the issue. We have also confirmed that this happens regardless of MDM used to configure the profile. Here are the relevant logs we are seeing that show the extension never starts: neagent: NEAgentSession: failed to create the delegate nesessionmanager:[313]: Tearing down XPC connection due to setup error: Error Domain=NEAgentErrorDomain Code=2 "(null)" : Last disconnect error for changed from "none" to "The VPN app used by the VPN configuration is not installed" STEPS TO REPRODUCE Create an application that establishes a basic per-app VPN (just a loopback works) using the network extension Using an MDM, create and deploy a per-app VPN profile with certificate based authentication (include a certificate as well) that uses the test application as a plugin. Using the MDM, assign another application to the per-app VPN. Try to connect to the internet using the assigned application, it should fail to connect because the system can't start the extension. For reference it appears that this issue is similar to ours: https://forums.developer.apple.com/forums/thread/746879 I've tried all the suggestions on that page, including adding a 'first-light' log and that is never seen. There are also no additional clues when adding the VPN debug profile to the device. Thanks!
3
0
112
6d
iOS not calling my Quick Look extension for RAW files recognized by the system
I'm the developer of Camera RawX (avail on the Mac App Store). I'm working on Camera RawX for iOS to provide Quick Look support for camera RAW files not supported by iOS. I use the Files app to open a RAW file to invoke Quick Look on my iPad (it is running iOS 17.6.1). The RAW file in question is a Fuji compressed RAF file. When I tap on the RAF file, iOS opens the Quick Look window, but my app's Quick Look extension is not called. If the RAW file in question is a Sigma Foveon X3F file, a file that has no native Apple RAW support, then my Quick Look extension is called and I'm able to display the image in the Quick Look window without issue. It seems that a system recognized RAW file extension (RAF in this case), is not triggering my Quick Look extension. On the macOS, this works fine without any issue. The strange thing is that my Thumbnail extension is being called when the RAW files show up in Files. Even if it is a RAF file. So it seems like a bug to me or am I missing something crucial in my Info.plist file? Albert
4
0
110
4d
Siri's voice invocation to open App and pass the intent
Hi All, requirement - "Search (placeholder) in (myApp)". When user speaks this strings, Siri should open the app and pass the placeholder. This worked for me only when i used an AppEnum (with specific defined set) with AppEntity. I want the placeholder to be dynamic and not defined via the AppEnum. Have observed this feature working fine with Youtube, Spotify & Whatsapp apps. Is there anything else that these app add specifically to make this work. ? Also in these app's Siri settings, there is a toggle named - 'Use with Ask Siri'. Could someone please help in understanding, how this option is enabled ?
5
0
151
4d
Delayed App Store Server Notification(V2) for Subscription Purchase
We experienced an issue with delayed App Store Server notifications for an Auto-Renewable Subscription purchase in our app. On September 27, 2024, at 22:28:28 GMT+0900, a user successfully purchased a Premium membership subscription (transaction ID: 190002223966278, webOrderLineItemId: 190001007274949). However, our server did not receive the corresponding App Store notification for this transaction after purchase. The App Store Server Notification was only received 66 minutes later, at 23:35:16 (transaction ID: 190002224000004, webOrderLineItemId: 190001007274949). The delayed notification contained a different transaction ID than the initial purchase. We would like to inquire about the cause of this delay and request assistance in understanding why the notification took 66 minutes to be delivered to our server, instead of arriving immediately after the transaction was completed. Additionally, we would appreciate your guidance on how to prevent or mitigate such delays in the future, ensuring a seamless experience for our users. Are there any best practices or recommended approaches we should implement to handle potential notification delays more effectively? We have provided detailed information about the received notification and the related transactions in the Feedback Assistant (FB15330451). Thank you for your assistance in resolving this matter. Key Details Purchase time: 2024-09-27T22:28:28 GMT+0900 (1727443708000) Notification received: 2024-09-27T23:35:16 GMT+0900 (1727447716463) Delay: 66 minutes and 48 seconds Initial Purchase Transaction ID: 190002223966278 Initial Purchase Web Order Line Item ID: 190001007274949 Transaction ID in Delayed Notification: 190002224000004 Web Order Line Item ID in Delayed Notification: 190001007274949 Additional info Bundle ID: com.reppley.ReppleyApp SKU: com.reppley.ReppleyApp Feedback Assistant Number: FB15330451
0
0
81
1d
MainActor and NSInternalInconsistencyException: 'Call must be made on main thread'
Hello, When attempting to assign the UNNotificationResponse to a Published property on the main thread inside UNUserNotificationCenterDelegate's method func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse) async both Task { @MainActor in } and await MainActor.run are throwing a NSInternalInconsistencyException: 'Call must be made on main thread'. I thought both of them were essentially doing the same thing, i.e. call their closure on the main thread. So why is this exception thrown? Is my understanding of the MainActor still incorrect, or is this a bug? Thank you Note: Task { await MainActor.run { ... } } and DispatchQueue.main.async don't throw any exception.
3
4
2.5k
Jul ’22
unable to see apple ai responses as they are always blurred out
i’m on an iphone 15 pro max 18.1 beta. I have apple ai and no matter what i ask it i am unable to see the apple ai response as it is always blurred out? if i click copy and paste into a text or notepad the answer shows up so the ai is working and answering my commands it just doesnt show on the screen… if i put that i want the answers read to me it’ll read it but the response will still be blurred ? please someone help
0
0
70
2d
Apple Pay on the web
When checking if the device supports Apple Pay and has an active card, a call is made to 'applePayCapabilities'. The documentation indicates this method asynchronously contacts the Apple Pay servers as part of the verification process. My understanding is that this is a client side call, from the device/OS to the Apple Server. The application (Apple pay on the web) is behind a firewall. What domain should I whitelist for this verification to be a success?
2
0
126
2w
Error in iOS Wallet Order When Removing Deprecated status Property from Payment Object in order.json
I am encountering an issue related to the status property within the payment object of the order.json file when opening an order in the iOS Wallet. According to the official documentation, the status property in the payment object is marked as deprecated. Based on this information, I removed the status property from the order.json. However, when I attempt to open the order in the iOS Wallet app, an error occurs, preventing the order from being opened. This creates confusion, as the documentation implies that the status property in the payment object is no longer required. However, the iOS Wallet app seems to still rely on the presence of this property or encounters an error when it’s missing. Tested on IOS 17.6.1 & IOS 18
1
0
69
2d
Unable to Retrieve bundleIdentifier with FamilyControls .individual Authorization
Tl:dr What are some reasons my bundleIDs aren't showing up and does anyone have good resources to setup the screentime API/DeviceActivityMonitorExtension? I'm working on an iOS app that uses the FamilyControls and DeviceActivity frameworks to monitor and restrict app usage. The app allows users to select apps and set usage limits. When a limit is reached, a DeviceActivityMonitorExtension should block the selected apps. My App setup: Have a model that is called when users select apps to manage these app bundle IDs are then serialized and sent to the Device Monitor Extension via App Group so it can be used when the event threshold is reached. Cant use Application Tokens because they are not serielizable and cant be passed to the extension. Problem: While testing, I’m unable to retrieve the bundleIdentifier and localizedDisplayName from the Application objects after selecting apps. Instead, these properties are nil or empty, preventing me from saving the bundle IDs to share with the extension via App Groups. Assumptions: I suspect this issue is due to missing the com.apple.developer.screentime.api entitlement, which might be required to access these properties even during development. I've requested for the entitlement but its still under review. Key Code Snippets: Authorization Request: class ScreenTimeManager: ObservableObject { static let shared = ScreenTimeManager() @Published var isAuthorized: Bool = false func requestAuthorization() async { do { try await AuthorizationCenter.shared.requestAuthorization(for: .individual) DispatchQueue.main.async { self.isAuthorized = AuthorizationCenter.shared.authorizationStatus == .approved print("Authorization status: \(AuthorizationCenter.shared.authorizationStatus)") } } catch { DispatchQueue.main.async { print("Authorization failed: \(error.localizedDescription)") self.isAuthorized = false } } } } Accessing bundleIdentifier: print("addAppGroup() Called") let managedApps = selection.applications.compactMap { application -> ManagedApp? in guard let token = application.token else { print("No token for application: \(application)") return nil } let app = Application(token: token) print("New Application instance: \(app)") guard let bundleID = app.bundleIdentifier, !bundleID.isEmpty else { print("Bundle identifier is empty or nil for application: \(app)") return nil } let displayName = app.localizedName ?? "Unknown App" print("Processing application with bundleIdentifier: '\(bundleID)' and displayName: '\(displayName)'") return ManagedApp( bundleIdentifier: bundleID, applicationToken: token, localizedDisplayName: displayName ) } if managedApps.isEmpty { print("No managed apps created. Exiting addAppGroup().") return } // Continue with creating DeviceActivityEvent... } Logs - Shows application token but never bundleID or LocalizedDisplayname Application(bundleIdentifer: nil, token: Optional(128 byte <TOKEN_PRESENT>), localizedDisplayName: nil) What I've Tried: Ensured Screen Time is enabled on the device. Verified App Group configuration in both app and extension. Checked that authorization is being requested and the status is .approved. Cleaned and rebuilt the project. Questions: Is the com.apple.developer.screentime.api entitlement required to access bundleIdentifier and localizedDisplayName when using .individual authorization? Is there a way to access these properties without the entitlement, or am I missing a configuration step? Has anyone faced a similar issue and found a solution? Lastly, is there a good place for additional resources on the screentime API??
1
0
108
3d