Search results for

“DTiPhoneSimulatorErrorDomain Code 2”

162,370 results found

Post

Replies

Boosts

Views

Activity

After the last update, the Undo button is not appearing in the chat screen.
I enter the following example code into the chat screen, the code is applied, but the Undo button does not appear. The Undo button is also grayed out in the Edit menu. I don't know if this is due to the update or a settings issue, as this is my first time using Xcode. Before the update, there were no problems; the Undo button would appear right next to the chat screen after the code was applied, but now it's gone. Can you help me with this? Edit only: MetalPortfolio/MetalPortfolio/Models/Transaction.swift Goal: Make Transaction decoding backward-compatible so older saved transactions do not fail to load when newer fields are missing. Critical rules: - Do not edit any other file. - Do not change Transaction stored property names. - Do not change encoding format. - Do not change UI. - Do not change storage/export/import logic yet. - Do not change calculations. - Keep existing behavior for valid current JSON. Implementation: In Transaction.init(from:), change only optional/backward-com
1
0
159
1w
Dictation / German – Bugs
Dictation in German has a couple of persistent bugs. Saying Anführungszeichen inserts punctuation AND writes out the word: When dictating the word „Anführungszeichen in German, the app both inserts quotation marks AND writes out the word literally. Expected: either insert the punctuation OR write the word – not both. Manual quotation mark followed by automatic blank key during dictation. Compound words incorrectly split into separate words: Compound words are either cohesive or hyphenated, the english spelling with two separate words is simply wrong!) Spaces incorrectly added around hyphens in compound words: German dictation adds spaces before and after hyphens. In German orthography, spaces around hyphens are only correct for em dashes (Gedankenstrich), never for regular hyphens in compound words.
1
0
905
1w
Reply to Which storage capacity key should be used for offline video downloads: volumeAvailableCapacityKey or volumeAvailableCapacityForImportantUsageKey?
I'll start with the short answer, then follow with more details: Should offline media downloads generally be treated as “important usage” in the sense intended by this API? Yes, you should be using important. You might also look at the availability key, but mainly as a diagnostic tool to tweak your app’s behavior, not to fundamentally alter what you do. For example, if you're downloading very large files very quickly, it's possible for you to be adding new important data to the device faster than the device can delete cache data, which will cause available to spike to a low value. If that happens, simply waiting for a little while may resolve the issue. Similarly, if available and opportunistic are both low and your app stores large amounts of cached data, then you might want to delete your own cached data during/before you transfer in important data. but I still don’t fully understand the intended usage difference between: So, let me lay out the meaning of the three keys: volumeAvailableCapacityKey-> This
Topic: App & System Services SubTopic: Core OS Tags:
1w
iOS Safari: Taking multiple photos via camera in overrides previous capture instead of accumulating
Summary On iOS Safari (and WKWebView-based browsers), when a web page uses (or capture=user), the user can only ever hold one captured photo at a time. Each time the file picker is opened and the user takes a new photo using the camera, the newly captured image completely replaces the previously captured image in the input's files FileList. There is no way to accumulate multiple camera-captured photos across successive picker sessions. Steps to Reproduce Set up a web page with an element (with or without the capture attribute). Open the page in iOS Safari on an iPhone. Tap the file input — choose Take Photo from the action sheet. Capture a photo and tap Use Photo. Verify input.files.length === 1 (first photo is captured). Tap the same file input again — choose Take Photo again. Capture a second photo and tap Use Photo. Check input.files.length. Expected Result input.files.length should be 2 (or more), containing both the first and second captured photos. The browser should accumulate photos across
Topic: Safari & Web SubTopic: General
1
0
375
1w
Reply to Inexplicable Metal crash ever since iOS 26.5 beta 4
Thanks for posting and for sharing the repo — being able to look at the actual code makes a real difference here. The phone-restart class of crash matters. App-level Metal exceptions normally crash the app, not the device. A full phone reboot from a compute shader means whatever's failing crossed out of user-space into the GPU driver or kernel. That can happen two ways: A driver-side bug provoked by some specific user-space pattern, which would be a Metal/driver issue Apple needs to address. Memory corruption in your app — for example, an over-write of an MTLBuffer's contents past its allocated size, a stale gpuResourceID for a resource that's been freed, a race between threads populating argument-table entries, or wrong format/stride assumptions — that lands the GPU on garbage data and the driver panics. Allocator layouts and hardening change between iOS versions, so a dormant memory issue under beta 3 can become a reliable kernel panic under beta 4. The worked, then stopped working timing
Topic: Graphics & Games SubTopic: Metal Tags:
1w
Reply to codesign tool generates "timestamps differ by XXX seconds" error
Thank you Quinn for these additional details. In the meantime, we have been able to make some progress here. To recap, the error message we have been investigating is the following one when codesign command is executed on a host, let's say H2, to do adhoc signing of some binary: $> /usr/bin/codesign -s - -vvvv --force /home/me/FooBarCalculator.app /home/me/FooBarCalculator.app: replacing existing signature /home/me/FooBarCalculator.app: signed app bundle with Mach-O thin (arm64) [Hello] /home/me/FooBarCalculator.app: timestamps differ by 185 seconds - check your system clock codesign then exits with a non-zero exit code and thus errors out. Our investigation so far shows that the message about timestamps differing turns out to be misleading. What we have been able to narrow down is that, if on some host H1, a binary (FooBarCalculator.app in this case) was signed with a (valid) identity and if for whatever reason, during codesigning there was a timestamp difference, then that difference gets embedd
Topic: Code Signing SubTopic: General Tags:
1w
Reply to WKWebView iOS 26 preventing javascript injections
Thanks for the careful diagnostic work. Two observations from your post jump out: Same source code, two builds: the Xcode 16.4 / iOS 18 SDK build runs correctly in iOS 26, the Xcode 26 / iOS 26 SDK build does not. The page itself runs correctly in Safari with Web Inspector attached. Together, those localize the problem to how the WKWebView is being set up or driven inside your app at the iOS 26 SDK build, rather than the page or the device. The some JavaScript executes while others don't pattern is the most useful clue for narrowing further. That pattern is consistent with WKContentWorld isolation in WKWebView. WKContentWorld separates JavaScript execution into distinct namespaces: The page world (WKContentWorld.pageWorld) — JavaScript executed here can see page-defined globals, including functions defined in the page's
Topic: Safari & Web SubTopic: General
1w
Reply to EndpointSecurity AUTH_SIGNAL Handler Causes Dock UI Desync and Activity Monitor Force Quit Failure
Part 2... Getting into the sequence here: The Dock icon disappears — loginwindow removes the app's UI via its applicationQuit event, even though the process is still running The system was told to quit the app, so the first step was to remove its visible parts, like its dock icon. LaunchServices loses track of the application's PID — it can no longer determine the PID from the LSASN The system removed it from system #2, so it disappears from LaunchServices. Now, there's some interesting nuance here: When I respond with ES_AUTH_RESULT_DENY to an AUTH_SIGNAL event targeting a GUI application, the system enters an inconsistent state: I don't think that's actually true, at least not on its own. That is, if you send kill -9 from the terminal, I don't think any of the above would happen. What I'd expect to happen is that your app just sits there doing nothing and continues working normally. That's because there are two different ways for an app to disappear. The first is that the system n
Topic: App & System Services SubTopic: Core OS Tags:
1w
EndpointSecurity AUTH_SIGNAL Handler Causes Dock UI Desync and Activity Monitor Force Quit Failure
ES_EVENT_TYPE_AUTH_SIGNAL DENY causes Dock icon to disappear and LaunchServices to lose track of the process Platform: macOS 11.0 (Big Sur) – macOS 15 (Sequoia) Xcode: 16.4 (16F6) Language: Swift, EndpointSecurity framework Testing OS: macOS 15.5 (primary), reproduced on macOS 11.0+ [1]Description I'm developing a System Extension using the EndpointSecurity framework for a security product. My extension subscribes to ES_EVENT_TYPE_AUTH_SIGNAL to block unauthorized signals sent to protected GUI applications (self-protection feature). When I respond with ES_AUTH_RESULT_DENY to an AUTH_SIGNAL event targeting a GUI application, the system enters an inconsistent state: The Dock icon disappears — loginwindow removes the app's UI via its applicationQuit event, even though the process is still running LaunchServices loses track of the application's PID — it can no longer determine the PID from the LSASN Activity Monitor's subsequent Force Quit attempts fail silently — no kill() syscall is issued because LaunchService
3
0
137
1w
Reply to EndpointSecurity AUTH_SIGNAL Handler Causes Dock UI Desync and Activity Monitor Force Quit Failure
Part 1... Hypothesis: loginwindow observes the AUTH_SIGNAL event (or a related notification) and proactively removes the Dock UI entry when a termination signal targets a GUI app — regardless of whether the signal was ultimately denied. This seems like a coordination gap between EndpointSecurity's signal interception and loginwindow/LaunchServices' app lifecycle management. No, that’s what's going on. What's actually going on is that the system has two different systems that track stuff that's running on the system: The low level system is the POSIX pid-based mechanism you're familiar with. This is also the level the ES system operates at and is the core mechanism used to track processes. Every process running on the system exists within this system. The high level system is built on top of #1 and is what manages the concept of Apps. It doesn't have as clear an API layer (much of its API is private), but its origins were the Carbon Process Manager and it's what APIs like LaunchServices and NSWorkspac
Topic: App & System Services SubTopic: Core OS Tags:
1w
Reply to SwiftData with CloudKit Error: Error updating background task request
A similar question was discussed here. The error code is different (3 vs. 8), but the technical nature is pretty much the same: The error was triggered by the framework, and is not something that can be fixed from the app side. SwiftData + CloudKit creates a new task when it detects that the previous task failed, or that there is unsynchronized data, which can eventually get the data synchronized. So in case your app data is synchronized, you can ignore the error. If your app doesn’t synchronize data at all, that will be a coding level issue on your side, and you can follow TN3164 and TN3163 to debug the issue. Best, —— Ziqiao Chen  Worldwide Developer Relations.
Topic: App & System Services SubTopic: iCloud Tags:
1w
SwiftData with CloudKit Error: Error updating background task request
Hi, Overview I have a SwiftData project which automatically syncs with CloudKit. When I run the app, I see the following error in Xcode logs. Error updating background task request: Error Domain=BGSystemTaskSchedulerErrorDomain Code=3 (null) My attempt I can enable Background processing (under Signing & Capabilities > Background modes), but I don't know the BGTaskSchedulerPermittedIdentifiers to add in the Info.plist Questions How can I resolve this? If I should enable background processing, what are the BGTaskSchedulerPermittedIdentifiers to add in Info.plist?
18
0
952
1w
Reply to Explicit dynamic loading of a framework in macOS - recommended approach?
[quote='888157022, GangOrca, /thread/820251?answerId=888157022#888157022, /profile/GangOrca'] the path to the internal MachO binary is required [/quote] Right. I recommend that you pass an absolute path to dlopen, so you’ll need platform-specific code to generate that path. How you generate that path depends on how you package your code. In both cases you need to get your app’s framework directory. To do that: Get the app’s bundle bundle using Bundle.main. Then get the privateFrameworksURL property from that. From there, you have two choices: If you package the code as a dynamic library (.dylib) you can just append the library file name and away you go. If you package the code as a framework, you have to create a bundle from that framework, using the init(url:) initialiser, and then get the main executable URL from that using the executableURL property. For iOS you have to use the second option; we only support standalone dynamic libraries on macOS. If you can’t us
Topic: App & System Services SubTopic: Core OS Tags:
1w
After the last update, the Undo button is not appearing in the chat screen.
I enter the following example code into the chat screen, the code is applied, but the Undo button does not appear. The Undo button is also grayed out in the Edit menu. I don't know if this is due to the update or a settings issue, as this is my first time using Xcode. Before the update, there were no problems; the Undo button would appear right next to the chat screen after the code was applied, but now it's gone. Can you help me with this? Edit only: MetalPortfolio/MetalPortfolio/Models/Transaction.swift Goal: Make Transaction decoding backward-compatible so older saved transactions do not fail to load when newer fields are missing. Critical rules: - Do not edit any other file. - Do not change Transaction stored property names. - Do not change encoding format. - Do not change UI. - Do not change storage/export/import logic yet. - Do not change calculations. - Keep existing behavior for valid current JSON. Implementation: In Transaction.init(from:), change only optional/backward-com
Replies
1
Boosts
0
Views
159
Activity
1w
Reply to After the last update, the Undo button is not appearing in the chat screen.
While the code is being executed, a stop button appears, but after the code is finished, there is no undo button; it returns to the message screen shown in the previous message.
Replies
Boosts
Views
Activity
1w
Dictation / German – Bugs
Dictation in German has a couple of persistent bugs. Saying Anführungszeichen inserts punctuation AND writes out the word: When dictating the word „Anführungszeichen in German, the app both inserts quotation marks AND writes out the word literally. Expected: either insert the punctuation OR write the word – not both. Manual quotation mark followed by automatic blank key during dictation. Compound words incorrectly split into separate words: Compound words are either cohesive or hyphenated, the english spelling with two separate words is simply wrong!) Spaces incorrectly added around hyphens in compound words: German dictation adds spaces before and after hyphens. In German orthography, spaces around hyphens are only correct for em dashes (Gedankenstrich), never for regular hyphens in compound words.
Replies
1
Boosts
0
Views
905
Activity
1w
Reply to Which storage capacity key should be used for offline video downloads: volumeAvailableCapacityKey or volumeAvailableCapacityForImportantUsageKey?
I'll start with the short answer, then follow with more details: Should offline media downloads generally be treated as “important usage” in the sense intended by this API? Yes, you should be using important. You might also look at the availability key, but mainly as a diagnostic tool to tweak your app’s behavior, not to fundamentally alter what you do. For example, if you're downloading very large files very quickly, it's possible for you to be adding new important data to the device faster than the device can delete cache data, which will cause available to spike to a low value. If that happens, simply waiting for a little while may resolve the issue. Similarly, if available and opportunistic are both low and your app stores large amounts of cached data, then you might want to delete your own cached data during/before you transfer in important data. but I still don’t fully understand the intended usage difference between: So, let me lay out the meaning of the three keys: volumeAvailableCapacityKey-> This
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
1w
iOS Safari: Taking multiple photos via camera in overrides previous capture instead of accumulating
Summary On iOS Safari (and WKWebView-based browsers), when a web page uses (or capture=user), the user can only ever hold one captured photo at a time. Each time the file picker is opened and the user takes a new photo using the camera, the newly captured image completely replaces the previously captured image in the input's files FileList. There is no way to accumulate multiple camera-captured photos across successive picker sessions. Steps to Reproduce Set up a web page with an element (with or without the capture attribute). Open the page in iOS Safari on an iPhone. Tap the file input — choose Take Photo from the action sheet. Capture a photo and tap Use Photo. Verify input.files.length === 1 (first photo is captured). Tap the same file input again — choose Take Photo again. Capture a second photo and tap Use Photo. Check input.files.length. Expected Result input.files.length should be 2 (or more), containing both the first and second captured photos. The browser should accumulate photos across
Topic: Safari & Web SubTopic: General
Replies
1
Boosts
0
Views
375
Activity
1w
Reply to Inexplicable Metal crash ever since iOS 26.5 beta 4
Thanks for posting and for sharing the repo — being able to look at the actual code makes a real difference here. The phone-restart class of crash matters. App-level Metal exceptions normally crash the app, not the device. A full phone reboot from a compute shader means whatever's failing crossed out of user-space into the GPU driver or kernel. That can happen two ways: A driver-side bug provoked by some specific user-space pattern, which would be a Metal/driver issue Apple needs to address. Memory corruption in your app — for example, an over-write of an MTLBuffer's contents past its allocated size, a stale gpuResourceID for a resource that's been freed, a race between threads populating argument-table entries, or wrong format/stride assumptions — that lands the GPU on garbage data and the driver panics. Allocator layouts and hardening change between iOS versions, so a dormant memory issue under beta 3 can become a reliable kernel panic under beta 4. The worked, then stopped working timing
Topic: Graphics & Games SubTopic: Metal Tags:
Replies
Boosts
Views
Activity
1w
Reply to codesign tool generates "timestamps differ by XXX seconds" error
Thank you Quinn for these additional details. In the meantime, we have been able to make some progress here. To recap, the error message we have been investigating is the following one when codesign command is executed on a host, let's say H2, to do adhoc signing of some binary: $> /usr/bin/codesign -s - -vvvv --force /home/me/FooBarCalculator.app /home/me/FooBarCalculator.app: replacing existing signature /home/me/FooBarCalculator.app: signed app bundle with Mach-O thin (arm64) [Hello] /home/me/FooBarCalculator.app: timestamps differ by 185 seconds - check your system clock codesign then exits with a non-zero exit code and thus errors out. Our investigation so far shows that the message about timestamps differing turns out to be misleading. What we have been able to narrow down is that, if on some host H1, a binary (FooBarCalculator.app in this case) was signed with a (valid) identity and if for whatever reason, during codesigning there was a timestamp difference, then that difference gets embedd
Topic: Code Signing SubTopic: General Tags:
Replies
Boosts
Views
Activity
1w
Reply to WKWebView iOS 26 preventing javascript injections
Thanks for the careful diagnostic work. Two observations from your post jump out: Same source code, two builds: the Xcode 16.4 / iOS 18 SDK build runs correctly in iOS 26, the Xcode 26 / iOS 26 SDK build does not. The page itself runs correctly in Safari with Web Inspector attached. Together, those localize the problem to how the WKWebView is being set up or driven inside your app at the iOS 26 SDK build, rather than the page or the device. The some JavaScript executes while others don't pattern is the most useful clue for narrowing further. That pattern is consistent with WKContentWorld isolation in WKWebView. WKContentWorld separates JavaScript execution into distinct namespaces: The page world (WKContentWorld.pageWorld) — JavaScript executed here can see page-defined globals, including functions defined in the page's
Topic: Safari & Web SubTopic: General
Replies
Boosts
Views
Activity
1w
Battery Service Peripheral - Not Allowed?
Hi! I'm trying to create an iOS peripheral service with UUID=180F which stands for standard GATT BAS. I'm getting the error: CBErrorDomain Code=8 The specified UUID is not allowed for this operation. Is this prohibited by the system?
Replies
1
Boosts
0
Views
171
Activity
1w
Reply to EndpointSecurity AUTH_SIGNAL Handler Causes Dock UI Desync and Activity Monitor Force Quit Failure
Part 2... Getting into the sequence here: The Dock icon disappears — loginwindow removes the app's UI via its applicationQuit event, even though the process is still running The system was told to quit the app, so the first step was to remove its visible parts, like its dock icon. LaunchServices loses track of the application's PID — it can no longer determine the PID from the LSASN The system removed it from system #2, so it disappears from LaunchServices. Now, there's some interesting nuance here: When I respond with ES_AUTH_RESULT_DENY to an AUTH_SIGNAL event targeting a GUI application, the system enters an inconsistent state: I don't think that's actually true, at least not on its own. That is, if you send kill -9 from the terminal, I don't think any of the above would happen. What I'd expect to happen is that your app just sits there doing nothing and continues working normally. That's because there are two different ways for an app to disappear. The first is that the system n
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
1w
EndpointSecurity AUTH_SIGNAL Handler Causes Dock UI Desync and Activity Monitor Force Quit Failure
ES_EVENT_TYPE_AUTH_SIGNAL DENY causes Dock icon to disappear and LaunchServices to lose track of the process Platform: macOS 11.0 (Big Sur) – macOS 15 (Sequoia) Xcode: 16.4 (16F6) Language: Swift, EndpointSecurity framework Testing OS: macOS 15.5 (primary), reproduced on macOS 11.0+ [1]Description I'm developing a System Extension using the EndpointSecurity framework for a security product. My extension subscribes to ES_EVENT_TYPE_AUTH_SIGNAL to block unauthorized signals sent to protected GUI applications (self-protection feature). When I respond with ES_AUTH_RESULT_DENY to an AUTH_SIGNAL event targeting a GUI application, the system enters an inconsistent state: The Dock icon disappears — loginwindow removes the app's UI via its applicationQuit event, even though the process is still running LaunchServices loses track of the application's PID — it can no longer determine the PID from the LSASN Activity Monitor's subsequent Force Quit attempts fail silently — no kill() syscall is issued because LaunchService
Replies
3
Boosts
0
Views
137
Activity
1w
Reply to EndpointSecurity AUTH_SIGNAL Handler Causes Dock UI Desync and Activity Monitor Force Quit Failure
Part 1... Hypothesis: loginwindow observes the AUTH_SIGNAL event (or a related notification) and proactively removes the Dock UI entry when a termination signal targets a GUI app — regardless of whether the signal was ultimately denied. This seems like a coordination gap between EndpointSecurity's signal interception and loginwindow/LaunchServices' app lifecycle management. No, that’s what's going on. What's actually going on is that the system has two different systems that track stuff that's running on the system: The low level system is the POSIX pid-based mechanism you're familiar with. This is also the level the ES system operates at and is the core mechanism used to track processes. Every process running on the system exists within this system. The high level system is built on top of #1 and is what manages the concept of Apps. It doesn't have as clear an API layer (much of its API is private), but its origins were the Carbon Process Manager and it's what APIs like LaunchServices and NSWorkspac
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
1w
Reply to SwiftData with CloudKit Error: Error updating background task request
A similar question was discussed here. The error code is different (3 vs. 8), but the technical nature is pretty much the same: The error was triggered by the framework, and is not something that can be fixed from the app side. SwiftData + CloudKit creates a new task when it detects that the previous task failed, or that there is unsynchronized data, which can eventually get the data synchronized. So in case your app data is synchronized, you can ignore the error. If your app doesn’t synchronize data at all, that will be a coding level issue on your side, and you can follow TN3164 and TN3163 to debug the issue. Best, —— Ziqiao Chen  Worldwide Developer Relations.
Topic: App & System Services SubTopic: iCloud Tags:
Replies
Boosts
Views
Activity
1w
SwiftData with CloudKit Error: Error updating background task request
Hi, Overview I have a SwiftData project which automatically syncs with CloudKit. When I run the app, I see the following error in Xcode logs. Error updating background task request: Error Domain=BGSystemTaskSchedulerErrorDomain Code=3 (null) My attempt I can enable Background processing (under Signing & Capabilities > Background modes), but I don't know the BGTaskSchedulerPermittedIdentifiers to add in the Info.plist Questions How can I resolve this? If I should enable background processing, what are the BGTaskSchedulerPermittedIdentifiers to add in Info.plist?
Replies
18
Boosts
0
Views
952
Activity
1w
Reply to Explicit dynamic loading of a framework in macOS - recommended approach?
[quote='888157022, GangOrca, /thread/820251?answerId=888157022#888157022, /profile/GangOrca'] the path to the internal MachO binary is required [/quote] Right. I recommend that you pass an absolute path to dlopen, so you’ll need platform-specific code to generate that path. How you generate that path depends on how you package your code. In both cases you need to get your app’s framework directory. To do that: Get the app’s bundle bundle using Bundle.main. Then get the privateFrameworksURL property from that. From there, you have two choices: If you package the code as a dynamic library (.dylib) you can just append the library file name and away you go. If you package the code as a framework, you have to create a bundle from that framework, using the init(url:) initialiser, and then get the main executable URL from that using the executableURL property. For iOS you have to use the second option; we only support standalone dynamic libraries on macOS. If you can’t us
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
1w