macOS is the operating system for Mac.

macOS Documentation

Posts under macOS tag

1,468 Posts
Sort by:
Post not yet marked as solved
5 Replies
135 Views
I want to get the network-name (domain-name) on my Mac-Machine. Where iin the Settings does this domain name gets configured. I refer to this page which talks about computer name and host name, I could find where my hostname is present (Settings->General->Sharing->local host name) but not anything related to the network-name (local -domain) . Even try to fetch this info using the linux api to getdomainname, api call succeeded but it returns Nothing. #include <iostream> #include <unistd.h> #include <limits.h> #include <cstring> int main() { char domainname[255]; // Get the domain name if (getdomainname(domainname, 255) != 0) { std::cout << "Error getting domain name" << std::endl; return 1; } std::cout << "Domain name: " << domainname << std::endl; return 0; } Output Domain name: I even came across Search-Domains, Does it have anything to do with the network-name (domain name of the machine)?
Posted Last updated
.
Post not yet marked as solved
1 Replies
65 Views
I'm building a Mac OSX Menubar app (build target is 14.0) and need a Settings window as part of it. I define the window as a standalone view in my @main block as follows: struct xyzApp: App { MenuBarExtra { MenubarView() } label: { Label("XYZ", image: "xyz") } .menuBarExtraStyle(.window) Window("Settings", id: "settings-window") { SettingsView() }.windowResizability(.contentSize) } The Settings view looks like this var body: some View { TabView { Form { }.tabItem { Label("Tab1",systemImage: "gear") } Form { }.tabItem { Label("Tab2",systemImage: "gear") } } } } However the Tabview is not being rendered correctly, there's no image and the sizing is wrong I tested the same code on a regular app with a Settings() declaration in the @main block and it works fine. Any points on what I'm doing wrong would be very helpful. Thanks!
Posted Last updated
.
Post not yet marked as solved
1 Replies
62 Views
I was coding a sidebar on macOS and folded it with my mouse, but every time I run the app, I can't see the sidebar, so I can't use the sidebar. If you add a new image once, you can't see the same, but the third window also shows the sidebar well. I don't know why It's similar when you run it on another computer at all. Current code import CoreData struct ContentView: View { @Environment(\.managedObjectContext) private var viewContext @State private var isSidebarVisible: Bool = true var body: some View { NavigationView { if isSidebarVisible { Sidebar() } MemoListView().environment(\.managedObjectContext, viewContext) } .frame(minWidth: 700, minHeight: 400) .toolbar { ToolbarItem(placement: .navigation) { Button(action: toggleSidebar) { Image(systemName: "sidebar.leading") } } } } private func toggleSidebar() { withAnimation { isSidebarVisible.toggle() } } struct Sidebar: View { @Environment(\.managedObjectContext) private var viewContext var body: some View { List { NavigationLink(destination: EasyWebListView().environment(\.managedObjectContext, viewContext)) { Label("Web Links", systemImage: "link") } NavigationLink(destination: MemoListView().environment(\.managedObjectContext, viewContext)) { Label("Memos", systemImage: "note.text") } NavigationLink(destination: ThemeListView().environment(\.managedObjectContext, viewContext)) { Label("Themes", systemImage: "photo.on.rectangle.angled") } NavigationLink(destination: AccessView().environment(\.managedObjectContext, viewContext)) { Label("Access Records", systemImage: "clock.fill") } } .navigationTitle("My App") } } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView().environment(\.managedObjectContext, PersistenceController.preview.container.viewContext) } } And the code used when there was a problem before. import CoreData struct ContentView: View { @Environment(\.managedObjectContext) private var viewContext @State private var isSidebarVisible: Bool = true var body: some View { NavigationView { Sidebar().environment(\.managedObjectContext, viewContext) MemoListView().environment(\.managedObjectContext, viewContext) } .frame(minWidth: 700, minHeight: 400) .toolbar { ToolbarItem(placement: .navigation) { Button(action: { withAnimation { isSidebarVisible.toggle() } }) { Image(systemName: "sidebar.leading") } } } } struct Sidebar: View { @Environment(\.managedObjectContext) private var viewContext var body: some View { List { NavigationLink(destination: EasyWebListView().environment(\.managedObjectContext, viewContext)) { Label("Web Links", systemImage: "link") } NavigationLink(destination: MemoListView().environment(\.managedObjectContext, viewContext)) { Label("Memos", systemImage: "note.text") } NavigationLink(destination: ThemeListView().environment(\.managedObjectContext, viewContext)) { Label("Themes", systemImage: "photo.on.rectangle.angled") } NavigationLink(destination: AccessView().environment(\.managedObjectContext, viewContext)) { Label("Access Records", systemImage: "clock.fill") } } .listStyle(SidebarListStyle()) .navigationTitle("My App") } } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView().environment(\.managedObjectContext, PersistenceController.preview.container.viewContext) } }
Posted Last updated
.
Post not yet marked as solved
9 Replies
1.9k Views
I'm getting occasional crashes, which have not happened while running under a debugger and I haven't figured out how to reproduce. I wonder if anyone can help me glean more information from a crash report. Here's the main part. This particular report if from macOS 14.2 beta, but I've also seen it from 14.1.1. Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000018 Exception Codes: 0x0000000000000001, 0x0000000000000018 VM Region Info: 0x18 is not in any region. Bytes before following region: 140723250839528 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL UNUSED SPACE AT START ---> mapped file 7ffcaf60c000-7ffcd7f48000 [649.2M] r-x/r-x SM=COW ...t_id=b7394f27 Error Formulating Crash Report: PC register does not match crashing frame (0x0 vs 0x1022A3630) Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 <translation info unavailable> 0x1022a3630 ??? 1 libsystem_platform.dylib 0x7ff819d0b393 _sigtramp + 51 2 AppKit 0x7ff81d3549a6 -[NSControl _setWindow:] + 59 3 AppKit 0x7ff81d413c19 -[NSSegmentedControl _setWindow:] + 42 4 AppKit 0x7ff81defd3be __21-[NSView _setWindow:]_block_invoke.391 + 324 5 AppKit 0x7ff81d33a62c -[NSView _setWindow:] + 1886 6 AppKit 0x7ff81defd3be __21-[NSView _setWindow:]_block_invoke.391 + 324 7 AppKit 0x7ff81d33a62c -[NSView _setWindow:] + 1886 8 AppKit 0x7ff81d572d08 -[NSWindow dealloc] + 922 9 MyApp 0x1011b6b81 -[JWWindow dealloc] (in MyApp) (JWWindow.m:37) 10 Foundation 0x7ff81b3d179c _NSKVOPerformWithDeallocatingObservable + 151 11 Foundation 0x7ff81acc6d54 NSKVODeallocate + 150 12 libobjc.A.dylib 0x7ff8199189d7 AutoreleasePoolPage::releaseUntil(objc_object**) + 169 13 libobjc.A.dylib 0x7ff819915cf0 objc_autoreleasePoolPop + 235 14 CoreFoundation 0x7ff819d794a1 _CFAutoreleasePoolPop + 22 15 Foundation 0x7ff81ac869ea -[NSAutoreleasePool drain] + 133 16 AppKit 0x7ff81d315694 -[NSApplication run] + 653 17 AppKit 0x7ff81d2e9662 NSApplicationMain + 816 18 MyApp 0x100ef5034 start (in MyApp) + 52 I can see that it involves deallocating a window as part of draining an autorelease pool, but does the presence of _NSKVOPerformWithDeallocatingObservable mean that KVO is involved somehow? And does the note "PC register does not match crashing frame" tell me anything?
Posted
by JWWalker.
Last updated
.
Post not yet marked as solved
1 Replies
140 Views
HI Team, We have recently observed a network issue, followed by device hang-ups when users come out of sleep while using the Transparent app proxy provider in Sonoma 14.4. and users are required to restart the system to resolve the problem. In the client logs, we observed that State:/Network/Global/IPv4 does not have any PrimaryInterface and there is no internet connectivity, although the internet works fine on other devices. this issue start coming in sonoma 14.4 and happen with Transparent app proxy provider. We are currently unable to pinpoint the exact issue. Are there any known issues with Sonoma 14.4?
Posted
by namdev20.
Last updated
.
Post not yet marked as solved
0 Replies
81 Views
Hello, I've successfully tested my macOS app's subscription purchases in Sandbox mode, but I'm unsure how to test in Production mode, as I read that "Developer ID" profiles don't allow testing subscription purchases. Since Mac can't use an Ad Hoc profile, is there a recommended method for testing in-app purchases in Production mode for macOS apps? I need to test by myself (preferring to avoid Test Flight, if that is even an option for this purpose). My app subscription processes work in the Sandbox environment, but an Apple reviewer could not retrieve the subscription details. (I'm using RevenueCat and see nothing that I need to change). Thank you for your assistance.
Posted
by PhillipW.
Last updated
.
Post not yet marked as solved
0 Replies
227 Views
While setting up our premium video-on-demand workflow in AWS, using AWS MediaConvert and MediaPackager and licence delivery from drmToday we encountered an issue with HLS+FairPlay playback (only) in Safari on macOS. The issue is that sometimes (more than 50% on the same video) the videoplayer initialization fails (with simple event of type=”error” in onerror callback). We are using Shaka player in our web application, so we first assumed that this (random) issue could be due to Shaka. However, we also tested with direct playback via the player and we observed the same issue, with same frequency. Since we have some content for which this problem does not occur and other content when the problem occurs very frequently, we tried to understand what could explain this difference. We noticed that for assets where the problem never occurs the order of the video submanifest was increasing, whereas for assets where the problem occurs frequently the order is decreasing. To isolate the issue we created a standalone page for a 2-minute asset and we are able to demonstrate that on this asset, when the bitrates are in decreasing order the playback with Safari on macOS fails more than 50% of the time. Test page using tag: KO: https://ntg-test-public-scr.s3.eu-west-1.amazonaws.com/aws-video.html OK: https://ntg-test-public-scr.s3.eu-west-1.amazonaws.com/aws-video.html?ok=1 Test page using Shaka: KO: https://ntg-test-public-scr.s3.eu-west-1.amazonaws.com/aws-shaka.html OK: https://ntg-test-public-scr.s3.eu-west-1.amazonaws.com/aws-shaka.html?ok=1 Notes: the issue is only reproducible with Safari on macOS (not with Safari on iOS) same HLS content + FairPlay plays OK 100% on tvOS the issue is only reproducible for HLS content with FairPlay (OK if no DRM)
Posted
by patatrouf.
Last updated
.
Post marked as solved
3 Replies
131 Views
I have an Xcode project (generated from Qt) which is signed by a post-processing script. It uses the invocation: codesign -o runtime --sign "$(CODE_SIGN_IDENTITY)" CODE_SIGN_IDENTITY is set to "Apple Development" in the Build Settings for the target. The signing step fails with this complaint Apple Development: ambiguous (matches "Apple Development: <my name> (an ID)" and "Apple Development: <my company email> (another ID)" in login.keychain-db) It is true, I do have two Apple Development certificates. I thought one is for personal development (when you pick the personal team) and the other for company development (when I pick the company team). I have other Xcode projects (built "by hand") which have CODE_SIGN_IDENTITY set to "Apple Development" and with Automatic signing turned on, and they build just fine, even though I have two certificates with common names beginning "Apple Development". However, when I look at the build log of those regular Xcode projects, which are signed by Xcode rather than in a post-processing script, the Signing step logs this: Signing Identity: Apple Development: (an ID) not simply "Apple Development". Xcode seems to have resolved the ambiguity all on its own before calling codesign. It then calls codesign using the hash of the certificate as its identifier. How can I emulate Xcode's behavior here? The postprocessing script runs on different developer's machines - they all have multiple "Apple Development" certificates, and they are all different from one another.
Posted
by ssmith_c.
Last updated
.
Post not yet marked as solved
1 Replies
64 Views
I am using NetFS's NetFSMountURLAsync api to mount SMB share in mac os app. I am able to mount the share however this share is not automatically appearing in Finder's sidebar. I tried using LSSharedFileListInsertItemURL to make the mount point available in Finder's side bar however facing crash on line, kLSSharedFileListItemBeforeFirst.takeRetainedValue() from below code snippet. let itemType: CFString = kLSSharedFileListFavoriteItems.takeRetainedValue() if let list: LSSharedFileList = LSSharedFileListCreate(nil, itemType, nil)?.takeRetainedValue() { let inPropertiesToSet: CFMutableDictionary = CFDictionaryCreateMutable(nil, 1, nil, nil) CFDictionaryAddValue(inPropertiesToSet, unsafeBitCast(kLSSharedFileListVolumesNetworkVisible, to: UnsafeRawPointer.self), unsafeBitCast(kCFBooleanTrue, to: UnsafeRawPointer.self)) let driveUrl = URL(fileURLWithPath: mountPoint) let shareUrl: CFURL = driveUrl as CFURL if let item: LSSharedFileListItem = LSSharedFileListInsertItemURL( list, kLSSharedFileListItemBeforeFirst.takeRetainedValue(), nil, iconRef, shareUrl, inPropertiesToSet, nil) { let itemRefId = LSSharedFileListItemGetID(item) let itemRefIdStr = "\(itemRefId)" userDefaults.set(itemRefIdStr, forKey: mountPoint) } } Anything wrong in above code? Also since this api is deprecated is there any alternative API to achieve this. The goal is to make the mount point available in Finder's sidebar so that user can easily access it.
Posted
by apjoshi.
Last updated
.
Post not yet marked as solved
5 Replies
1.5k Views
Hi. After the recent update of Ventura to 13.4 and Big Sur to 11.7.7 all of a sudden "launchctl setenv" returns the following errors. Could not set environment: 150: Operation not permitted while System Integrity Protection is engaged Is there any workaround to fix this?
Posted
by mtnview.
Last updated
.
Post marked as solved
2 Replies
112 Views
I have a repeating timer installed like this: _cmdTimer = [NSTimer timerWithTimeInterval: 0.5 target: self selector: @selector(timedTask:) userInfo: nil repeats: YES]; [NSRunLoop.mainRunLoop addTimer: _cmdTimer forMode: NSModalPanelRunLoopMode]; [NSRunLoop.mainRunLoop addTimer: _cmdTimer forMode: NSDefaultRunLoopMode]; The first time the timer fires, it opens a modal dialog. But then the timer does not fire again until the dialog is closed. I don't get that, since I scheduled the timer in NSModalPanelRunLoopMode. To verify that the dialog was running in that mode, just before opening the dialog I said [self performSelector: @selector(testMe) withObject: nil afterDelay: 0.7 inModes: @[NSModalPanelRunLoopMode] ]; and the testMe method did get executed while the dialog was open.
Posted
by JWWalker.
Last updated
.
Post not yet marked as solved
7 Replies
185 Views
Hello, I have a multi-platform app that is split across two organizations: One is on iOS, and is distributed using the App Store with bundle ID X with team ID A. One is on macOS, and is distributed using Developer ID with bundle ID Y with team ID B. Once again, these are in two separate organizations. To consolidate these accounts we'd like to transfer ownership of Y to team ID A. However, according to the app transfer criteria, it appears that that's not possible: Both the transferor and recipient accounts can’t be in a pending or changing state, and the latest version of their paid and free agreements must be accepted. [...] The app must have had at least one version that's been approved for distribution. Given the context from the rest of the page, it seems valid to assume (and I've confirmed this through speaking with technical support) that apps are only eligible for transfer if they've been submitted to the App Store, so I'm considering looking into it just for the purposes of this transfer. This app has a fairly large user base and if possible we want to avoid any user disruption (and any cost inflicted on our API) as a result of a forced logout due to losing access to the previous keychain. As a bonus, it would be nice, though not necessary, if the macOS app could ship under the same entry as the iOS app. As I understand it, this would require changing the macOS app to use bundle ID X. Before going down this road, I'd like to confirm if the following plan is a sane one for accomplishing a complete app transfer that satisfies the above requirements: Distribute the app on the macOS App Store under team ID B. Transfer the app, and continue distribution on the macOS App Store under team ID A. Obtain a new Developer ID certificate for using bundle ID Y with team ID B. Resume distribution of the Developer-ID-signed app with team ID B, without loss of keychain access. If loss of keychain access is not possible, can someone confirm if it is at least possible to keep the same bundle ID after performing the steps above? Many thanks in advance for your help - there is much conflicting information online and in this forum, and little documentation when it comes to Developer ID transfers. I've even spoken to several Apple employees who have directed me here.
Posted
by jckbiggs.
Last updated
.
Post marked as solved
1 Replies
80 Views
i'd like to set up an app proxy server at local to resolve contents in mail protocols with SSL/TLS. using VPN(App Proxy Provider only support HTTP?) to tunnel flows about mail protocols to proxy server seems impracticable system configuration only supports HTTP and FTP? is there a way to set a Mail Protocols Proxy at system Level? or is there a way to route all transport layer flows(not only particular Application layer protocol) to proxy server?
Posted
by MeLawSS.
Last updated
.
Post not yet marked as solved
1 Replies
121 Views
I'm exploring options for sharing a keychain item between a plug-in and a standalone application. Despite my efforts, I haven't found a straightforward method to accomplish this. Can anyone provide guidance on enabling keychain sharing between these components?
Posted Last updated
.
Post not yet marked as solved
1 Replies
409 Views
There is a tips popup window in my program, I set it to close after 3 seconds, and the makeKeyAndOrderFront function is never called on it. However, the following error will appear during operation: Warning: -[NSWindow makeKeyWindow] called on NSWindow 0x7fb... which returned NO from -[NSWindow canBecomeKeyWindow] I'd like to know if there are any other function calls that would cause the above warning? Or how can I troubleshoot and remove this warning.
Posted Last updated
.
Post not yet marked as solved
1 Replies
102 Views
Hi, After upgrading the Sonoma 14.5 Beta (23F5049f), I am unable to connect the external display via the C Type. I have tried everything like restarting the laptop/ display etc. Can anyone pls help on that or I do need to rollback the changes?
Posted
by vikask008.
Last updated
.
Post not yet marked as solved
0 Replies
96 Views
Hello, I have an Applescript application that launch a webserver that is compiled into it. This webserver is composed of httpd, php, openssl and curl among others. I'm using the --prefix parameter to compile everything where it needs to be. Until macOS 13, I had no problem with this setup. Since macOS 14, an error shows up in the Finder during the ./configure of curl : "cannot open the Application My.app as it may be damaged or incomplete" When this dialog alert appears, the ./configure script is suspended during : configure:25088: checking whether to enable IPv6 configure:25137: gcc -o conftest -Qunused-arguments -O2 -Wno-pointer-bool-conversion -Werror=partial-availability -I/Applications/MyApp.app/Contents/Resources/Webserver/zlib-1.3.1/include -L/Applications/MyApp.app/Contents/Frameworks -framework CoreFoundation -framework CoreServices -framework SystemConfiguration -L/Applications/MyApp.app/Contents/Resources/Webserver/zlib-1.3.1/lib conftest.c -lz >&5 configure:25137: $? = 0 configure:25137: ./conftest I tried the following with the conftest : otool -L conftest conftest: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 2420.0.0) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 1226.0.0) /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration (compatibility version 1.0.0, current version 1300.100.9) /Applications/MyApp.app/Contents/Resources/Webserver/zlib-1.3.1/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.3.1) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1345.100.2) The /Applications/MyApp.app/Contents/Resources/Webserver/zlib-1.3.1/lib/libz.1.dylib is present and signed for further Apple's notarization. ./conftest in another terminal window the error is different : Cannot open the application cause the developper cannot be verified. This error happens only when compiling inside a folder with an .app extension (which is assumed to be an application by macOS). If I use the --prefix toward a folder without the .app extension, everything works fine. Among every sources I compiled, curl is the only one causing me this. Nothing has changed in the curl's configure script for decades. I looked up to what could have changed from macOS 13 to 14 but I didn't find anything.
Posted
by mpepito.
Last updated
.
Post not yet marked as solved
15 Replies
921 Views
I am developing a Mac app which provides a Credential Provider extension and I'm having trouble with passkey integration. I wrote here about the issue I'm having with the iOS app. On the Mac I'm experiencing a different issue. As opposed to the iOS app (where I'm not even able to use my extension to create a new passkey in the first place) on the Mac I'm able to use my extension to create a passkey. I save the credential identity into the system AutoFill suggestions store without error. The problem is that when I attempt to authenticate on the same site the system does not offer my app's credential as a suggestion. Standard passwords are working fine. Can anyone help me understand how I can troubleshoot this type of problem? Thanks! -Jeremy
Posted Last updated
.
Post not yet marked as solved
2 Replies
205 Views
I updated my Mac to 14.5 (beta), and it changed my wallpaper, reset all of my settings, moved apps around, and won't let me move files and says, "Preparing To Move File". I code a lot so it might be something I did, but it wasn't. I have an EtreCheck report below. EtreCheck Report
Posted
by PuppyArms.
Last updated
.