I clicked the “Get” button in the Swift tutorial, and it started displaying a circular progress bar. However, when the progress bar was full, it did not show that I could use this tutorial, but still display “Get”. Device: iPad (7th) System: iPadOS 18.3.2 App Version: 4.6.4
Search results for
Swift 6
49,194 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
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
Topic:
App & System Services
SubTopic:
Hardware
When I try to make a unit test target for my macOS app that uses Objective-C, running tests fails, and the debugging log shows a message Creating more than one Application. If, on the other hand, when I create the unit test target, I select None as the target to be tested, and then add all my sources to that target, my tests work. So, I can get my testing done, but I think I must be doing something wrong. By the way, along with the error message, there is a stack crawl: 0 CoreFoundation 0x00007ff8140410aa __exceptionPreprocess + 242 1 libobjc.A.dylib 0x00007ff813b660b7 objc_exception_throw + 48 2 Foundation 0x00007ff814f19bd8 -[NSCalendarDate initWithCoder:] + 0 3 AppKit 0x00007ff817030062 -[NSApplication init] + 1718 4 XCTestCore 0x000000010774b0df -[XCTestDriver _createTestBundlePrincipalClassInstance] + 82 5 XCTestCore 0x0000000107749338 -[XCTestDriver _runTests] + 111 6 XCTestCore 0x000000010770f194 _XCTestMain + 126 7 libXCTestBundleInject.dylib 0x0000000106e8982d __copy_helper_block_e8_32s + 0
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:
Just tested with most recent Tahoe 26.0 Beta (25A5349a) and Xcode 26.0 beta 6 (17A5305f). Still get a Runningboard has returned error 5.
Topic:
Code Signing
SubTopic:
Certificates, Identifiers & Profiles
Tags:
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
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags:
I've tried creating a Lora adapter using the example dataset, scripts as part of the adapter_training_toolkit_v26_0_0 (last available) on MacOs 26 Beta 6. import SwiftUI import FoundationModels import Playgrounds #Playground { // The absolute path to your adapter. let localURL = URL(filePath: /Users/syl/Downloads/adapter_training_toolkit_v26_0_0/train/test-lora.fmadapter) // Initialize the adapter by using the local URL. let adapter = try SystemLanguageModel.Adapter(fileURL: localURL) // An instance of the the system language model using your adapter. let customAdapterModel = SystemLanguageModel(adapter: adapter) // Create a session and prompt the model. let session = LanguageModelSession(model: customAdapterModel) let response = try await session.respond(to: hello) } I get Adapter assets are invalid error. I've added the entitlements Is adapter_training_toolkit_v26_0_0 up to date?
Topic:
Machine Learning & AI
SubTopic:
Foundation Models
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.
Hi, Are there rules around using Foundation Models: In a background task/session? Concurrently, i.e. a bunch simultaneously using Swift Concurrency? I couldn't find this in the docs (sorry if I missed it) so wondering what's supported and what the best practice is here. In case it matters, my primary platform is Vision Pro (so, M2).
I filed the following issue on swiftlang/swift on GitHub (Aug 8th), and a followup the swift.org forums, but not getting any replies. As we near the release of Swift 6.2, I want to know if what I'm seeing below is expected, or if it's another case where the compiler needs a fix. protocol P1: Equatable { } struct S1: P1 { } // Error: Conformance of 'S1' to protocol 'P1' crosses into main actor-isolated code an can cause data races struct S1Workaround: @MainActor P1 { } // OK // Another potential workaround if `Equatable` conformance can be moved to the conforming type. protocol P2 { } struct S2: Equatable, P2 { } // OK There was a prior compiler bug fix which addressed inhereted protocols regarding @MainActor. For Equatable, one still has to use @MainActoreven when the default actor isolation is MainActor. Also affects Hashable and any other protocol inheriting from Equatable.
Thanks. This is a very Swift focused issue, so I think it’s better we talk about it over on Swift Forums. I’ve replied on your thread over there. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic:
Programming Languages
SubTopic:
Swift
Tags:
Thank you, it is nice to know these Swift-based CSR APIs are coming in macOS 26.0. However, I'm still wondering what these two functions are: xpc_session_set_peer_code_signing_requirement xpc_listener_set_peer_code_signing_requirement Because they are new in macOS 14.4, but seem to have basically zero use in Swift as per above. xpc_listener_t and xpc_session_t seem to be completely new objects from macOS 13.0, however the xpc C API - the convention they seem to follow - is way older. The two objects mentioned however gained a full set of new functions in macOS 13.0 and 14.0. E.g.: xpc_listener_create is a macOS 14.0+ function xpc_session_create_mach_service is a macOS 13.0+ function How am I supposed to treat these compared to the old C API using xpc_connection_create_mach_service + either XPC_CONNECTION_MACH_SERVICE_PRIVILEGED or XPC_CONNECTION_MACH_SERVICE_LISTENER? Are they supposed to be an easier-to-use session based API?
Topic:
App & System Services
SubTopic:
General
Tags:
Lemme see if I have this straight: You want to use the new Swift XPC API for app-to-daemon XPC communication. You want the daemon to validate the code signature of the client. Is that right? If so, the source of your confusion is that currently shipping systems have no support for this. Fortunately, that seems to have changed in macOS 26 (currently in beta). See Validating Signature Of XPC Process. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic:
App & System Services
SubTopic:
General
Tags:
Hi Ziqiao, I've tried with iOS 26 Beta 7 and since Beta 8 (landed tonight) on device (because my Xcode is stuck on iOS Beta 6, don't know why) and the problem is solved. I can now query CollectionItem with predicate that contains inherited properties. Now I have only got problems with accesses to the children property in List. When i got the following hierarchy and the SwiftUI view List access to the Item.children property I got another kind of crash. Category: Work (parent: none) Category: Tech (parent: Work) Thread 1: Fatal error: Never access a full future backing data - PersistentIdentifier(id: SwiftData.PersistentIdentifier.ID(backing: SwiftData.PersistentIdentifier.PersistentIdentifierBacking.managedObjectID(0x9872c0007ba42159 ))) with Optional(7639D151-5D48-46AC-AB2A-7F0F50919AC5) But I guess it's a different kind of problem now.
Topic:
App & System Services
SubTopic:
iCloud & Data
Tags:
I’m new to iOS development. Previously, I’ve worked with Python and Django, mainly using JetBrains PyCharm PRO. In PyCharm, I really benefit from plugins like Rainbow Brackets , which help a lot with readability and code navigation. As someone who wears glasses, I find such visual aids very helpful for reducing eye strain. While exploring Xcode, I noticed that similar built-in features or up-to-date plugin support seem limited. Considering Apple’s strong focus on accessibility and user experience, I was a bit surprised by this. With Xcode 26 coming soon, I’m also wondering if there will be improvements in plugin support or built-in tools like Swift Linter and Swift Format. Are there any current tools or plugins you’d recommend to fill these gaps?