macOS is the operating system for Mac.

Posts under macOS tag

200 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

copyFromBuffer offset and size working even when not multiple of 4
Hi, Reading the copyFromBuffer documentation states that on macOS, sourceOffset, destinationOffset, and size "needs to be a multiple of 4, but can be any value in iOS and tvOS". However, I have noticed that, at least on my M2 Max, this limitation does not seem to exist as there are no warnings and the copy works correctly regardless of the offset value. I'm curious to know if this is something that should still be avoided. Is the multiple of 4 limitation reserved for non Apple Silicon devices and that note can be ignored for Apple Silicon? I ask because I am a contributor to Metal.jl, and recently noticed that our tests pass even when copying using copyWithBuffer with offsets and sizes that are not multiples of 4. If that coul cause issues/correctness problems, we would need to fix that. Thank you. Christian
0
0
40
20h
Oddity With OS X Content Filter Not Calling handleNewFlow
I'm working with content filters on OS X and encountered an issue where the handleNewFlow function is not called unless I explicitly invoke completionHandler(nil) in the startFilter method. This is perplexing because I expected handleNewFlow to be called automatically when new traffic flows are detected. Here's an example of my startFilter function without the completionHandler: override func startFilter(completionHandler: @escaping (Error?) -> Void) { os_log("Start filter called") // Create a network rule that matches all traffic let allTrafficNetworkRule = NENetworkRule(remoteNetwork: nil, remotePrefix: 0, localNetwork: nil, localPrefix: 0, protocol: .any, direction: .outbound) // Create a filter rule that allows all traffic let allowAllFilterRule = NEFilterRule(networkRule: allTrafficNetworkRule, action: .allow) // Set filter settings with the default action to allow all traffic let filterSettings = NEFilterSettings(rules: [allowAllFilterRule], defaultAction: .allow) // If I include this it will work fine, but TCP sessions will be reset: //completionHandler(nil) } Question: Why, when I include completionHandler(nil) in the startFilter method, do all TCP sessions on my computer get reset? Is there a way to around this? My ideal state would be to get handleNewFlow to execute, but not without resetting sessions on my machine.
0
0
44
1d
Delete button in default NSSavePanel for new document
I just noticed that when closing a new document with edits in MacOS Sonoma that it skips the Save/Don't Save/Cancel panel and goes directly to default NSSavePanel with Delete/Cancel/Save buttons. The problem is that when I click "Delete" nothing happens. It should have simple solution, but I could not find anything. How does one respond to the "Delete" button? My undocumented (as far as I can tell) hack was to implement document:didSave:contextinfo selector for runModalSavePanelForSaveOperation. It appears that in this method for a new document: Delete button has didSave=YES (even though it did not save) and the document fileURL nil Cancel button has didSave=NO and document fileURL nil Save button has didSave=YES and document filieURL to saved file I can handle Delete button this way, but since it is not a documented method, it make me uncomfortable. For example what happens is user clicks "Save", but the save has an error? As an aside, since Apple is now working with ChatGPT, I thought it might provide some help. I asked it how I can respond to "Delete" button in MacOS Sonoma and it said to implement deleteDocument: in your NSDocument subclass. I pointed out to ChatGPT that deleteDocument: does not exist. It said "you are correct" and you should instead check the returned result from runModalSavePanelForSaveOperation and look for "stop" action. I pointed out to ChatGPT that runModalSavePanelForSaveOperation is void and does not return a result, it said again, "you are correct." It gave a third option which basically said to override runModalSavePanelForSaveOperation and build your own save panel from scratch. I didn't know if I should trust this answer. I reverted to my hack and wrote this post. Also ChatGPT never apologized for wasting my time with the wrong answers.
3
0
62
1d
How to Install a Binary in SIP-Protected Locations in macOS without Recovery Mode
I'm looking for a solution to install a binary on a macOS system where System Integrity Protection (SIP) is enabled, and the target installation location is protected by SIP. I need to achieve this without booting into recovery mode to disable SIP. Is there any method to achieve this, such as by creating separate packages that can handle SIP-protected locations, developing or using installer applications capable of navigating SIP constraints, leveraging specific entitlements or permissions to facilitate the installation, or utilising Mobile Device Management (MDM) solutions for deployment? If anyone has experience or insights on any reliable ways to accomplish this, please share any detailed steps, tools, or best practices that could be useful.
3
0
82
1d
Xcode16 Beta Compilation Error: Reserved Keyword 'module' Issue
While compiling with the Xcode Beta1 version, the 'module' keyword used in the previous method as a parameter is now recognized as a reserved keyword, causing compilation errors and preventing our project from continuing to run. Please fix this issue as soon as possible. Additionally, I would like to vent: It's quite uncomfortable that the MacOS Beta version cannot be downgraded directly. I am now facing the dilemma of being unable to open Xcode 15 and having Xcode 16 fail to compile.
1
0
55
1d
Can I ignore safe area when resizing a window in macOS 15?
I am attempting to make a macOS app to show a large popup with no titlebar and a transparent background that spans the entire active display. Currently, I am attempting the last part, with the sizing. I used an example on the relevant developer documentation page. This is the code I am using in my App struct: @main struct MakeGoodChoicesApp: App { ... var body: some Scene { ... Window("Make Good Choices", id:"popup") { PopupWindowContentView() .ignoresSafeArea(.all) } .windowIdealPlacement {_, context in return WindowPlacement( x: context.defaultDisplay.bounds.minX, y: context.defaultDisplay.bounds.minY, width: context.defaultDisplay.bounds.width, height: context.defaultDisplay.bounds.height ) } } } When running my application and using some code to open the popup window, I get the following result: I would expect the window to expand past the safe area, but it seems as if macOS clamped the window's size down to inside the safe areas. I would appreciate any help, many thanks!
0
1
55
2d
Issue running app when SIP disabled.
I've been developing an MacOS app for a while and everything was going smoothly until one of the testers reported that the app was crashing on launch. After investigation, we discovered that he had System Integrity Protection disabled. I could reproduce the error by disabling SIP: Library not loaded: @rpath/myframework.framework/myframework Referenced from: <4C129258-1BF8-3D30-9AFE-BF4206D0A767> /Applications/MyApp.app/Contents/MacOS/MyApp Reason: , (security policy does not allow @ path expansion) (terminated at launch; ignore backtrace) The app launches normally if I reenable SIP. I can't find information about "security policy does not allow @ path expansion". I'll appreciate if someone can point me in the right direction.
2
0
94
1d
AX Elements in some apps only exposed when using VoiceOver or Accessibility Inspector
i build apps that act as Screen Readers to 1) add Vim motions everywhere on macOS 2) click (and more) AX Elements through the keyboard 3) scroll through the keyboard. it works extremely well with native apps. with non-native apps, i need to blast them with some extra AX Attributes (AXManualAccessibility, AXEnhancedUserInterface) to get them to expose their AX Elements. but there are a couple of apps tho which i can't get them to expose their AX Elements programmatically. now the weird thing is as soon as i start VoiceOver, those apps open up. or for some, if i use the Accessibility Inspector to go through their AX Elements, then they start opening up. so i'm wondering, is there one public known way that i'm missing to open up those apps, or is Apple using private APIs? any way i could make my apps behave like VoiceOver or the Accessibility Inspector to force those recalcitrant apps to open up? thanks in advance.
1
1
76
2d
iPhone Mirroring API
I'm super excited about the announcement of iPhone Mirroring on macOS. Will there be a way to communicate with a connected device throughout an API? E.g., will we developers get a way to write automation or interact with the connected device via code?
5
0
155
2d
Beta Problems
Hello Apple official engineer? I am a User of iOS 18 Beta & MacOS Sequoia Beta. I found some errors and uncomfortable problems of the Operating systems, so I want to notice them to you. The iOS 18 the tabs of Control center. I want to delete empty of one, but the is no way to delete. There was no control component. How should I do? -_- text of item that modified its size in the control panel protruded out of the container. the rounder container can't contain the text. The text should be more smaller or container should be changed. the responses when I touch has delay. Our family all use iPhone 12Pro or 13, when iOS 17 came out and I installed it, our phones became slower. If iOS 18 (official) assigns more processors, I think only iPhone 15 and 16 don't have lags. Also, There are some thing problem in the MacOS Sequoia(15) it doesn't support Xcode 15(.4). I should download 16 Beta!!! it has so many lag more than iOS 18. The Mac's benefit was soft screen but it become very hard moving ^^(??) this is not sure... after I update MacOS 15, the macbook makes "zzzzzzziiiii" sound when I charge. the beta does not 100% localized. I'm Korean but many messages and systems sometimes show the english. Pls check this contents!
1
0
221
4d
iOS 18 Developer Beta doesn’t wanna recognize on iTunes rather kept asking me to download software for it to work
This is quite an issue I also had for iOS 17 as well, but I accidentally ended the process though and I had to wait till iOS 17 was released. This year with iOS 18, I get the same issue except I did actually download it. It installed and went through as it prompt me to close iTunes before installing it. However, as I open iTunes after it was installed, my hopes weren’t up at all and it gave me another prompt to download it again. The prompt that was given to me is: A software update is required to connect to iPhone. I clicked install and waited for the process to download. However it never did download for some reason, and as I thought it was working, few minutes goes by and I get a new message saying: Installation Failed: Can’t install the software because it is not currently available from the Software Update server. So what now? This also occurs with public beta and developer beta. I know there’s such thing as a mobile framework for it to work but how do I get it to work on iTunes? I’m running High Sierra by the way. Does anyone have a solution to this? I have a backup of my iPhone via iTunes made before I download it in case if I have to downgrade it but it won’t be possible if iTunes won’t recognize my iPhone.
0
0
56
5d
Picker form style without Form
Is it possible to style a Picker on macOS to look like it was in a Form, but without actually being in a grouped Form? Unfortunately I can't use Form because its style is not customizable enough. I've tried setting various buttonStyles but I only got close to what I want. The biggest problem is that the picker is left-aligned and I need it right-aligned.
1
0
148
4d
Crashes after exceeding limit of 150 wakeups per second over 300 seconds
my macOS process is crashing when i keep my mac sleep for about 1 hour. Under Crash Reports, Console app shows two type of file. .diag type .ips type ips file doesn't shows exact line of crash as you can see below sample. Thread 67 Crashed: 0 libsystem_kernel.dylib 0x19a4aea60 __pthread_kill + 8 1 libsystem_pthread.dylib 0x19a4e6c20 pthread_kill + 288 2 libsystem_c.dylib 0x19a3f3a30 abort + 180 3 libsystem_malloc.dylib 0x19a303dc4 malloc_vreport + 896 4 libsystem_malloc.dylib 0x19a307430 malloc_report + 64 5 libsystem_malloc.dylib 0x19a321494 find_zone_and_free + 528 6 Firewall.so 0x103c8a744 TunnelSendQueue::ResumeSend() + 460 resource.diag file sgowing warning about exceeding limit of 150 wakeups per second over 300 seconds. attached here. reasource_consumptions_W36RNW09G.wakeups_resource_diag.txt is this something macOS stopping app because of some resource consumptions?
2
0
168
6d