Delve into the world of built-in app and system services available to developers. Discuss leveraging these services to enhance your app's functionality and user experience.

Post

Replies

Boosts

Views

Activity

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
0
0
22
7h
BarcodeObservation Orientation
Hi, I'm working with vision framework to detect barcodes. I tested both ean13 and data matrix detection and both are working fine except for the QuadrilateralProviding values in the returned BarcodeObservation. TopLeft, topRight, bottomRight and bottomLeft coordinates are rotated 90° counter clockwise (physical bottom left of data Matrix, the corner of the "L" is returned as the topLeft point in observation). The same behaviour is happening with EAN13 Barcode. Did someone else experienced the same issue with orientation? Is it normal behaviour or should we expect a fix in next releases of the Vision Framework?
0
0
13
9h
How does the Reddit app detect Safari’s Private Browsing mode when opening a Universal Link?
I’m trying to understand how the Reddit app knows to open in its anonymous mode when a link is opened from Safari’s Private Browsing mode. Does Safari explicitly pass any flag or metadata indicating the request originated from Private Browsing? Or is it inferred by the absence of shared cookies, session tokens, or other stateful data? If the detection is based on the absence of cookies, could this logic misidentify other stateless scenarios as ‘private’?
0
0
19
11h
Live Activity Dissappearing
Hello, I am experiencing an issue with the Live Activity feature in my application. Despite extensive debugging efforts, the problem persists, and I would greatly appreciate your assistance. Here are the key details of the issue: We are not using APNS; everything related to Live Activities is handled locally within the app. The Live Activity displays task details, including: Task title, icon and A label functioning as a timer that shows the remaining time in seconds for the task. The Live Activity appears as expected when the app is opened. However, when the app is sent to the background, the Live Activity does not appear consistently. It disappears unexpectedly in some random instances. I have tried various debugging methods, including: Ensuring the activity is correctly created and updated as per the Apple Documentation. Verifying the ActivityAttributes and ActivityContentState configurations. Testing with different app lifecycle events to determine when the issue occurs. Despite these efforts, the issue remains unresolved, and the cause is unclear. The app behavior seems inconsistent, as the Live Activity sometimes remains visible and at other times disappears when the app is backgrounded. I would greatly appreciate your help in understanding and addressing this issue. Specifically: Are there any system-level constraints or conditions that could cause a Live Activity to terminate when the app is backgrounded? Are there best practices or configurations to ensure the persistence of locally managed Live Activities? Can you suggest additional debugging techniques or tools that could help identify the root cause? Thank you for your time and support. Please let me know if further information or logs are needed to assist in troubleshooting STEPS TO REPRODUCE Download and Install the Owaves App from the App Store. Create a Live Activity: Open the app and create an activity for the current time on Today. Example: If the current time is 9:30 AM, create an activity with a time range such as 9:00 AM - 10:00 AM to ensure it is live. Enable Live Activity: Tap on the newly created activity to open the Event Details page. Scroll to the bottom of the page and locate the toggle switch labeled "Live Activity". Switch the toggle to the ON position to enable the Live Activity. Background the App: Send the app to the background. Check the Lock Screen: Swipe down to enable iOS' Lock Screen and check for the Live Activity from the Owaves app. Repeat the Steps: If the Live Activity appears on the Lock Screen initially, repeat steps 3-5 multiple times. Eventually, you will encounter instances where the Live Activity does not appear on the Lock Screen, despite following the same process
1
0
50
18h
Photos crashes when working with face circles and names in expanded view
On an Intel Mac, in Photos show the information window, then click + to add a face circle. Enlarge the view, then drag to position the circle. The position and size of the circle are unstable, as is text typed into the Name field of the circle. Try to type a name in the name text field. Sometimes the text disappears, then later reappears. The reappearing text can be from various bits of text that previously were typed. In expanded view sometimes dragging the circle causes Photos to crash, more often the circle jumps to some position other than where it was dragged, or where it was before dragging. While dragging to move the entire circle can cause the circle to jump to unpredictable locations or crash, making the circle larger or smaller does not cause a crash, so long as the position is not changed. In some cases the new location to which the circle jumps can be outside the pane that contains the photo's image. This seems to resemble the bug enabling CVE-2024-11691: Out-of-bounds write in Apple GPU drivers via WebGL. That bug is said to involve WebGL operations on Apple silicon M series devices, and thus only affect Apple M series hardware. In contrast, the bug I am reporting occurs in Intel code on my MaPro7,1 with AMD gpu, and seems not present on my M1 MaBookPro. I have sent many automatically generated crash reports, and Feedbacks with extensive System Diagnostics etc reports. I have been sending such feedback a long time (years?) through several iterations of macOS. I tried to open a case with standard Apple support. I was told I could not because I am using beta software (macOS 115.2 Beta (24C5089c)), and that I should work through the developer program. So here I am. I think this bug should get more attention. Please advise me if there is a better way or place to post this.
0
0
69
19h
Namedrop style AirDrop is not working.
PLATFORM AND VERSION Xcode Version 16.2 beta 3 (16C5023f) macOS 15.1.1 (24B91) Run-time configuration: iOS 18.0 DESCRIPTION OF PROBLEM We are currently testing the functionality of AirDrop by bringing iPhones close to each other. I am trying to transfer the activityItemsConfiguration set in the modal screen via AirDrop. However, if presentationStyle is fullscreen, it succeeds, but otherwise the connection is successful but no item is displayed on the screen. STEPS TO REPRODUCE Open my project. Run on device Tap Present with toggle is off. ModalViewController presented as sheet. Bring another iPhone closer Play connection animation, then just display connected.
1
0
58
1d
Siri Prioritizing Incorrect Contact When Default Account is Set
Hello, I’m experiencing an issue with Siri on iOS where it prioritizes a contact from the wrong account, even though I’ve set a default account for Contacts. Details of the issue: I have two contact groups: Exchange (Outlook) — my default account. iCloud. There’s a contact, "Alena Jorse," which exists in both groups: In the Exchange group, the name is saved as Alena Jorse. In the iCloud group, it is saved as Alena Jorse with double-strike formatting (e.g., "Alena Jorse**"). Both contacts have the same phone number. When I ask Siri to call "Alena Jorse," it selects the iCloud contact ("Alena Jorse**") instead of the Exchange contact, despite Exchange being set as the default Contacts account in my iOS settings. Expected Behavior: Siri should prioritize the contact from the default account (Exchange) and ignore other accounts unless specified. Steps to Reproduce: Have duplicate contacts in two groups (Exchange and iCloud) with the same phone number. Set Exchange as the default Contacts account. Ask Siri to call the contact. Troubleshooting Steps Taken: Ensured the default account is set to Exchange. Verified both contacts have the same phone number. Tested by disabling iCloud temporarily, which resolves the issue (but is not a viable long-term solution). Request: Could you please advise if this is intended behavior or a bug? If it’s a configuration issue, how can I ensure Siri prioritizes the default account for contacts? If it’s a bug, could this be investigated further? Thank you for your assistance.
0
0
54
2d
FamilyActivitySelection tokens are invalid for other members in family sharing network
I'm currently working with the FamilyControls API and testing my app on two different devices. Both apps are in the same family-sharing network with one phone being the owner of the network (I'll call this A) and the other one being an adult in the network(I'll call this B). When device A picks apps using the FamilyActivityPicker, it shares that selection with device B (via encoding, sending over network, and decoding on device B). However, interacting with the token (displaying it, using it in shield) throws an error saying the token is null. From the documentation, I thought every token would be the same across all devices in the family sharing network. So my question: How do I send the FamilyActivitySelection from A to B and have the tokens still be functional? Does this functionality only work if A is a "parent" and B is a "child" in the family sharing network? Also, side note: If I reverse the process and send the tokens from B to A. Interacting with the token works exactly as expected. For some reason, it's only going from A to B where it doesn't work.
0
0
106
3d
How to update data in a DataFrame
My project loads a CSV into a DataFrame and displays it in a Table (a MacOS app). So far so good ... but when trying to update a value in a column, I dont see anyway to update this value. The table gets the value for the column like this: func getColumnValue(row :DataFrame.Rows.Element, columnName :String) -> String { if row.base.containsColumn(columnName) { var value = "" if row[columnName] != nil { value = "\(row[columnName]!)" } return value } ... But the documentation and googles dont show any way to update the same column. Any help is appreciated with cookies. Attempt to update: func setColumnValue(row :DataFrame.Rows.Element, columnName :String, value :String) { var column: [String?] = data[columnName] column[row.id] = value ... }
3
0
143
4d
Why is applicationWillEnterForeground called on first launch when using AppIntent with openAppWhenRun = true?
Hello, I’ve implemented a feature in my app using AppIntent. When the app is not running in the background and is launched for the first time via a shortcut, both application:didFinishLaunchingWithOptions: and applicationWillEnterForeground: are called. Normally, on the first launch, applicationWillEnterForeground: is not invoked. However, this behavior seems to occur only when the app is launched through a shortcut. I’d like to understand why applicationWillEnterForeground: is being called in this scenario. For reference, the AppIntent has openAppWhenRun set to true. Thank you in advance for your help!
0
0
138
4d
Why is applicationWillEnterForeground called on first launch when using AppIntent with openAppWhenRun = true?
Hello, I’ve implemented a feature in my app using AppIntent. When the app is not running in the background and is launched for the first time via a shortcut, both application:didFinishLaunchingWithOptions: and applicationWillEnterForeground: are called. Normally, on the first launch, applicationWillEnterForeground: is not invoked. However, this behavior seems to occur only when the app is launched through a shortcut. I’d like to understand why applicationWillEnterForeground: is being called in this scenario. For reference, the AppIntent has openAppWhenRun set to true. Thank you in advance for your help!
3
0
151
4d
Photo App on IOS18
Just downloaded the new IOS18 update. immediately ran into problems. in particular the new Photo app is dreadful. It is cumbersome to navigate, quite unintuitive to use and, frankly, a mess. I cannot imagine why Apple thought this an improvement compared to the simpler and much more usable previous version. other problems include difficulties with location and home screens on the weather app, and others. i was about to upgrade my iPhone (XR) to the iPhone 16. I am now seriously questioning the sense of that given how cumbersome many of the apps have become.
1
0
100
6d
Invalid_request Error When Remapping User Identifiers After App Transfer
Hello, We recently transferred our iOS app from an individual developer account to a corporate account. By following this guide (link), we successfully obtained the transfer identifiers for all our current users and have stored the data fetched from Apple. Now that the transfer has been completed for about 10 hours, we're attempting to remap the old identifiers to the new ones using this guide (link). Unfortunately, all our requests are returning an 'invalid_request' error. I've noticed others have faced the same problem, but I haven't found a solution yet. Can anyone help me resolve this issue?
0
0
95
6d
revoke api is not working.
https://developer.apple.com/documentation/sign_in_with_apple/revoke_tokens/ As shown in the documentation, when I tested via curl, I received a response with status 200, but when I logged in to account.apple.com with the linked account, it shows that it is still connected. I would like to know if there is any additional way to verify that the revoke api is working properly.
0
0
76
6d