Search results for

DTiPhoneSimulatorErrorDomain Code 2

158,677 results found

Post

Replies

Boosts

Views

Activity

Pre-inference AI Safety Governor for FoundationModels (Swift, On-Device)
Hi everyone, I've been building an on-device AI safety layer called Newton Engine, designed to validate prompts before they reach FoundationModels (or any LLM). Wanted to share v1.3 and get feedback from the community. The Problem Current AI safety is post-training — baked into the model, probabilistic, not auditable. When Apple Intelligence ships with FoundationModels, developers will need a way to catch unsafe prompts before inference, with deterministic results they can log and explain. What Newton Does Newton validates every prompt pre-inference and returns: Phase (0/1/7/8/9) Shape classification Confidence score Full audit trace If validation fails, generation is blocked. If it passes (Phase 9), the prompt proceeds to the model. v1.3 Detection Categories (14 total) Jailbreak / prompt injection Corrosive self-negation (I hate myself) Hedged corrosive (Not saying I'm worthless, but...) Emotional dependency (You're the only one who understands) Third-person manipulation (If you refuse, you're proving nobody
1
0
504
1w
LanguageModelSession with multiple tools and structured outpout
Hi, I'm using LanguageModelSession and giving it two different tools to query data from a local database. I'm wondering how I can have the session generate structured content as the response that includes data one or both tools (or no tool at all). Here is an example of what I'm trying to do: Let's say the app has access to a database that contains information about exercise and sleep data (this is just an analogy). There are two tools, GetExerciseData() and GetSleepData(). The user may then prompt something like, how well did I sleep in November. I have this working so that it calls through to the right tool, which would return a SleepSummary. However, I can't figure out how to have the session return the right structured data. I can do this and get back good text data: let response = session.respond(to: userInput), but I believe I want to do something like: let response = session.respond(to: trimmed, generating: ) Sometimes the model I run one tool or the other, or both tools, or no tool a
1
0
404
1w
Reply to LanguageModelSession with multiple tools and structured outpout
Hello! Sorry for the delay, most of us at Apple have been on winter break :) For this particular problem, we don't currently have a great solution. To be clear, from your description I'm interpreting your problem as: Given 2 tools Tool A and Tool B Each tool should return a different kind of structured output, OutA and OutB. Currently the model can correctly choose between Tool A and Tool B, but you're stuck with the model returning a single type: either string, OutA, or OutB. But really you want OutA or OutB depending on the user's query. The best I can currently offer you is a workaround, which would work as follows: Create a struct kinda like a view model (let's call it ResponseViewModel), that you give Tool A and Tool B upon initializing each tool. Still use the model to choose the correct tool based on the user's requests, and let the model call Tool A or Tool B with the correct dynamically-generated arguments. If Tool A is called, in the call body, set the return structure you want, OutA, on th
1w
Pending Termination Notice 3 months after App Transfer
Hi everyone, I am seeking urgent advice or attention from the App Review team regarding a Pending Termination Notice I received for Section 3.2(f). The Situation: I recently acquired a portfolio of apps from another developer to start my business on the App Store. Three months after the transfer, my account was flagged for removal because one of these acquired apps repeatedly violated guidelines to evade the review process. The Problem: I am being punished for the previous owner's actions. I have never submitted a new build, metadata update, or review request for this specific app since acquiring it. The Timeline (Proof of Innocence): August 4, 2025: Last update submitted by the Previous Owner. September 6, 2025: I signed the Purchase Agreement to start my business. September 9, 2025: App Transferred to my account. December 11, 2025: Termination Notice received. As the timeline proves, the alleged evasion attempts via submissions occurred before I even owned the app. Regarding Unresolved Issues: I am aware th
2
0
89
1w
Reply to SwiftUI, iOS 26.2, ToolbarItem .largeTitle and .title, overlap issue
Thank you for your post and the excellent animation that illustrates the result of the code. This is a very interesting issue, I personally have not seen this issue but other engineers here may have seen it and they can jump in this thread to provide an insight. In the meantime I would like to get familiar with the issue if any, Upon reviewing the code, I recommend implementing a focus sample that can be downloaded and tested across various iOS 26 release versions. Based on the code snippet you provided, it appears that you are experiencing an issue with custom toolbar items when using a placement in iOS 26 beta. Could you please specify which beta you are referring to? Is it the newest release beta? Providing more details will enable us to consult the release notes to ascertain whether there are any known issues or notes regarding toolbar items in the iOS 26 beta release notes. This could indicate a beta-specific bug. If you are able to create a focused sample, please share a link
Topic: UI Frameworks SubTopic: SwiftUI
1w
SwiftUI, iOS 26.2, ToolbarItem .largeTitle and .title, overlap issue
I built this very simple example to demonstrate the issue im facing on iOS 26 when trying to use custom ToolbarItem element for .largeTitle. Code: struct ContentView: View { var body: some View { NavigationStack { Screen() .navigationTitle(First) .toolbar { ToolbarItem(placement: .largeTitle) { Text(First) .font(.largeTitle) .border(Color.black) } } .navigationDestination(for: Int.self) { integer in DestinationScreen(integer: integer) } } } } struct Screen: View { var body: some View { List { ForEach(1..<50) { index in NavigationLink(value: index) { Text(index.description) .font(.largeTitle) } } } } } struct DestinationScreen: View { let integer: Int var body: some View { HStack { Text(integer.description) .font(.largeTitle) Spacer() } .padding() .navigationTitle(integer.description) .toolbar { ToolbarItem(placement: .largeTitle) { Text(integer.description) .font(.largeTitle) .border(Color.black) } } } } As shown on the gif, when navigating between pages, titles are going to overlap for a short wh
Topic: UI Frameworks SubTopic: SwiftUI
1
0
93
1w
Reply to Deterministic AI Safety Governor for iOS — Seeking Feedback on App Review Approach
Hi there! Sorry for the long delay, at Apple we were on winter break. :) Are there specific App Review guidelines I should reference for AI safety claims? Any recommendations for demonstrating safety compliance during review? For these two questions, there are no one specific App Review guidelines for AI-safety, since the guidelines are meant to be broad enough to cover a wide range of technologies. Be sure to be familiar with Section 1. Safety and Section 2. Legal, since those topics tend to have the most overlap with AI safety. Currently App review does fairly minimal testing of your model feature, so you don't need to provide any specific documentation, but the onus is on you as a developer to do due diligence in safety testing your feature. Here are some resources that can help: Improving the safety of generative model output Acceptable use requirements for the Foundation Models framework Is there interest from Apple in deterministic governance layers for Apple Intelligence integration?
1w
xCode26.x Metal4 classes do not compile
Hi, I am using xCode26.x. But my Metal4 classes are not compiling. I downloaded the sample code from Apple's website - https://developer.apple.com/documentation/Metal/processing-a-texture-in-a-compute-function. For example, I am getting errors like Cannot find protocol declaration for 'MTL4CommandQueue'; I have hit a deadline. Any recommendations are very welcome. I have downloaded the Metal Tool chain. When I run the following commands on the terminal - xcodebuild -showComponent metalToolchain ; xcrun -f metal ; xcrun metal --version I get the following response - Asset Path: /System/Library/AssetsV2/com_apple_MobileAsset_MetalToolchain/86fbaf7b114a899754307896c0bfd52ffbf4fded.asset/AssetData Build Version: 17A321 Status: installed Toolchain Identifier: com.apple.dt.toolchain.Metal.32023 Toolchain Search Path: /Users/private/Library/Developer/DVTDownloads/MetalToolchain/mounts/86fbaf7b114a899754307896c0bfd52ffbf4fded /Users/private/Library/Developer/DVTDownloads/MetalToolchain/mounts/86fbaf7b114a899
2
0
1k
1w
SwiftUI's colorScheme vs preferredColorScheme
SwiftUI's colorScheme modifier is said to be deprecated in favour of preferredColorScheme but the two work differently. See the below sample app, colorScheme changes the underlying view colour while preferredColorScheme doesn't. Is that a bug of preferredColorScheme? import SwiftUI struct ContentView: View { let color = Color(light: .red, dark: .green) var body: some View { VStack { HStack { color.colorScheme(.light) color.colorScheme(.dark) } HStack { color.preferredColorScheme(.light) color.preferredColorScheme(.dark) } } } } #Preview { ContentView() } @main struct TheApp: App { var body: some Scene { WindowGroup { ContentView() } } } extension UIColor { convenience init(light: UIColor, dark: UIColor) { self.init { v in switch v.userInterfaceStyle { case .light: light case .dark: dark case .unspecified: fatalError() @unknown default: fatalError() } } } } extension Color { init(light: Color, dark: Color) { self.init(UIColor(light: UIColor(light), dark: UIColor(dark))) } }
2
0
277
1w
Misleading iOS prompt claims developers "will receive" user data
When a user enables an SMS filtering extension via iOS Settings → Messages → Text Message Filtering and selects an app, the following prompt appears: The developer of [App Name] will receive the text, attachments and sender information in text messages from senders not in your Contacts. Messages may include personal or sensitive information like bank verification codes. This message cannot be modified by developers, and we're receiving complaints and negative reviews from users who are alarmed by it, despite our app not collecting any data. iOS should allow developers to customize this message or reword this message to not make false claims about data collection. We've opened a feedback assistant report here: FB21445903
1
0
117
1w
PDFKit doesn't return the correct page
Hello, We are experiencing on some occasions a wrong behavior with PDFDocument method: func page(at index: Int) -> PDFPage? With certain PDF files, this method returns the wrong PDFPage. This occurs on iOS 18.3, 18.5 and 18.6.2 (an maybe on other versions). Try this PDF for instance (page 81 is returned when index = 2): https://drive.google.com/open?id=1MHm2wjfsbWB8OiRmARUMmvODYxp4DIqP&usp=drive_fs Also, I mention that this doesn't occur systematically with this PDF. When making a copy of this file we don't observe the issue. Could this be linked some kind of internal cache issue ?
1
0
274
1w
Caching bluetooth pairing keys, core bluetooth
Hi! We have created an app that communicates with devices over BLE, and it is currently out in Testflight. It works as expected for almost everyone, but for some users we get a strange behaviour. We start by scanning for devices with scanForPeripherals(withServices:options:), then connect, and finally initiate pairing by subscribing and writing to a pair of characteristics, which both require encryption. The issue is that for these users, the following code: func peripheral( _ peripheral: CBPeripheral, didDiscoverCharacteristicsFor service: CBService, error: Error? ) { guard error == nil else { LogManager.shared.log( ❌ Error discovering characteristics: (error!) ) return } for characteristic in service.characteristics ?? [] { if characteristic.uuid == controlPointUUID { controlPointCharacteristic = characteristic LogManager.shared.debugLog( Control Point characteristic found. ) } else if characteristic.uuid == statusUUID { statusCharacteristic = characteristic LogManager.shared.debugLog(Notify charac
1
0
118
1w