Post

Replies

Boosts

Views

Activity

App review rejected due to using passkeys?
I submitted an app for beta app review. My app uses passkeys exclusively for registration and auth, so in the reviewer instructions, I said as much. The onboarding flow asks for three bits of info, and then attempts to create a passkey. I told the reviewer they could make up whatever they liked for those fields. My app was rejected with "We have started your beta app's review, but we were unable to successfully access all or part of the app. In order for us to continue the review, we need to have a way to verify all app features and functionality. Typically this is done by providing a demo account that has access to all features and functionality in your beta app." It then goes on to tell me "To help us proceed with the review of the app, please provide a user name and password in the Beta App Review Information section of App Store Connect." It is not possible to provide webauthn credentials like this. I replied to their message accordingly, but I have yet to hear back. Has anyone else run into this?
5
0
984
Sep ’26
My IP address has been blocked by the forums?
I've hit a dead end with normal Apple support channels. I wrote up a radar for it (FB23333685). I used curl -v https://developer.apple.com/forums/ on my Mac via my phone's hotspot (working) and via Spectrum (not working) (some irrelevant stuff elided to shrink post): Working: % curl -v https://developer.apple.com/forums/ * Host developer.apple.com:443 was resolved. * IPv6: 2620:149:a06:f000::134, 2620:149:a06:f000::139 * IPv4: 17.253.31.140, 17.253.31.139 * Trying [2620:149:a06:f000::134]:443... * Connected to developer.apple.com (2620:149:a06:f000::134) port 443 <elided> > GET /forums/ HTTP/1.1 > Host: developer.apple.com > User-Agent: curl/8.7.1 > Accept: */* > * Request completely sent off < HTTP/1.1 200 OK < Server: Apple < Date: Mon, 22 Jun 2026 23:22:30 GMT < Content-Type: text/html;charset=utf-8 < Vary: Accept-Encoding < Set-Cookie: oid-dev-forums=; Path=/; Domain=.apple.com; Expires=Thu, 01 Jan 1970 00:00:00 GMT; Max-Age=0; Secure; HttpOnly < Expires: Mon, 22 Jun 2026 23:22:29 GMT < X-Frame-Options: DENY < Strict-Transport-Security: max-age=31536000; includeSubDomains < Service-Worker-Allowed: / < User-Type: anonymous < Cache-Control: private,no-cache,no-store, must-revalidate, max-age=0 < Last-Modified: Mon, 22 Jun 2026 23:22:29 GMT < X-Content-Type-Options: nosniff < Content-Security-Policy: <elided> < Vary: Accept-Encoding < X-XSS-Protection: 1; mode=block < Vary: Origin < Vary: Access-Control-Request-Method < Vary: Access-Control-Request-Headers < Content-Language: en-US < X-Request-ID: 41b2b91a2a2c5e8be35787ec7b349db8 < Edge-Control: !no-store,max-age=3600 < X-Request-ID: 41b2b91a2a2c5e8be35787ec7b349db8 < Set-Cookie: myacinfo=; Path=/; Domain=.apple.com; Expires=Thu, 01 Jan 1970 00:00:00 GMT; Max-Age=0; Secure; HttpOnly < Set-Cookie: asc_user=; Path=/; Domain=.apple.com; Expires=Thu, 01 Jan 1970 00:00:00 GMT; Max-Age=0; Secure < Set-Cookie: XID=<redacted>; Path=/; Domain=.apple.com; Expires=Wed, 22 Jul 2026 23:22:29 GMT; Max-Age=2592000; Secure; HttpOnly < Set-Cookie: df_shld_btm_prd=<redacted>; Expires=Tue, 23 Jun 2026 11:22:30 GMT; Max-Age=43200; Domain=apple.com; Path=/; SameSite=Lax; Secure < Age: 2 < Via: https/1.1 ussea4-edge-mx-005.ts.apple.com (acdn/302.16436), https/1.1 ussea4-edge-fx-007.ts.apple.com (acdn/302.16436) < X-Cache: miss, miss < CDNUUID: 42f00814-9cfb-4675-a0fa-4f3aa5ba89da-2134634100 < Transfer-Encoding: chunked < Connection: keep-alive < <!DOCTYPE html> … Failing: % curl -v https://developer.apple.com/forums/ * Host developer.apple.com:443 was resolved. * IPv6: (none) * IPv4: 17.253.83.137, 17.253.83.132 * Trying 17.253.83.137:443... * Connected to developer.apple.com (17.253.83.137) port 443 <redacted> * SSL certificate verify ok. * using HTTP/1.x > GET /forums/ HTTP/1.1 > Host: developer.apple.com > User-Agent: curl/8.7.1 > Accept: */* > * Request completely sent off < HTTP/1.1 403 Forbidden < Server: Apple < Date: Mon, 22 Jun 2026 23:16:25 GMT < Content-Type: text/html < Content-Length: 146 < Cache-Control: private, no-cache, no-store, max-age=0 < Age: 0 < Via: https/1.1 uslax1-edge-mx-005.ts.apple.com (acdn/302.16436), https/1.1 uslax1-edge-fx-015.ts.apple.com (acdn/302.16436) < X-Cache: miss, miss < CDNUUID: 4da2a4a9-3bd4-4135-b895-6b58b6d7f53b-1614544808 < Connection: keep-alive < <html> <head><title>403 Forbidden</title></head> <body> <center><h1>403 Forbidden</h1></center> <hr><center>Apple</center> </body> </html> * Connection #0 to host developer.apple.com left intact The Spectrum response never reached the forums app at all — it was rejected at the edge node itself (uslax1-edge-mx-005 / uslax1-edge-fx-015, both LA-area). The working request happened to land on a Seattle-area edge (ussea4) via anycast routing. So this isn't an app-level or account-level block — it's a deny rule sitting on (or upstream of) the LA edge PoP for my specific IP. Thing is, I don’t know how to get help on this issue.
5
0
1.1k
Jun ’26
Control Widget Details?
I'm really struggling to get a handle on all the different aspects of Control Widgets. I wish the docs led with comprehensive visual examples. I'm trying to make a Control Widget that shows the user a quick status of something (on or off), and lets the user change that status, but when they turn it off, it can be turned off for a period of time. I want to present some options in a manner similar to the Focus widget. When you first display widets on macOS, you get this: On the Focus widget, see how it has a round button with a moon, the word "Focus", and a disclosure chevron? I want to reproduce that. If you click the moon button, it turns that focus mode on. If you click anywhere else, it shows this: And even those controls are quite fancy, expanding when you click on them. How do I get that second level of UI?
1
0
611
Jun ’26
(Air)Printing from JavaScript in Safari?
Is there any documentation or advice on printing from a Safari webapp (in JavaScript)? My app needs to print labels, and printing from Safari presents few options. For example, you can't turn off backgrounds or the URL/date/time footer. And it wants to print a full-size page, which ends up printing miles of label. (I've also tried printing from SwiftUI on a macOS app, and even that is just terrible to try to get right. Why is printing so hard?)
0
0
1.1k
May ’26
Any way to turn off delimiter auto-insertion?
In a recent Xcode update (maybe 26.5, maybe all 26 versions), Xcode started inserting the closing quote, parenthesis, or bracket. It happens like this. I type, say, an opening double quote ("). Then as soon as I type another character, it adds another double quote just ahead of the insertion point. Now, I have everything in the Settings->Editing->Completion section turned off. I also have virtually everything in the Indentation section turned off. Is this just a bug? I've reported it (FB22693037). But I'm surprised it wasn't caught by internal testing. I can't express how much I hate this behavior.
0
0
104
May ’26
"Clean Build Folder…" vs "Clean Build Folder Immediately"?
Xcode 26 (and previous versions) have these options: "Clean Build Folder…" vs "Clean Build Folder Immediately" (if you hold the option key). I can't tell how they're different. The ellipsis traditionally means you're going to get a dialog you have to address before the command will execute, but that doesn’t happen. Both seem to just delete files in the build folder.
0
0
126
May ’26
Error when using SecItemAdd with kSecReturnPersistentRef and user presence kSecAttrAccessControl
I'm trying to add a generic password to the keychain and get back the persistent ID for it, and give it .userPresence access control. Unfortunately, if I include that, I get paramError back from SecItemAdd. Here's the code: @discardableResult func set(username: String, hostname: String?, password: String, comment: String? = nil) throws -> PasswordEntry { // Delete any existing matching password… if let existing = try? getEntry(forUsername: username, hostname: hostname) { try deletePassword(withID: existing.id) } // Store the new password… var label = username if let hostname { label = label + "@" + hostname } var item: [String: Any] = [ kSecClass as String : kSecClassGenericPassword, kSecAttrDescription as String : "TermPass Password", kSecAttrGeneric as String : self.bundleID.data(using: .utf8)!, kSecAttrLabel as String : label, kSecAttrAccount as String : username, kSecValueData as String : password.data(using: .utf8)!, kSecReturnData as String : true, kSecReturnPersistentRef as String: true, ] if self.synchronizable { item[kSecAttrSynchronizable as String] = kCFBooleanTrue! } if let hostname { item[kSecAttrService as String] = hostname } if let comment { item[kSecAttrComment as String] = comment } // Apply access control to require the user to prove presence when // retrieving this password… var error: Unmanaged<CFError>? guard let accessControl = SecAccessControlCreateWithFlags(nil, kSecAttrAccessibleWhenUnlockedThisDeviceOnly, .userPresence, &error) else { let cfError = error!.takeUnretainedValue() as Error throw cfError } item[kSecAttrAccessControl as String] = accessControl item[kSecAttrAccessible as String] = kSecAttrAccessibleWhenUnlockedThisDeviceOnly var result: AnyObject! let status = SecItemAdd(item as CFDictionary, &result) try Errors.throwIfError(osstatus: status) load() guard let secItem = result as? [String : Any], let persistentRef = secItem[kSecValuePersistentRef as String] as? Data else { throw Errors.malformedItem } let entry = PasswordEntry(id: persistentRef, username: username, hostname: hostname, password: password, comment: comment) return entry } (Note that I also tried it omitting kSecAttrAccessible, but it had no effect.) This code works fine if I omit setting kSecAttrAccessControl. Any ideas? TIA!
6
0
285
Jul ’25
AXIsProcessTrusted returns true, but AXUIElementCopyAttributeValue fails with .cannotComplete
This was working a few days ago, but it has since stopped and I can't figure out why. I've tried resetting TCC, double-checking my entitlements, restarting, deleting and rebuilding, and nothing works. My app is a sandboxed macOS SwiftUI LSUIElement app that, when invoked, checks to see if the frontmost process is Terminal, then tries to get the frontmost window’s title. func getFrontmostWindowTitle() throws -&gt; String? { let trusted = AXIsProcessTrusted() print("getFrontmostWindowTitle AX trusted: \(trusted)") guard let app = NSWorkspace.shared.frontmostApplication else { return nil } let appElement = AXUIElementCreateApplication(app.processIdentifier) var focusedWindow: AnyObject? let status = AXUIElementCopyAttributeValue(appElement, kAXFocusedWindowAttribute as CFString, &amp;focusedWindow) guard status == .success, let window = focusedWindow else { if status == .cannotComplete { throw Errors.needAccessibilityPermission } return nil } var title: AnyObject? let titleStatus = AXUIElementCopyAttributeValue(window as! AXUIElement, kAXTitleAttribute as CFString, &amp;title) guard titleStatus == .success else { return nil } return title as? String } I recently renamed the app, but the Bundle ID has not yet changed. I have com.apple.security.accessibility set to YES in the Entitlements file (although i had to add it manually), and a NSAccessibilityUsageDescription string set in Info.plist. The first time I ran this, macOS nicely prompted for permission. Now it won't do that, even when I use AXIsProcessTrustedWithOptions() to try to force it. If I use tccutil to reset accessibility and apple events, it still doesn't prompt. If I drag my app from the build products folder to System Settings, it gets added to the system TCC DB (not the user DB). It shows an auth value of 2 for my app: % sudo sqlite3 "/Library/Application Support/com.apple.TCC/TCC.db" "SELECT client,auth_value FROM access WHERE service='kTCCServiceAccessibility' OR service='kTCCServiceAppleEvents';" com.latencyzero.&lt;redacted&gt;|2 &lt;redactd&gt; I'm at a loss as to what went wrong. I proved out the concept earlier and it worked, and have since spent a lot of time enhancing and polishing the app, and now things aren't working and I'm starting to worry.
4
0
1.7k
Jul ’25
Refreshing AASA file?
I recently started a new app that supports universal links. I noticed an error in the apple-app-site-association (AASA) file and updated it. I used mode=developer in the applinks configuration, and it works well on Simulator, but for the life of me I can't get my device to load the new file, and the CDN hasn't updated in days. Any suggestions for how to get it to update, or get iOS to load the file directly? mode=developer is supposed to do this, but it simply won't on device. I've tried touching the file, and I can see its reported HTTP last modification date and eTag have changed. I've tried deleting and reinstalling the app; I've tried restarting the phone; I've tried clean builds; I've tried changing the applinks: to something else and reinstalling; I've tried installing via TestFlight.
2
0
560
Jul ’25
Can't get forum notifications to work in Safari
Every time I visit these forums, a banner is displayed at the top asking me to opt-in to notifications. I click "opt-in," the banner disappears, and no notifications are sent. If I visit my forum profile, it says my browser isn't allowing notifications: If I look in Settings-&gt;Websites, in the list of "These websites have asked for permission to show alerts in Notification Center," there are no apple.com websites whatsoever, including developer.apple.com. "Allow websites to ask for permission to send notifications" is checked, and I have many other websites in that list. I consider this to be a bug in Safari, but maybe it’s an issue with the forum itself (although I doubt it). I've submitted a Radar for it, but haven't heard anything back (I never do). EDIT: I realize I should've put this in another category, but it won't let me change that now.
1
1
1k
Jan ’25
Scaling a collection of positioned views to parent (macOS)?
I have a view that lets the user position and size a bunch of subviews. I use .frame() and .position() to accomplish this. Right now, if the user resizes the window, the views stay where they are, anchored to the top-left corner. What I'd like is for the views to scale as a whole with window, maintaining their relative position, and their aspect ratios. I can apply .scaleEffect(_:anchor:) to the containing view, and it scales them the way I want, but I'm not sure how to tie it to the window. My first thought is to use a GeometryReader, but I don't really know what the "original" size would have been in order to compute a scale factor. How else might I accomplish this?
Topic: UI Frameworks SubTopic: SwiftUI
1
0
323
Jan ’25
Serial port speed limited to 3 Mbps
Six months ago I wrote FB14122473, detailing how the built-in CDC (or FTDI) VCP serial port driver is limited to 3 Mbps or less. Thing is, there are some FTDI devices that can do 12 Mbps (maybe more), and I have devices I need to communicate with at 4 Mbps. I had to use the FTDI SDK to be able to communicate with these. I was hoping this post might help draw attention to that bug report.
1
0
535
Jan ’25
Suppressing contextual menu on AVPlayerView in SwiftUI app
My app plays videos. At first I used SwiftUI’s VideoPlayer, but that didn't give me enough control over the underlying AVPlayerView, so I created my own NSViewRepresentable. That works well, and I can adjust the AVPlayerView as I see fit. But it seems to have a contextual menu that still appears instead of the one I try to apply using SwiftUI. If I put a non-opaque color over the AVPlayerView in a ZStack, I'm able to then add a .contextMenu that works, but only if the color is non-opaque (e.g. Color(red: 0, green: 0, blue: 0, opacity: 0.00001)). This feels like a pretty hacky solution, and doesn’t work if I set opacity: to 0. Is there a better way to keep AVPlayerView from handling events? It also gets scroll events (which scrubs through the movie) that I'd like to suppress.
Topic: UI Frameworks SubTopic: SwiftUI
0
0
336
Dec ’24
SwiftUI previews and CloudKit sharing
The SwiftUI templates provided by Xcode typically create an in-memory store for preview purposes. I started from one of these templates and added the necessary code for working with CloudKit shares, but now the existing preview store creation gets runtime errors I'm struggling to understand. The ultimate error is: FAULT: NSInternalInconsistencyException: Unsupported feature in this configuration; { store = "<NSSQLCore: 0x12e26b170> (URL: file:///dev/null)"; } There are other things in the log like: warning: Multiple NSEntityDescriptions claim the NSManagedObject subclass 'Trip' so +entity is unable to disambiguate. This might be due in part to the normal full stack being instantiated during a unit test, but that was the only way I could step through the code to try to see what was causing the SwiftUI preview to crash. I can't build the full core data stack as normal, because then the unit tests and previews pollute the real store.
1
0
633
Oct ’24
App review rejected due to using passkeys?
I submitted an app for beta app review. My app uses passkeys exclusively for registration and auth, so in the reviewer instructions, I said as much. The onboarding flow asks for three bits of info, and then attempts to create a passkey. I told the reviewer they could make up whatever they liked for those fields. My app was rejected with "We have started your beta app's review, but we were unable to successfully access all or part of the app. In order for us to continue the review, we need to have a way to verify all app features and functionality. Typically this is done by providing a demo account that has access to all features and functionality in your beta app." It then goes on to tell me "To help us proceed with the review of the app, please provide a user name and password in the Beta App Review Information section of App Store Connect." It is not possible to provide webauthn credentials like this. I replied to their message accordingly, but I have yet to hear back. Has anyone else run into this?
Replies
5
Boosts
0
Views
984
Activity
Sep ’26
My IP address has been blocked by the forums?
I've hit a dead end with normal Apple support channels. I wrote up a radar for it (FB23333685). I used curl -v https://developer.apple.com/forums/ on my Mac via my phone's hotspot (working) and via Spectrum (not working) (some irrelevant stuff elided to shrink post): Working: % curl -v https://developer.apple.com/forums/ * Host developer.apple.com:443 was resolved. * IPv6: 2620:149:a06:f000::134, 2620:149:a06:f000::139 * IPv4: 17.253.31.140, 17.253.31.139 * Trying [2620:149:a06:f000::134]:443... * Connected to developer.apple.com (2620:149:a06:f000::134) port 443 <elided> > GET /forums/ HTTP/1.1 > Host: developer.apple.com > User-Agent: curl/8.7.1 > Accept: */* > * Request completely sent off < HTTP/1.1 200 OK < Server: Apple < Date: Mon, 22 Jun 2026 23:22:30 GMT < Content-Type: text/html;charset=utf-8 < Vary: Accept-Encoding < Set-Cookie: oid-dev-forums=; Path=/; Domain=.apple.com; Expires=Thu, 01 Jan 1970 00:00:00 GMT; Max-Age=0; Secure; HttpOnly < Expires: Mon, 22 Jun 2026 23:22:29 GMT < X-Frame-Options: DENY < Strict-Transport-Security: max-age=31536000; includeSubDomains < Service-Worker-Allowed: / < User-Type: anonymous < Cache-Control: private,no-cache,no-store, must-revalidate, max-age=0 < Last-Modified: Mon, 22 Jun 2026 23:22:29 GMT < X-Content-Type-Options: nosniff < Content-Security-Policy: <elided> < Vary: Accept-Encoding < X-XSS-Protection: 1; mode=block < Vary: Origin < Vary: Access-Control-Request-Method < Vary: Access-Control-Request-Headers < Content-Language: en-US < X-Request-ID: 41b2b91a2a2c5e8be35787ec7b349db8 < Edge-Control: !no-store,max-age=3600 < X-Request-ID: 41b2b91a2a2c5e8be35787ec7b349db8 < Set-Cookie: myacinfo=; Path=/; Domain=.apple.com; Expires=Thu, 01 Jan 1970 00:00:00 GMT; Max-Age=0; Secure; HttpOnly < Set-Cookie: asc_user=; Path=/; Domain=.apple.com; Expires=Thu, 01 Jan 1970 00:00:00 GMT; Max-Age=0; Secure < Set-Cookie: XID=<redacted>; Path=/; Domain=.apple.com; Expires=Wed, 22 Jul 2026 23:22:29 GMT; Max-Age=2592000; Secure; HttpOnly < Set-Cookie: df_shld_btm_prd=<redacted>; Expires=Tue, 23 Jun 2026 11:22:30 GMT; Max-Age=43200; Domain=apple.com; Path=/; SameSite=Lax; Secure < Age: 2 < Via: https/1.1 ussea4-edge-mx-005.ts.apple.com (acdn/302.16436), https/1.1 ussea4-edge-fx-007.ts.apple.com (acdn/302.16436) < X-Cache: miss, miss < CDNUUID: 42f00814-9cfb-4675-a0fa-4f3aa5ba89da-2134634100 < Transfer-Encoding: chunked < Connection: keep-alive < <!DOCTYPE html> … Failing: % curl -v https://developer.apple.com/forums/ * Host developer.apple.com:443 was resolved. * IPv6: (none) * IPv4: 17.253.83.137, 17.253.83.132 * Trying 17.253.83.137:443... * Connected to developer.apple.com (17.253.83.137) port 443 <redacted> * SSL certificate verify ok. * using HTTP/1.x > GET /forums/ HTTP/1.1 > Host: developer.apple.com > User-Agent: curl/8.7.1 > Accept: */* > * Request completely sent off < HTTP/1.1 403 Forbidden < Server: Apple < Date: Mon, 22 Jun 2026 23:16:25 GMT < Content-Type: text/html < Content-Length: 146 < Cache-Control: private, no-cache, no-store, max-age=0 < Age: 0 < Via: https/1.1 uslax1-edge-mx-005.ts.apple.com (acdn/302.16436), https/1.1 uslax1-edge-fx-015.ts.apple.com (acdn/302.16436) < X-Cache: miss, miss < CDNUUID: 4da2a4a9-3bd4-4135-b895-6b58b6d7f53b-1614544808 < Connection: keep-alive < <html> <head><title>403 Forbidden</title></head> <body> <center><h1>403 Forbidden</h1></center> <hr><center>Apple</center> </body> </html> * Connection #0 to host developer.apple.com left intact The Spectrum response never reached the forums app at all — it was rejected at the edge node itself (uslax1-edge-mx-005 / uslax1-edge-fx-015, both LA-area). The working request happened to land on a Seattle-area edge (ussea4) via anycast routing. So this isn't an app-level or account-level block — it's a deny rule sitting on (or upstream of) the LA edge PoP for my specific IP. Thing is, I don’t know how to get help on this issue.
Replies
5
Boosts
0
Views
1.1k
Activity
Jun ’26
Control Widget Details?
I'm really struggling to get a handle on all the different aspects of Control Widgets. I wish the docs led with comprehensive visual examples. I'm trying to make a Control Widget that shows the user a quick status of something (on or off), and lets the user change that status, but when they turn it off, it can be turned off for a period of time. I want to present some options in a manner similar to the Focus widget. When you first display widets on macOS, you get this: On the Focus widget, see how it has a round button with a moon, the word "Focus", and a disclosure chevron? I want to reproduce that. If you click the moon button, it turns that focus mode on. If you click anywhere else, it shows this: And even those controls are quite fancy, expanding when you click on them. How do I get that second level of UI?
Replies
1
Boosts
0
Views
611
Activity
Jun ’26
(Air)Printing from JavaScript in Safari?
Is there any documentation or advice on printing from a Safari webapp (in JavaScript)? My app needs to print labels, and printing from Safari presents few options. For example, you can't turn off backgrounds or the URL/date/time footer. And it wants to print a full-size page, which ends up printing miles of label. (I've also tried printing from SwiftUI on a macOS app, and even that is just terrible to try to get right. Why is printing so hard?)
Replies
0
Boosts
0
Views
1.1k
Activity
May ’26
Any way to turn off delimiter auto-insertion?
In a recent Xcode update (maybe 26.5, maybe all 26 versions), Xcode started inserting the closing quote, parenthesis, or bracket. It happens like this. I type, say, an opening double quote ("). Then as soon as I type another character, it adds another double quote just ahead of the insertion point. Now, I have everything in the Settings->Editing->Completion section turned off. I also have virtually everything in the Indentation section turned off. Is this just a bug? I've reported it (FB22693037). But I'm surprised it wasn't caught by internal testing. I can't express how much I hate this behavior.
Replies
0
Boosts
0
Views
104
Activity
May ’26
"Clean Build Folder…" vs "Clean Build Folder Immediately"?
Xcode 26 (and previous versions) have these options: "Clean Build Folder…" vs "Clean Build Folder Immediately" (if you hold the option key). I can't tell how they're different. The ellipsis traditionally means you're going to get a dialog you have to address before the command will execute, but that doesn’t happen. Both seem to just delete files in the build folder.
Replies
0
Boosts
0
Views
126
Activity
May ’26
Error when using SecItemAdd with kSecReturnPersistentRef and user presence kSecAttrAccessControl
I'm trying to add a generic password to the keychain and get back the persistent ID for it, and give it .userPresence access control. Unfortunately, if I include that, I get paramError back from SecItemAdd. Here's the code: @discardableResult func set(username: String, hostname: String?, password: String, comment: String? = nil) throws -> PasswordEntry { // Delete any existing matching password… if let existing = try? getEntry(forUsername: username, hostname: hostname) { try deletePassword(withID: existing.id) } // Store the new password… var label = username if let hostname { label = label + "@" + hostname } var item: [String: Any] = [ kSecClass as String : kSecClassGenericPassword, kSecAttrDescription as String : "TermPass Password", kSecAttrGeneric as String : self.bundleID.data(using: .utf8)!, kSecAttrLabel as String : label, kSecAttrAccount as String : username, kSecValueData as String : password.data(using: .utf8)!, kSecReturnData as String : true, kSecReturnPersistentRef as String: true, ] if self.synchronizable { item[kSecAttrSynchronizable as String] = kCFBooleanTrue! } if let hostname { item[kSecAttrService as String] = hostname } if let comment { item[kSecAttrComment as String] = comment } // Apply access control to require the user to prove presence when // retrieving this password… var error: Unmanaged<CFError>? guard let accessControl = SecAccessControlCreateWithFlags(nil, kSecAttrAccessibleWhenUnlockedThisDeviceOnly, .userPresence, &error) else { let cfError = error!.takeUnretainedValue() as Error throw cfError } item[kSecAttrAccessControl as String] = accessControl item[kSecAttrAccessible as String] = kSecAttrAccessibleWhenUnlockedThisDeviceOnly var result: AnyObject! let status = SecItemAdd(item as CFDictionary, &result) try Errors.throwIfError(osstatus: status) load() guard let secItem = result as? [String : Any], let persistentRef = secItem[kSecValuePersistentRef as String] as? Data else { throw Errors.malformedItem } let entry = PasswordEntry(id: persistentRef, username: username, hostname: hostname, password: password, comment: comment) return entry } (Note that I also tried it omitting kSecAttrAccessible, but it had no effect.) This code works fine if I omit setting kSecAttrAccessControl. Any ideas? TIA!
Replies
6
Boosts
0
Views
285
Activity
Jul ’25
AXIsProcessTrusted returns true, but AXUIElementCopyAttributeValue fails with .cannotComplete
This was working a few days ago, but it has since stopped and I can't figure out why. I've tried resetting TCC, double-checking my entitlements, restarting, deleting and rebuilding, and nothing works. My app is a sandboxed macOS SwiftUI LSUIElement app that, when invoked, checks to see if the frontmost process is Terminal, then tries to get the frontmost window’s title. func getFrontmostWindowTitle() throws -&gt; String? { let trusted = AXIsProcessTrusted() print("getFrontmostWindowTitle AX trusted: \(trusted)") guard let app = NSWorkspace.shared.frontmostApplication else { return nil } let appElement = AXUIElementCreateApplication(app.processIdentifier) var focusedWindow: AnyObject? let status = AXUIElementCopyAttributeValue(appElement, kAXFocusedWindowAttribute as CFString, &amp;focusedWindow) guard status == .success, let window = focusedWindow else { if status == .cannotComplete { throw Errors.needAccessibilityPermission } return nil } var title: AnyObject? let titleStatus = AXUIElementCopyAttributeValue(window as! AXUIElement, kAXTitleAttribute as CFString, &amp;title) guard titleStatus == .success else { return nil } return title as? String } I recently renamed the app, but the Bundle ID has not yet changed. I have com.apple.security.accessibility set to YES in the Entitlements file (although i had to add it manually), and a NSAccessibilityUsageDescription string set in Info.plist. The first time I ran this, macOS nicely prompted for permission. Now it won't do that, even when I use AXIsProcessTrustedWithOptions() to try to force it. If I use tccutil to reset accessibility and apple events, it still doesn't prompt. If I drag my app from the build products folder to System Settings, it gets added to the system TCC DB (not the user DB). It shows an auth value of 2 for my app: % sudo sqlite3 "/Library/Application Support/com.apple.TCC/TCC.db" "SELECT client,auth_value FROM access WHERE service='kTCCServiceAccessibility' OR service='kTCCServiceAppleEvents';" com.latencyzero.&lt;redacted&gt;|2 &lt;redactd&gt; I'm at a loss as to what went wrong. I proved out the concept earlier and it worked, and have since spent a lot of time enhancing and polishing the app, and now things aren't working and I'm starting to worry.
Replies
4
Boosts
0
Views
1.7k
Activity
Jul ’25
Refreshing AASA file?
I recently started a new app that supports universal links. I noticed an error in the apple-app-site-association (AASA) file and updated it. I used mode=developer in the applinks configuration, and it works well on Simulator, but for the life of me I can't get my device to load the new file, and the CDN hasn't updated in days. Any suggestions for how to get it to update, or get iOS to load the file directly? mode=developer is supposed to do this, but it simply won't on device. I've tried touching the file, and I can see its reported HTTP last modification date and eTag have changed. I've tried deleting and reinstalling the app; I've tried restarting the phone; I've tried clean builds; I've tried changing the applinks: to something else and reinstalling; I've tried installing via TestFlight.
Replies
2
Boosts
0
Views
560
Activity
Jul ’25
Can't get forum notifications to work in Safari
Every time I visit these forums, a banner is displayed at the top asking me to opt-in to notifications. I click "opt-in," the banner disappears, and no notifications are sent. If I visit my forum profile, it says my browser isn't allowing notifications: If I look in Settings-&gt;Websites, in the list of "These websites have asked for permission to show alerts in Notification Center," there are no apple.com websites whatsoever, including developer.apple.com. "Allow websites to ask for permission to send notifications" is checked, and I have many other websites in that list. I consider this to be a bug in Safari, but maybe it’s an issue with the forum itself (although I doubt it). I've submitted a Radar for it, but haven't heard anything back (I never do). EDIT: I realize I should've put this in another category, but it won't let me change that now.
Replies
1
Boosts
1
Views
1k
Activity
Jan ’25
Scaling a collection of positioned views to parent (macOS)?
I have a view that lets the user position and size a bunch of subviews. I use .frame() and .position() to accomplish this. Right now, if the user resizes the window, the views stay where they are, anchored to the top-left corner. What I'd like is for the views to scale as a whole with window, maintaining their relative position, and their aspect ratios. I can apply .scaleEffect(_:anchor:) to the containing view, and it scales them the way I want, but I'm not sure how to tie it to the window. My first thought is to use a GeometryReader, but I don't really know what the "original" size would have been in order to compute a scale factor. How else might I accomplish this?
Topic: UI Frameworks SubTopic: SwiftUI
Replies
1
Boosts
0
Views
323
Activity
Jan ’25
Serial port speed limited to 3 Mbps
Six months ago I wrote FB14122473, detailing how the built-in CDC (or FTDI) VCP serial port driver is limited to 3 Mbps or less. Thing is, there are some FTDI devices that can do 12 Mbps (maybe more), and I have devices I need to communicate with at 4 Mbps. I had to use the FTDI SDK to be able to communicate with these. I was hoping this post might help draw attention to that bug report.
Replies
1
Boosts
0
Views
535
Activity
Jan ’25
Suppressing contextual menu on AVPlayerView in SwiftUI app
My app plays videos. At first I used SwiftUI’s VideoPlayer, but that didn't give me enough control over the underlying AVPlayerView, so I created my own NSViewRepresentable. That works well, and I can adjust the AVPlayerView as I see fit. But it seems to have a contextual menu that still appears instead of the one I try to apply using SwiftUI. If I put a non-opaque color over the AVPlayerView in a ZStack, I'm able to then add a .contextMenu that works, but only if the color is non-opaque (e.g. Color(red: 0, green: 0, blue: 0, opacity: 0.00001)). This feels like a pretty hacky solution, and doesn’t work if I set opacity: to 0. Is there a better way to keep AVPlayerView from handling events? It also gets scroll events (which scrubs through the movie) that I'd like to suppress.
Topic: UI Frameworks SubTopic: SwiftUI
Replies
0
Boosts
0
Views
336
Activity
Dec ’24
SwiftUI previews and CloudKit sharing
The SwiftUI templates provided by Xcode typically create an in-memory store for preview purposes. I started from one of these templates and added the necessary code for working with CloudKit shares, but now the existing preview store creation gets runtime errors I'm struggling to understand. The ultimate error is: FAULT: NSInternalInconsistencyException: Unsupported feature in this configuration; { store = "<NSSQLCore: 0x12e26b170> (URL: file:///dev/null)"; } There are other things in the log like: warning: Multiple NSEntityDescriptions claim the NSManagedObject subclass 'Trip' so +entity is unable to disambiguate. This might be due in part to the normal full stack being instantiated during a unit test, but that was the only way I could step through the code to try to see what was causing the SwiftUI preview to crash. I can't build the full core data stack as normal, because then the unit tests and previews pollute the real store.
Replies
1
Boosts
0
Views
633
Activity
Oct ’24