Post

Replies

Boosts

Views

Activity

Live activities on watchOS not working on simulator
Is there a trick to getting the new Live Activities on Apple Watch working via the simulator? I have an iPhone paired to a watch simulator, but live activities created on the phone aren't appearing on the watch Smart Stack. It looks like maybe the Smart Stack isn't functional on the watch simulator, as there are a bunch of blank tiles where the Smart Stack should be.
3
5
1.1k
Sep ’24
FoundationModels tool calling not working (iOS 26, beta 6)
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 parsing") } } } And then the tool that looks something like this: import Foundation import FoundationModels import MapKit struct FindLatLonTool: Tool { typealias Output = GeneratedContent let name = "findLatLon" let description = "Find the latitude / longitude of a location for a place name." let latitude: Double let longitude: Double @Generable struct Arguments { @Guide(description: "This is the location name to look up.") let locationName: String } func call(arguments: Arguments) async throws -> GeneratedContent { let request = MKLocalSearch.Request() request.naturalLanguageQuery = arguments.locationName request.region = MKCoordinateRegion( center: CLLocationCoordinate2D(latitude: latitude, longitude: longitude), latitudinalMeters: 1_000_000, longitudinalMeters: 1_000_000 ) let search = MKLocalSearch(request: request) let coordinate = try await search.start().mapItems.first?.location.coordinate if let coordinate = coordinate { return GeneratedContent( LatLonModel(latitude: coordinate.latitude, longitude: coordinate.longitude) ) } return GeneratedContent("Location was not found - no latitude / longitude is available.") } } But trying a bunch of different prompts has not triggered the tool - instead, what appear to be totally random locations are filled in my resulting model and at no point does a breakpoint hit my tool code. Has anybody successfully gotten a tool to be called?
2
1
582
Aug ’25
iPhone Simulator – Apple Watch Is Syncing (Xcode 11 Beta 7)
Currently runnning XCode 11 Beta 7, and trying to test out iCloud based functionality with an Apple Watch paired to an iPhone.However, when I open the watch settings app on the paired phone, it immediately displayed the screen saying that the "Apple Watch Is Syncing" and to come back later. But this never finishes.I have tried deleting simulators and re-pairing the Apple Watch but nothing seems to change this behaviour - even though the Watch is working and apparently paired, I cannot access the settings app.Is this expected behaviour? Have I done something wrong?
4
0
4.4k
Sep ’21
Donating App Intent with parameters (iOS 16 beta)
Has anybody managed to use the new IntentDonationManager to donate an intent which has a number of parameters defined with @Parameter? For example, given this snippet: struct MyIntent: AppIntent { ...     @Parameter(title: "MyParameter")     var parameter: MyParameter ... } When you use the constructor, the arguments are of type IntentParameter<MyParameter> rather than MyParameter. How do you actually create an instance of IntentParameter to pass into the constructor?
1
0
2.3k
Aug ’22
Preview crashes consistency in Xcode 16 beta
In the first Xcode 16 beta, none of my SwiftUI previews work - they all just crash on start up. Has anybody run into this and found a workaround? Have tried all the usual steps of cleaning the project/restarting Xcode.
Replies
30
Boosts
14
Views
12k
Activity
2w
Disable Apple Pay Later via Apple Pay JS API
Does Apple provide, or are they planning to provide a way to stop the Apple Pay dialog on the web from showing the option for a customer to use "pay later"? I can't see anything in the current SDK that seems to allow this: https://developer.apple.com/documentation/apple_pay_on_the_web/apple_pay_js_api
Replies
0
Boosts
1
Views
857
Activity
Mar ’23
Live activities on watchOS not working on simulator
Is there a trick to getting the new Live Activities on Apple Watch working via the simulator? I have an iPhone paired to a watch simulator, but live activities created on the phone aren't appearing on the watch Smart Stack. It looks like maybe the Smart Stack isn't functional on the watch simulator, as there are a bunch of blank tiles where the Smart Stack should be.
Replies
3
Boosts
5
Views
1.1k
Activity
Sep ’24
Access the ControlWidget family
With the new ControlWidget, is there any way to access the family from the environment? There is significantly more room on the 2x2 size versus the 2x1 size, and it would be nice to be able to customise labels based on the size currently being displayed.
Replies
0
Boosts
1
Views
548
Activity
Jul ’24
FoundationModels tool calling not working (iOS 26, beta 6)
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 parsing") } } } And then the tool that looks something like this: import Foundation import FoundationModels import MapKit struct FindLatLonTool: Tool { typealias Output = GeneratedContent let name = "findLatLon" let description = "Find the latitude / longitude of a location for a place name." let latitude: Double let longitude: Double @Generable struct Arguments { @Guide(description: "This is the location name to look up.") let locationName: String } func call(arguments: Arguments) async throws -> GeneratedContent { let request = MKLocalSearch.Request() request.naturalLanguageQuery = arguments.locationName request.region = MKCoordinateRegion( center: CLLocationCoordinate2D(latitude: latitude, longitude: longitude), latitudinalMeters: 1_000_000, longitudinalMeters: 1_000_000 ) let search = MKLocalSearch(request: request) let coordinate = try await search.start().mapItems.first?.location.coordinate if let coordinate = coordinate { return GeneratedContent( LatLonModel(latitude: coordinate.latitude, longitude: coordinate.longitude) ) } return GeneratedContent("Location was not found - no latitude / longitude is available.") } } But trying a bunch of different prompts has not triggered the tool - instead, what appear to be totally random locations are filled in my resulting model and at no point does a breakpoint hit my tool code. Has anybody successfully gotten a tool to be called?
Replies
2
Boosts
1
Views
582
Activity
Aug ’25
iPhone Simulator – Apple Watch Is Syncing (Xcode 11 Beta 7)
Currently runnning XCode 11 Beta 7, and trying to test out iCloud based functionality with an Apple Watch paired to an iPhone.However, when I open the watch settings app on the paired phone, it immediately displayed the screen saying that the "Apple Watch Is Syncing" and to come back later. But this never finishes.I have tried deleting simulators and re-pairing the Apple Watch but nothing seems to change this behaviour - even though the Watch is working and apparently paired, I cannot access the settings app.Is this expected behaviour? Have I done something wrong?
Replies
4
Boosts
0
Views
4.4k
Activity
Sep ’21
Donating App Intent with parameters (iOS 16 beta)
Has anybody managed to use the new IntentDonationManager to donate an intent which has a number of parameters defined with @Parameter? For example, given this snippet: struct MyIntent: AppIntent { ...     @Parameter(title: "MyParameter")     var parameter: MyParameter ... } When you use the constructor, the arguments are of type IntentParameter<MyParameter> rather than MyParameter. How do you actually create an instance of IntentParameter to pass into the constructor?
Replies
1
Boosts
0
Views
2.3k
Activity
Aug ’22
Cannot pair Apple Watch with Xcode 15 Beta 2 / watchOS 10
When Xcode tries to pair with my watch (Series 4) I receive this error. It keeps retrying, but continues to receive the same error. I have tried unpairing both the watch and the phone and re-pairing, but the error persists. I have also tried deleting ~/Library/Developer/Xcode/watchOS Device Support, but that hasn't helped either.
Replies
2
Boosts
0
Views
1.5k
Activity
Aug ’23