Search results for

DTiPhoneSimulatorErrorDomain Code 2

158,639 results found

Post

Replies

Boosts

Views

Activity

Zsh kills Python process with plenty of available VM
On a MacBook Pro, 16GB of RAM, 500 GB SSD, OS Sequoia 15.7.1, M3 chip, I am running some python3 code in a conda environment that requires lots of RAM and sure enough, once physical memory is almost exhausted, swapfiles of about 1GB each start being created, which I can see in /System/Volumes/VM. This folder has about 470 GB of available space at the start of the process (I can see this through get info) however, once about 40 or so swapfiles are created, for a total of about 40GB of virtual memory occupied (and thus still plenty of available space in VM), zsh kills the python process responsible for the RAM usage (notably, it does not kill another python process using only about 100 MB of RAM). The message received is zsh: killed in the tmux pane where the logging of the process is printed. All the documentation I was able to consult says that macOS is designed to use up to all available storage on the startup disk (which is the one I am using since I have only one disk and the available space afore
16
0
417
1w
Reply to Zsh kills Python process with plenty of available VM
I see, thank you for pointing this out. So it is not a percentage, but an actual number of pages. Could you expand a little on how to interpret in your previous answer? So, stepping back for a moment, the basic issue here is deciding when should the kernel stop just blindly backing memory. It COULD (and, historically, did) just limit that to total available storage; however, in practice, that just means the machine grinds itself into a useless state without actually failing. So, what macOS does is artificially limit the VM system to ensure that the machine remains always in a functional state. The next question then becomes how to implement that limit. There are lots of places you COULD limit the VM system, but the problem is that the VM system is complicated enough that many obvious metrics don't really work. For example, purgable memory[1] means that simply dirty pages doesn't necessarily work“ - a process could have a very large number of dirty pages, but if they're all purgable, they shouldn't really coun
1w
Reply to init(), .onAppear and .onChange(of: scenePhase) Not Working when Opening App After Being Quitted
The following code segments run when building and running the app, or after going home and re-opening the app, but now when quitting the app and re-opening it again. What code can do that? Please be more precise in explaining the use case and what they mean exactly after going home and re-opening: what do you do exactly when you quit: what do you do precisely ? What do you get ? What did you expect ? explain what you get printed for each of the cases. Note: you should have more discriminant print: init() { print(init test) } .onAppear { print(onAppear test) } .onChange(of: scenePhase) { _, newValue in print(onChange (newValue)) }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
1w
Reply to Live Activity triggered by AlarmKit remains as an empty state
Thank you for the post and providing detailed information. I am curious about how you are handling Live Activity events in code as you didn’t provide any focused sample. I recommend reviewing our samples to see how it works well to dismiss Live Activities. Handling Live Activities with AlarmKit and ensuring they behave correctly with the Dynamic Island can be tricky, especially concerning state management and user interactions. Make sure that when your app dismisses the Live Activity, it explicitly ends the activity using the APIs. Before dismissing, ensure the Live Activity’s state is updated to reflect that it is no longer active or relevant. Ensure that your logic for starting a Live Activity does not inadvertently create multiple instances. Use unique identifiers and conditions to check if an activity for a particular alarm is already running before starting a new one. As an interim measure, clearly communicate to users the intended method to dismiss Live Activities (using the X button) through U
1w
Why does NSEvent.addGlobalMonitorForEvents still work in a Sandboxed macOS app
I am building a macOS utility using SwiftUI and Swift that records and displays keyboard shortcuts (like Cmd+C, Cmd+V) in the UI. To achieve this, I am using NSEvent.addGlobalMonitorForEvents(matching: [.keyDown]). I am aware that global monitoring usually requires the app to be non-sandboxed. However, I am seeing some behavior I don't quite understand during development: I started with a fresh SwiftUI project and disabled the App Sandbox. I requested Accessibility permissions using AXIsProcessTrustedWithOptions, manually enabled it in System Settings, and the global monitor worked perfectly. I then re-enabled the App Sandbox in Signing & Capabilities. To my surprise, the app still records global events from other applications, even though the Sandbox is now active. Is this expected behavior? Does macOS remember the trust because the Bundle ID was previously authorized while non-sandboxed, or is there a specific reason a Sandboxed app can still use addGlobalMonitor if the user has manually granted Accessi
1
0
431
1w
Reply to pthread_cond_timedwait problem
[quote='811013021, pjfloyd, /thread/811013, /profile/pjfloyd'] On macOS I see an extra mutex. [/quote] That doesn’t surprise me, but that’s probably the result of my not understanding your setup properly. When I run your cond_timedwait_test.c code natively and set a breakpoint on pthread_mutex_lock, I hit that breakpoint a lot inside the dynamic linker and various loaded-by-default libraries. But I suspect that you’re doing stuff to avoid that, like statically linking the executable [1]. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com [1] Not something we support in general but tools like this often have to stray from the supported path.
1w
pthread_cond_timedwait problem
I'm trying to debug an issue with the Valgrind tool Helgrind. This is on masOS 11 (I've also seen it on 12, probably the same for other macOS versions). Here is the testcase. #include #include #include #include int main(void) { pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; pthread_cond_t cond = PTHREAD_COND_INITIALIZER; int res; // This time has most definitely passed already. (Epoch) struct timespec now; memset(&now, 0, sizeof(now)); res = pthread_mutex_lock(&mutex); assert(res == 0); res = pthread_cond_timedwait(&cond, &mutex, &now); assert(res == ETIMEDOUT); res = pthread_mutex_unlock(&mutex); assert(res == 0); res = pthread_mutex_destroy(&mutex); assert(res == 0); res = pthread_cond_destroy(&cond); assert(res == 0); } The error that I'm getting from Helgrind is ==56754== Thread #1 unlocked a not-locked lock at 0x1048C7A08 ==56754== at 0x10020E2F9: mutex_unlock_WRK (hg_intercepts.c:1255) ==56754== by 0x10020E278: pthread_mutex_unlock (hg_intercepts.c:1278) ==56754==
1
0
74
1w
Reply to Why is there no pop-up prompt when using the NEHotspot Configuration Manager app's Configuration interface to connect to WiFi failed
The general model for apply(_:completionHandler:), as explained in the docs, involves three steps: Apply the Wi-Fi configuration. Join the network. Bring up the TCP/IP stack on that interface. Problems with step 1 are delivered to your app via the method’s completion handler. Problems with step 2 are communicated to the user via an alert. Problems with step 3 can result in a variety of different behaviours. If you’re seeing a case where the devices fails to join the network and that’s not reported to the app or the user, that’s something we should investigate via a bug report. See this post for my advice on filing Wi-Fi bugs. If you do file any bugs about this, please post your bug number, just for the record. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
1w
In-App Purchase Issue in App Store Connect
Hi everyone, I'm having a frustrating issue with in-app purchases on 2 of my apps, and despite following all the steps correctly, they're getting rejected during App Store review because the products screen doesn't load for reviewers. I could really use some help figuring out what I'm missing. What I've Done (Following Apple's Documentation) Created products in App Store Connect: Added each in-app purchase individually with correct Product IDs These IDs match exactly the ones in my .storekit file Filled out all required information: translations, pricing, descriptions Everything was filled correctly Submitted products for review: Each product went through the separate review process All products were approved individually Linked the approved products to my app build App submission: Uploaded new build with in-app purchases implemented Products are properly configured in the app code Used StoreKit for testing (products load correctly in sandbox) The Problem Even after all products are approved
2
0
124
1w
Keyframe animation crashes with +[_SwiftUILayerDelegate _screen]: unrecognized selector sent to class on iOS 26
We have an UIViewController called InfoPlayerViewController. Its main subview is from a child view controller backed by SwiftUI via UIHostingController. The InfoPlayerViewController conforms to UIViewControllerTransitioningDelegate. The animation controller for dismissing is DismissPlayerAnimationController. It runs UIKit keyframe animations via UIViewPropertyAnimator. When the keyframe animation is executed there’s an occasional crash for end users in production. It only happens on iOS 26. FB Radar: FB20871547 An example crash is below. Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Reason: +[_SwiftUILayerDelegate _screen]: unrecognized selector sent to class 0x20c95da08 Termination Reason: SIGNAL 6 Abort trap: 6 Triggered by Thread: 0 Last Exception Backtrace: 0 CoreFoundation 0x1a23828c8 __exceptionPreprocess + 164 (NSException.m:249) 1 libobjc.A.dylib 0x19f2f97c4 objc_exception_throw + 88 (objc-exception.mm:356) 2 CoreFoundation 0x1a
4
0
478
1w
Submission Rejected: Guideline 5.1.1 - Legal - Privacy - Data Collection and Storage
Hi, I am in need of your help with publishing my game. I got the following explanation for the negative review of my app/game. Issue Description One or more purpose strings in the app do not sufficiently explain the use of protected resources. Purpose strings must clearly and completely describe the app's use of data and, in most cases, provide an example of how the data will be used. Next Steps Update the local network information purpose string to explain how the app will use the requested information and provide a specific example of how the data will be used. See the attached screenshot. Resources Purpose strings must clearly describe how an app uses the ability, data, or resource. The following are hypothetical examples of unclear purpose strings that would not pass review: App would like to access your Contacts App needs microphone access See examples of helpful, informative purpose strings. The problem is that they say my app asks to allow my app to find devices on local networks. And that this needs m
1
0
317
1w
Questions about macOS App Store update package generation and optimization
Hello, According to documentation, the App Store does not re-download the entire app when updating, but instead generates an update package containing only the changed content compared to the previous version. I’d like to clarify the following points: 1. Granularity of file changes If only part of a large file changes, does the update package include the entire file, or does it patch only the modified portions within that file? 2. Guideline on separating files The documentation recommends separating files that are likely to change from those that are not. How should this be interpreted in practice? 3. Verifying the diff result Is there a way for developers to check the actual diff result of the update package generated by the App Store without submitting the app? Is there a diff command tool or comparison method closer to the actual App Store update process? 4. Estimating update size during development For apps with large-scale resources, minimizing update size is critical. Are there any tools or bes
1
0
107
1w