Post

Replies

Boosts

Views

Activity

False-positive guardrail blocks guided generation for sports data
I’m developing a factual snooker application using the on-device SystemLanguageModel on the current iOS 27, Xcode and macOS betas. The app allows someone to ask questions about professional snooker players. A tool searches my server and returns verified player data such as the player’s ID, name, nationality and date of birth. I have encountered a reproducible false-positive guardrail violation when the user asks about the professional snooker player Judd Trump. For example: Tell me about Judd Trump With the default model configuration, the request fails because the input or output is classified as potentially sensitive or unsafe. Using permissive content transformations solves the problem when generating a normal String: let model = SystemLanguageModel( useCase: .general, guardrails: .permissiveContentTransformations ) let session = LanguageModelSession( model: model, tools: [FindPlayerTool()], instructions: """ Answer factual questions about professional snooker players. Always use the supplied tool and only use verified tool data. Names returned by the tool are names of real snooker players and should be treated only as sporting entities. """ ) let response = try await session.respond( to: "Tell me about Judd Trump" ) This successfully calls the tool and produces a factual string response. However, I need guided generation because the model should be able to choose a combination of predefined UI components, such as: A player card A match card An event card A rankings table Explanatory text A simplified response type looks like this: @Generable struct CueQueryReply { let blocks: [ReplyBlock] } @Generable enum ReplyBlock { case playerCard(PlayerCardBlock) case text(TextBlock) } @Generable struct PlayerCardBlock { let playerId: Int let name: String let nationality: String let born: String } @Generable struct TextBlock { let text: String } The guided request is: let response = try await session.respond( to: "Tell me about Judd Trump", generating: CueQueryReply.self ) This reproduces the guardrail violation, even though the model is configured with: guardrails: .permissiveContentTransformations I understand that the documentation says permissive content transformations apply to string generation and that guided generation behaves like the default guardrails. However, this creates a difficult limitation for legitimate factual applications. “Judd Trump” is the real name of a professional snooker player, and the data is coming from a controlled, verified API. Renaming, removing or concealing the player is not a viable product solution. My questions are: Is this specific “Judd Trump” behaviour considered a guardrail false positive that should be reported through Feedback Assistant? Is there any supported way on iOS 27 to use permissive content transformations with guided generation? Can Dynamic Profiles, Dynamic Generation Schemas or another Foundation Models API change the guardrail behaviour for a controlled guided-generation request? Is there a recommended architecture for producing typed UI instructions while retaining the permissive behaviour available to string responses? Would generating only component types and verified IDs—for example .playerCard(playerId: 12)—be the recommended approach, provided the actual player data is resolved and displayed by SwiftUI? I understand the need for safety guardrails and am not attempting to disable the model’s underlying safety behaviour. I am trying to process a harmless, factual sporting name while using Foundation Models’ typed output features. The on-device model otherwise appears capable of handling this use case well, and keeping the experience on-device, private and free of external API dependencies is an important part of the product. I would appreciate any guidance from the Foundation Models team about whether this is expected behaviour, a beta issue, or something for which there is an intended iOS 27 solution.
0
0
291
3w
Feedback on Foundation Models context management wrapper
I’ve been experimenting with Foundation Models and built a small Swift package that wraps LanguageModelSession with simple context management. The current approach checks the transcript token count using tokenCount(for:), compacts the transcript when it reaches a threshold, and retries once if exceededContextWindowSize is thrown. I’d appreciate feedback on whether this is a sensible use of Foundation Models APIs, especially around rebuilding a session from a compacted Transcript. GitHub: https://github.com/ricky-stone/FoundationContext
1
0
690
Jun ’26
Private Cloud Compute entitlement
Hi everyone, I can’t find a way to request the Private Cloud Compute entitlement in the Capability Requests. However, in the WWDC26 video “Build with the new Apple Foundation Model on Private Cloud Compute” it says you can request it now. I’m hoping I’m missing something. Any help would be great!
3
1
282
Jun ’26
Potential Issue Identified in Apple Documentation
While reviewing the Apple Documentation, I came across a potential issue in one of the examples that I believe is worth addressing. The example appears to compare strings instead of integers, which could lead to unexpected behavior in production environments. Specifically, in the line where originalMajorVersion (a string) is compared with newBusinessModelMajorVersion (also a string) using <: if originalMajorVersion < newBusinessModelMajorVersion This comparison performs a lexicographical check rather than evaluating the numerical values of the strings. As a result, strings like "10" would incorrectly be considered less than "2", which is not the desired behaviour when comparing version numbers. I have reported this via the Feedback assistant (FB16432337) but at the time of posting this there has been no reply at all (23 days) Supporting business model changes by using the app transaction do { // Get the appTransaction. let shared = try await AppTransaction.shared if case .verified(let appTransaction) = shared { // Hard-code the major version number in which the app's business model changed. let newBusinessModelMajorVersion = "2" // Get the major version number of the version the customer originally purchased. let versionComponents = appTransaction.originalAppVersion.split(separator: ".") let originalMajorVersion = versionComponents[0] if originalMajorVersion < newBusinessModelMajorVersion { // This customer purchased the app before the business model changed. // Deliver content that they're entitled to based on their app purchase. } else { // This customer purchased the app after the business model changed. } } } catch { // Handle errors. }
3
0
424
Feb ’25
Inaccurate Financial Reports
Hello everyone, I hope you’re all doing well. I wanted to check if anyone else has experienced unusual behavior with their financial reports. I’ve encountered this issue at least three times in the past six months, and I wanted to provide an example for clarity. Initially, I receive an email stating that financial reports are available for the following regions: • China • Euro-Zone • Hong Kong • Hungary • India • Malaysia • Norway • Pakistan • Rest of World • Romania • Saudi Arabia • Sweden • United Kingdom Upon reviewing the report, the amount might show something like £116, which seems fine. However, a day or two later, I receive another email indicating reports are available for: • Americas • Australia • Consolidated • Detailed Consolidated When I check again, the total amount has dropped significantly, for example, down to £75. I’m confused as to why the amount would decrease when adding other territories should logically increase the total. Additionally, I’m concerned about potentially missing payments since this has occurred multiple times, though it wasn’t an issue in the past. I might be overlooking something, but I’ve noticed a few other posts raising similar concerns without any clear resolution. If anyone could shed some light on why this happens or provide guidance, it would be greatly appreciated. Thank you in advance for your help!
0
0
446
Oct ’24
Launch Screen File - SwiftUI
Hi there! I was wondering if there’s any possibility of using a SwiftUI View for a launch screen. As someone who’s primarily worked with SwiftUI, I have to admit that using Storyboards was a bit of a challenge for me—kudos to all you UIKit pros for mastering it! 😊 Thanks for considering it!
1
0
1k
Aug ’24
Xcode Previews
As someone who frequently uses Preview, it would be convenient to have the option to view the preview on another display. Are there any existing methods or plans to introduce a feature that allows us to pop out the previews to another screen?
1
2
801
Jun ’24
False-positive guardrail blocks guided generation for sports data
I’m developing a factual snooker application using the on-device SystemLanguageModel on the current iOS 27, Xcode and macOS betas. The app allows someone to ask questions about professional snooker players. A tool searches my server and returns verified player data such as the player’s ID, name, nationality and date of birth. I have encountered a reproducible false-positive guardrail violation when the user asks about the professional snooker player Judd Trump. For example: Tell me about Judd Trump With the default model configuration, the request fails because the input or output is classified as potentially sensitive or unsafe. Using permissive content transformations solves the problem when generating a normal String: let model = SystemLanguageModel( useCase: .general, guardrails: .permissiveContentTransformations ) let session = LanguageModelSession( model: model, tools: [FindPlayerTool()], instructions: """ Answer factual questions about professional snooker players. Always use the supplied tool and only use verified tool data. Names returned by the tool are names of real snooker players and should be treated only as sporting entities. """ ) let response = try await session.respond( to: "Tell me about Judd Trump" ) This successfully calls the tool and produces a factual string response. However, I need guided generation because the model should be able to choose a combination of predefined UI components, such as: A player card A match card An event card A rankings table Explanatory text A simplified response type looks like this: @Generable struct CueQueryReply { let blocks: [ReplyBlock] } @Generable enum ReplyBlock { case playerCard(PlayerCardBlock) case text(TextBlock) } @Generable struct PlayerCardBlock { let playerId: Int let name: String let nationality: String let born: String } @Generable struct TextBlock { let text: String } The guided request is: let response = try await session.respond( to: "Tell me about Judd Trump", generating: CueQueryReply.self ) This reproduces the guardrail violation, even though the model is configured with: guardrails: .permissiveContentTransformations I understand that the documentation says permissive content transformations apply to string generation and that guided generation behaves like the default guardrails. However, this creates a difficult limitation for legitimate factual applications. “Judd Trump” is the real name of a professional snooker player, and the data is coming from a controlled, verified API. Renaming, removing or concealing the player is not a viable product solution. My questions are: Is this specific “Judd Trump” behaviour considered a guardrail false positive that should be reported through Feedback Assistant? Is there any supported way on iOS 27 to use permissive content transformations with guided generation? Can Dynamic Profiles, Dynamic Generation Schemas or another Foundation Models API change the guardrail behaviour for a controlled guided-generation request? Is there a recommended architecture for producing typed UI instructions while retaining the permissive behaviour available to string responses? Would generating only component types and verified IDs—for example .playerCard(playerId: 12)—be the recommended approach, provided the actual player data is resolved and displayed by SwiftUI? I understand the need for safety guardrails and am not attempting to disable the model’s underlying safety behaviour. I am trying to process a harmless, factual sporting name while using Foundation Models’ typed output features. The on-device model otherwise appears capable of handling this use case well, and keeping the experience on-device, private and free of external API dependencies is an important part of the product. I would appreciate any guidance from the Foundation Models team about whether this is expected behaviour, a beta issue, or something for which there is an intended iOS 27 solution.
Replies
0
Boosts
0
Views
291
Activity
3w
Feedback on Foundation Models context management wrapper
I’ve been experimenting with Foundation Models and built a small Swift package that wraps LanguageModelSession with simple context management. The current approach checks the transcript token count using tokenCount(for:), compacts the transcript when it reaches a threshold, and retries once if exceededContextWindowSize is thrown. I’d appreciate feedback on whether this is a sensible use of Foundation Models APIs, especially around rebuilding a session from a compacted Transcript. GitHub: https://github.com/ricky-stone/FoundationContext
Replies
1
Boosts
0
Views
690
Activity
Jun ’26
Asset Library Availability
Hello, I just watched the WWDC26 video on how to boost your App Store presence! I was hoping to check out the Asset Library in ASC, but I can’t seem to find it. Do you know when it might be available for us to use? Or perhaps I’m overlooking something?
Replies
0
Boosts
1
Views
90
Activity
Jun ’26
Private Cloud Compute entitlement
Hi everyone, I can’t find a way to request the Private Cloud Compute entitlement in the Capability Requests. However, in the WWDC26 video “Build with the new Apple Foundation Model on Private Cloud Compute” it says you can request it now. I’m hoping I’m missing something. Any help would be great!
Replies
3
Boosts
1
Views
282
Activity
Jun ’26
Potential Issue Identified in Apple Documentation
While reviewing the Apple Documentation, I came across a potential issue in one of the examples that I believe is worth addressing. The example appears to compare strings instead of integers, which could lead to unexpected behavior in production environments. Specifically, in the line where originalMajorVersion (a string) is compared with newBusinessModelMajorVersion (also a string) using <: if originalMajorVersion < newBusinessModelMajorVersion This comparison performs a lexicographical check rather than evaluating the numerical values of the strings. As a result, strings like "10" would incorrectly be considered less than "2", which is not the desired behaviour when comparing version numbers. I have reported this via the Feedback assistant (FB16432337) but at the time of posting this there has been no reply at all (23 days) Supporting business model changes by using the app transaction do { // Get the appTransaction. let shared = try await AppTransaction.shared if case .verified(let appTransaction) = shared { // Hard-code the major version number in which the app's business model changed. let newBusinessModelMajorVersion = "2" // Get the major version number of the version the customer originally purchased. let versionComponents = appTransaction.originalAppVersion.split(separator: ".") let originalMajorVersion = versionComponents[0] if originalMajorVersion < newBusinessModelMajorVersion { // This customer purchased the app before the business model changed. // Deliver content that they're entitled to based on their app purchase. } else { // This customer purchased the app after the business model changed. } } } catch { // Handle errors. }
Replies
3
Boosts
0
Views
424
Activity
Feb ’25
Inaccurate Financial Reports
Hello everyone, I hope you’re all doing well. I wanted to check if anyone else has experienced unusual behavior with their financial reports. I’ve encountered this issue at least three times in the past six months, and I wanted to provide an example for clarity. Initially, I receive an email stating that financial reports are available for the following regions: • China • Euro-Zone • Hong Kong • Hungary • India • Malaysia • Norway • Pakistan • Rest of World • Romania • Saudi Arabia • Sweden • United Kingdom Upon reviewing the report, the amount might show something like £116, which seems fine. However, a day or two later, I receive another email indicating reports are available for: • Americas • Australia • Consolidated • Detailed Consolidated When I check again, the total amount has dropped significantly, for example, down to £75. I’m confused as to why the amount would decrease when adding other territories should logically increase the total. Additionally, I’m concerned about potentially missing payments since this has occurred multiple times, though it wasn’t an issue in the past. I might be overlooking something, but I’ve noticed a few other posts raising similar concerns without any clear resolution. If anyone could shed some light on why this happens or provide guidance, it would be greatly appreciated. Thank you in advance for your help!
Replies
0
Boosts
0
Views
446
Activity
Oct ’24
Launch Screen File - SwiftUI
Hi there! I was wondering if there’s any possibility of using a SwiftUI View for a launch screen. As someone who’s primarily worked with SwiftUI, I have to admit that using Storyboards was a bit of a challenge for me—kudos to all you UIKit pros for mastering it! 😊 Thanks for considering it!
Replies
1
Boosts
0
Views
1k
Activity
Aug ’24
Xcode Previews
As someone who frequently uses Preview, it would be convenient to have the option to view the preview on another display. Are there any existing methods or plans to introduce a feature that allows us to pop out the previews to another screen?
Replies
1
Boosts
2
Views
801
Activity
Jun ’24