Search results for

Swift 6

49,194 results found

Post

Replies

Boosts

Views

Activity

NSProgressIndicator indeterminate bar does not work in Tahoe Beta 8
We have an app that uses a NSProgressIndicator indeterminate and it no longer animates on Tahoe (currently beta 8). I did a empty swift app using storyboards and added this to the view controller: override func viewDidLoad() { super.viewDidLoad() let progressIndicator=NSProgressIndicator.init(frame: NSMakeRect(0, 300, 400,20)) progressIndicator.style = .bar progressIndicator.isIndeterminate = true progressIndicator.isDisplayedWhenStopped=true self.view.addSubview(progressIndicator) progressIndicator.startAnimation(self) } Works fine in macOS 15, no animation in macOS 26. If I switch to the style to spinner, it animates fine. Filed feedback FB19933934
Topic: UI Frameworks SubTopic: AppKit
0
0
147
1w
Seeking clarification on macOS URLs with security scope
I just saw another post regarding bookmarks on iOS where an Apple engineer made the following statement: [quote='855165022, DTS Engineer, /thread/797469?answerId=855165022#855165022'] macOS is better at enforcing the right behavior, so code that works there will generally work on iOS. [/quote] So I went back to my macOS code to double-check. Sure enough, the following statement: let bookmark = try url.bookmarkData(options: .withSecurityScope) fails 100% of the time. I had seen earlier statements from other DTS Engineers recommending that any use of a URL be bracketed by start/stopAccessingSecurityScopedResource. And that makes a lot of sense. If start returns true, then call stop. But if start returns false, then it isn't needed, so don't call stop. No harm, no foul. But what's confusing is this other, directly-related API where a security-scoped bookmark cannot be created under any circumstances because of the URL itself, some specific way the URL was initially created, and/or manipulated? So, what I'm askin
12
0
188
1w
Reply to Confused by new Swift XPC API's xpc_listener_t and xpc_session_t types
[quote='855504022, erdeszbalazs, /thread/798187?answerId=855504022#855504022, /profile/erdeszbalazs'] but seem to have basically zero use in Swift as per above. [/quote] These are part of XPC’s low-level C API (using the terms from XPC Resources). You can call this from Swift, just like you can call malloc from Swift, but the NSXPCConnection and low-level Swift APIs are both nicer. [quote='855504022, erdeszbalazs, /thread/798187?answerId=855504022#855504022, /profile/erdeszbalazs'] Are they supposed to be an easier-to-use session based API? [/quote] The new session-based APIs were designed to provide a better model for XPC, one that’s more closely aligned with the reality of the underlying implementation. They were introduced around the same time as the low-level Swift API, and so that API only supports this model. The low-level C API has to support this model and the previous model for compatibility. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Supp
Topic: App & System Services SubTopic: General Tags:
1w
Applications stuck in UDP sendto syscall
Hi, We’re seeing our build system (Gradle) get stuck in sendto system calls while trying to communicate with other processes via the local interface over UDP. To the end user it appears that the build is stuck or they will receive an error “Timeout waiting to lock XXX. It is currently in use by another Gradle instance”. But when the process is sampled/profiled, we can see one of the threads is stuck in a sendto system call. The only way to resolve the issue is to kill -s KILL the stuck Gradle process. A part of the JVM level stack trace: jar transforms Thread 12 #90 prio=5 os_prio=31 cpu=0.85ms elapsed=1257.67s tid=0x000000012e6cd400 nid=0x10f03 runnable [0x0000000332f0d000] java.lang.Thread.State: RUNNABLE at sun.nio.ch.DatagramChannelImpl.send0(java.base@17.0.10/Native Method) at sun.nio.ch.DatagramChannelImpl.sendFromNativeBuffer(java.base@17.0.10/DatagramChannelImpl.java:901) at sun.nio.ch.DatagramChannelImpl.send(java.base@17.0.10/DatagramChannelImpl.java:863) at sun.nio.ch.DatagramChannelImpl.send(java
1
0
192
2w
Xcode 26 SDK/Simulator Download Issue: (-67061 invalid signature (code or signature have been modified)
Hello there! I’m currently stuck with Xcode 26.0 beta 6 (17A5305f), as I can’t download the latest SDK/Simulator for iOS 26.0 beta 6 (23A5324a). The download constantly fails for days now with the following error message: (-67061 invalid signature (code or signature have been modified) Domain: SimDiskImageErrorDomain Code: 5 User Info: { DVTErrorCreationDateKey = 2025-08-26 21:11:30 +0000; unusableErrorDetail = ; } -- (-67061 invalid signature (code or signature have been modified) Domain: SimDiskImageErrorDomain Code: 5 User Info: { unusableErrorDetail = ; } -- System Information macOS Version 15.6.1 (Build 24G90) Xcode 26.0 (24208.7) (Build 17A5305f) Timestamp: 2025-08-26T23:11:30+02:00 I’ve already tried re-downloading the Xcode beta 6 from the Apple Developer site. I’ve also tried restarting my Mac and even tried to use the command line to install iOS 26 beta SDK via xcodebuild -downloadPlatform iOS -exportPath ~/Downloads (as noted here). This lead to the same error message. Ca
3
0
394
2w
Reply to When using requestSendPTPCommand to send both commands and data simultaneously, the response timeout occurs and the length of the command and data in the response is 0, need help pls.
When I called the PTP function below to send a command and add data, the response timed out for more than 5 seconds. After waiting for a period of time, I obtained the response. However, the response callback function obtained responsivData.length as zero and ptpResponseData.length as zero too. What were the full contents of ptpCommand (6 bytes) and ptpData (if applicable)? More generally, what command were you trying to send and what did you expect to happen? I haven't looked at the PTP spec in any great detail, but what your describing sound like what happens if you sent the device a command it didn't handle well. __ Kevin Elliott DTS Engineer, CoreOS/Hardware
2w
Reply to SpeechAnalyzer speech to text wwdc sample app
SpeechTranscriber.supportedLocales returns an empty array [] for me, on VisionOS 26.0 beta 6. This leads to the error SpeechTranscriber cannot be initialized with an unsupported locale: en_US (fixed en_US). Please consult SpeechTranscriber.supportedLocales. even if the locale is obtained using SpeechTranscriber.supportedLocale(equivalentTo:).
Topic: Media Technologies SubTopic: Audio Tags:
2w
FSKit volume mount fails with "Permission denied"
I'm trying to use FSKit to create a File System Extension that can read MFS-formatted disk images, following the old MFSLives sample project for reference. I have a well-formed MFS formatted img file that I'm trying to mount, but I'm having trouble getting the system to actually use my FSModule. DiskImageMounter fails to mount the img file, but I'm able to use it to attach the image as a device by clicking Ignore when it prompts me that it isn't able to read the disk. This is effectively the same as using the hdiutil command in Terminal. hdiutil attach -imagekey diskimage-class=CRawDiskImage -nomount Sample.img I've read that FSKit isn't fully integrated with Disk Arbitration yet, so I decided to see if I could force the system to use my extension by using the mount command. mkdir /tmp/Sample mount -F -t MFS disk54 /tmp/Sample Watching the logs in Console, I can see that fskit_agent sees my extension in its New Modules List, and I see an MFS process gets launched and logs messages from com.apple.running and c
4
0
154
2w
Reply to Xcode unit test "Creating more than one Application"
I'm using Xcode 15.2 on macOS 13.7.7. A new app project does not reproduce the problem, but I'm not yet seeing the relevant difference. At first I thought it might be because I was using a nonstandard build location, but changing that back to the default didn't fix it. With a breakpoint on -[NSApplication init], the first break has this backtrace frame #0: 0x00007ff81702f9ac AppKit`-[NSApplication init] frame #1: 0x00007ff81702f78e AppKit`+[NSApplication sharedApplication] + 120 frame #2: 0x00007ff81702df79 AppKit`NSApplicationMain + 409 frame #3: 0x000000010e442a91 PlainCalc`main(argc=5, argv=0x00007ff7b1ae7e68) at main.m:14:9 frame #4: 0x00007ff813b93418 dyld`start + 1896 And the second is frame #0: 0x00007ff81702f9ac AppKit`-[NSApplication init] frame #1: 0x00000001103bd0df XCTestCore`-[XCTestDriver _createTestBundlePrincipalClassInstance] + 82 frame #2: 0x00000001103bb338 XCTestCore`-[XCTestDriver _runTests] + 111 frame #3: 0x0000000110381194 XCTestCore`_XCTestMain + 126 frame #4: 0x000000010fafb82d libXC
2w
Implementation of Audio-Video Synchronization in Swift
I have a feature requirement: to switch the writer for file writing every 5 minutes, and then quickly merge the last two files. How can I ensure that the merged file is seamlessly combined and that the audio and video information remains synchronized? Currently, the merged video has glitches, and the audio is also out of sync. If there are experts who can provide solutions in this area, I would be extremely grateful.
1
0
180
2w
UICollectionView list: leading swipe overshoots in expanded split view for .plain/.grouped; .insetGrouped OK (iPadOS 26 b5–b8) [FB19785883]
Hi all, Sharing a reproducible UIKit issue I’m seeing across multiple iPadOS 26 betas, with a tiny sample attached and a short video. Short video https://youtu.be/QekYNnHsfYk Tiny project https://github.com/yoasha/ListSwipeOvershootReproSwift Summary In a UISplitViewController (.doubleColumn), a UICollectionView using list layout shows a large leading-swipe overshoot when the split view is expanded (isCollapsed == false). The cell content translates roughly 3–4× the action width. Repros with appearance = .plain and .grouped Does not repro with .insetGrouped Independent of trailing provider (issue persists when trailing provider is nil) Collapsed split (compact width) behaves correctly Environment Devices: iPad Air (3rd gen), iPadOS 26.0 (23A5326a) → Repro Simulators: iPad Pro 11-inch (M4), iPadOS 26.0 beta 6 → Repro Also tested on device: iPadOS 26 beta 5, 6, 7, 8 Xcode: 26.0 beta 6 (17A5305f) Steps to reproduce Launch the sample; ensure the split is expanded (isCollapsed == false).
0
0
95
2w