I have a fairly basic prompt I've created that parses a list of locations out of a string. I've then created a tool, which for these locations, finds their latitude/longitude on a map and populates that in the response. However, I cannot get the language model session to see/use my tool. I have code like this passing the tool to my prompt: class Parser { func populate(locations: String, latitude: Double, longitude: Double) async { let findLatLonTool = FindLatLonTool(latitude: latitude, longitude: longitude) let session = LanguageModelSession(tools: [findLatLonTool]) { A prompt that populates a model with a list of locations. Use the findLatLon tool to populate the latitude and longitude for the name of each location. } let stream = session.streamResponse(to: Parse these locations: (locations), generating: ParsedLocations.self) let locationsModel = LocationsModels(); do { for try await partialParsedLocations in stream { locationsModel.parsedLocations = partialParsedLocations.content } } catch { print(Error
Search results for
Swift 6
49,210 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I’ve now upgraded Xcode to the latest available build: Xcode 26.0 beta 5 (17A5295f). This should, in theory, resolve the version mismatch issue you highlighted. Please let me know if I should expect to wait for beta 6 specifically, but since this is the latest release, I assume it covers the ABI/runtime symbol alignment. Current behavior: macOS (Intel MacBook Pro): The app launches successfully, and the window is displayed. Pressing the record button (⭘) results in console logs: localeNotSupported could not record: invalidAudioDataType Playback works (I can hear the recorded sound), but there is no transcription displayed and no highlighting. Play button plays back my speech. iOS (iPhone 11, iOS 26.0 beta): Same as macOS above, except playback volume is extremely faint, even at maximum system volume. Question regarding Dictation: I also tried enabling Edit → Start Dictation from the menu, and accepted the prompt. After that: I don’t see any option to disable it within the app. Turning off Dictation i
Topic:
Machine Learning & AI
SubTopic:
Foundation Models
Tags:
Content written a day earlier and saved, is today only showing partially. It seems the software did not save the content completely.
Topic:
Community
SubTopic:
Apple Developers
Hi, this is because you are using an older Xcode (beta 3) with a newer OS (beta 6). During beta, we make changes to the API based on developer feedback, so we do not guarantee the compatibility of runtime symbols (ABI) between beta versions. This crash is unrelated to Intel or not. The best way to resolve this is installing an Xcode that matches your OS.
Topic:
Machine Learning & AI
SubTopic:
Foundation Models
Tags:
@kevdoescode you ask if the post is correct. That probably means it does not work properly. If so, do you get and error message ? Is the result different from what you expected ? To use the forum properly, you have to provide this information, not just ask someone to correct your code. I advise also to read the very good post on how to properly use the forum: https://developer.apple.com/forums/thread/706527 A simple code sample here: https://forums.swift.org/t/sending-an-http-post-request-to-an-api-using-swift/62457
Topic:
Safari & Web
SubTopic:
General
Tags:
I’m having the same issue. Until beta 5 or 6 the custom sound file wouldn’t even play and it would only play a system sound. I’m hoping this is still just a bug and they fix these issues but I’m not sure what to expect.
Topic:
App & System Services
SubTopic:
Notifications
libdispatch.dylib + 112004) [0x1a4f40584] 1 ??? (libswiftDispatch.dylib + 7308) [0x1a6606c8c] 1 ??? (libswiftDispatch.dylib + 7728) [0x1a6606e30] 1 ??? (libswiftDispatch.dylib + 7972) [0x1a6606f24] 1 ??? (libswiftDispatch.dylib + 8124) [0x1a6606fbc] 1 ??? (libswiftDispatch.dylib + 7768) [0x1a6606e58] 1 ??? (GRDBInternal + 9948) [0x2674e16dc] 1 ??? (GRDBInternal + 9764) [0x2674e1624] 1 ??? (ToolKit + 528580) [0x278d030c4] 1 ??? (libsqlite3.dylib + 521032) [0x1cb4b0348] 1 ??? (libsqlite3.dylib + 1067048) [0x1cb535828] 1 ??? (libsqlite3.dylib + 382056) [0x1cb48e468] 1 ??? (libsqlite3.dylib + 309376) [0x1cb47c880] 1 ??? (libsystem_kernel.dylib + 27292) [0x1eddfba9c] 1 Binary Images: 0x104810000 - ??? com.apple.WorkflowKit.BackgroundShortcutRunner 7.0 (3612.0.2.1) /System/Library/PrivateFrameworks/WorkflowKit.framework/XPCServices/BackgroundShortcutRunner.xpc/BackgroundShortcutRunner 0x1a4f25000 - 0x1a4f6ab3f libdispatch.dylib /usr/lib/system/libdispatch.dylib 0x1a6605000 - 0x1a661b560 libswiftDispatch.dylib <
Topic:
Community
SubTopic:
Apple Developers
Tags:
{app_name:BackgroundShortcutRunner,timestamp:2025-08-15 17:49:40.00 +1000,app_version:7.0,slice_uuid:DAB8C7ED-E848-3D53-BDF3-CE9809DE4D53,build_version:3612.0.2.1,bundleID:com.apple.WorkflowKit.BackgroundShortcutRunner,duration_ms:882533,share_with_app_devs:0,is_first_party:0,bug_type:145,os_version:iPhone OS 18.6.1 (22G90),roots_installed:0,name:BackgroundShortcutRunner,incident_id:3F24B677-0C9B-4556-AF18-02EDAB046108} Date/Time: 2025-08-15 17:34:56.315 +1000 End time: 2025-08-15 17:49:38.848 +1000 OS Version: iPhone OS 18.6.1 (Build 22G90) Architecture: arm64e Report Version: 60 Incident Identifier: 3F24B677-0C9B-4556-AF18-02EDAB046108 Data Source: Microstackshots Shared Cache: C4C231A4-B057-324E-9152-B464B595F130 slid base address 0x19a404000, slide 0x1a404000 Command: BackgroundShortcutRunner Path: /System/Library/PrivateFrameworks/WorkflowKit.framework/XPCServices/BackgroundShortcutRunner.xpc/BackgroundShortcutRunner Identifier: com.apple.WorkflowKit.BackgroundShortcutRunner Version: 7.0 (3612.0.2.1) Res
Topic:
Community
SubTopic:
Apple Developers
Tags:
We run an analytics query every day; this worked fine for the past 6 years or so. Two days ago this query has stopped working. It always returns a non-descript 400 Bad Request. Here's the exact query: curl -H 'Accept: application/a-gzip' -H 'Authorization: Bearer ' 'https://api.appstoreconnect.apple.com/v1/salesReports?filter[frequency]=DAILY&filter[reportType]=SALES&filter[reportSubType]=SUMMARY&filter[version]=1_0&filter[vendorNumber]=' And the response: HTTP Status 400 – Bad RequestHTTP Status 400 – Bad Request I have confirmed that the is correct (with an incorrect token I get a specific error message). Same with missing or incorrect filter parameters: the API returns an exact error message. I have also confirmed that our vendor number is correct (from AppstoreConnect › Payments and Financial Reports, top left corner), though specifying an invalid vendor number yields the same non-descript 400 Bad Request. With seemingly valid filter parameters, (no matter the report type or f
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect API
Cocoapods is a third-party tool, so if you're committed to using that as a dependency manager for your project, you should seek support using their support resources. As an alternative, Xcode supports Swift Package Manager, so if you're interested in switching all of your dependencies over to using that instead, that will also resolve this issue for you. — Ed Ford, DTS Engineer
Topic:
App & System Services
SubTopic:
StoreKit
Tags:
The NSImageView is in fact in an NSTableView, and I call NSImageView.bind(:to:withKeyPath:options:) in the callback passed to NSObject.observe(:options:changeHandler). The observer is added when the table cell view's objectValue is set, then removed again when it is set to nil. I'll add a call to NSImageView.unbind(.value) and see if that solves the crash. Your code has me a bit confused. How do you modify the contents of the NSImageView? Are you: Modifying the property of MyObject? (going through the binding) Modifying objectValue? (directly modifying the view cell) It feels like you're somewhat awkwardly set up to do both, which seems like an unnecessary complication. In the first case, there's no reason to remove any views, as you're simply doing a one-timing binding to a specific NSImageView. In the second case, you could drop binding entirely and simply directly assign the image whenever it changes. My concern here is that mixing both puts you in an odd situation, since going through #2 will remove the e
Topic:
UI Frameworks
SubTopic:
AppKit
Tags:
For me this crashes: let session = LanguageModelSession() but this does not: let session = LanguageModelSession(instructions: Some Instructions) Devices: MacBook Pro in Sequoia 15.6, Xcode 26 Beta 4, iPad Pro iOS 26 Beta 6
Topic:
Machine Learning & AI
SubTopic:
Foundation Models
Tags:
When any image view is being destroyed, make sure you're setting the target image to null and you've torn down any KVO infrastructure you've created that's tied to that object The NSImageView is in fact in a NSTableView, and I call NSImageView.bind(_:to:withKeyPath:options:) in the callback passed to NSObject.observe(_:options:changeHandler). The observer is added when the table cell view's objectValue is set, then removed again when it is set to nil. I'll add a call to NSImageView.unbind(.value) and see if that solves the crash. class MyCellView: NSTableCellView { private var observer: NSKeyValueObservation? override var objectValue: Any? { didSet { if let objectValue = objectValue as? MyObject { observer = objectValue.observe(.property) { [weak self] _, _ in for view in subviews { view.removeFromSuperview() } let imageView = NSImageView(image: nil) imageView.bind(.value, to: objectValue, withKeyPath: keyPath) addSubview(imageView) } } else { observer = nil } } } } That's generally a reasonable statement for
Topic:
UI Frameworks
SubTopic:
AppKit
Tags:
Hello, My app Juicy Defend - Fruit vs Robot has been waiting for review for +6 days. I want to know if this hold up is because of something I need to do on my end or if this is normal. Thank you! Khoa
It’s a bug. I saw this before too (FB18398975). I was told it’s fixed in macOS 26 beta 6 (25A5338b), and in my tests this appears to be the case.
Topic:
App & System Services
SubTopic:
Core OS