macOS is the operating system for Mac.

macOS Documentation

Posts under macOS tag

1,460 Posts
Sort by:
Post not yet marked as solved
1 Replies
23 Views
How to change Bundle ID in "Certificates, Identifiers & Profiles" (Edit your App ID Configuration) ? Which certificate is needed for a free Mac application (.app) ? The application need only save\restore disk data (no extension, no wifi, no In-App Purchase, etc). A very simple basic 3 windows application (type math Calculator). Do I need set some "Capabilities" (App Services) ?
Posted
by Alain_B.
Last updated
.
Post not yet marked as solved
1 Replies
1k Views
Hi, Machine: M1 sonoma 14.1.1 At my test I am using macOS shipped lib of curl, and its default LibreSSL, that is: curl 8.1.2 (x86_64-apple-darwin23.0) libcurl/8.1.2 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.12 nghttp2/1.55.1 I am getting memory leaks while running the following test: void CallCurl() { CURL *hnd; hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_URL, "https://www.google.com"); curl_easy_perform(hnd); curl_easy_cleanup(hnd); } I track the leaks with macOS instruments, and I see that all leaks are from libcrypto. The leaks are measured after curl_easy_cleanup. Examples for the leaks stack frames: serialize_ECPublicKey ECDSA_do_verify_new ossl_ecdsa_verify EVP_DigestVerifyFinal tls13_server_certificate_verify_recv tls13_handshake_perform tls13_legacy_connect ossl_connect_common ssl_cf_connect cf_setup_connect cf_hc_connect Curl_conn_connect multi_runsingle curl_multi_perform curl_easy_perform CallCurl() main start ccMallocECCryptor CCECCryptorImportKey ECDSA_do_verify_new ossl_ecdsa_verify EVP_DigestVerifyFinal tls13_server_certificate_verify_recv tls13_handshake_perform tls13_legacy_connect ossl_connect_common ssl_cf_connect cf_setup_connect cf_hc_connect Curl_conn_connect multi_runsingle curl_multi_perform curl_easy_perform CallCurl() main start ccMallocECCryptor CCECCryptorImportKey ECDSA_do_verify_new ossl_ecdsa_verify EVP_DigestVerifyFinal tls13_server_certificate_verify_recv tls13_handshake_perform tls13_legacy_connect ossl_connect_common ssl_cf_connect cf_setup_connect cf_hc_connect Curl_conn_connect multi_runsingle curl_multi_perform curl_easy_perform CallCurl() main start Any you familiar with memory leaks issues at curl that is shipped with macOS? Is there a workaround? Thx, Moshe.
Posted
by Mos123.
Last updated
.
Post not yet marked as solved
2 Replies
61 Views
When you use the eslogger command line tool to dump 'profile add' and 'profile remove' notify events, the instigator process seems to always be reported to be the mdmclient process whatever the "real" instigator is: the Profiles pane in System Settings.app. a MDM solution the profiles command line tool. [Q] Is this expected? Because for another family of notify events where there is also an instigator field, the instigator points to the "real" instigator.
Posted Last updated
.
Post not yet marked as solved
0 Replies
28 Views
Hello all, if I enable the .chartScrollableAxes(.horizontal) and .chartXVisibleDomain(length: length) for a chart view to zoom in the screenshot of the view misses the graphs. I use this extension: `extension View { @MainActor func snapshot() { let renderer = ImageRenderer(content: self) if let exportImage = renderer.nsImage { let pasteboard = NSPasteboard.general pasteboard.clearContents() pasteboard.writeObjects([exportImage]) } } }` The screenshot is taken with: Button("Snap") { let view = ChartView(text: $statusText, length: $chartLength) .padding() .frame(width: 1500, height: 500) view.snapshot() } If I omit .chartScrollableAxes(.horizontal) the snapshot is ok and the graphs are visible in the image but then a zoom is not possible and the whole range is shown. Any ideas?
Posted
by Zettifour.
Last updated
.
Post not yet marked as solved
0 Replies
15 Views
Condition: We have an existing app that runs on iPhone and iPad. We want to make it compatible with macOS, along with it we want to leverage some of the macOS native components. We achieved this using macCatalyst, but now we want to build common components using swiftUI for both macOS and iOS platforms. Challenge: Using SwiftUI view for mac development Approach 1: We created a Mac bundle that contained Mac specific views (using Appkit views). This approach worked fine for creating and using components that are specific to macOS. Now while developing and using SwiftUI views in mac bundle we face following error -> (NSHostingViewController symbol not found). Approach 2: We tried creating a separate Mac app and make it part of MacCatalyst app. In this approach we were able to show NSStatusBar and add text using SwiftUI view. But the status bar appearance is inconsistent, sometimes NSStatusBar icon appears but other times it just won't appear. Can anyone help with the right approach for this scenarios
Posted Last updated
.
Post not yet marked as solved
5 Replies
184 Views
I'm trying to sign a macOS application which includes a Endpoint Security system extension. The profile for the extension has capability added and the app profile has the System Extension capability added. Both targets also has the correct entitlements, but when validating the app after archiving I get the following error: "Profile doesn't support Endpoint Security." When looking in the logs I can see that Xcode is fetching a provisioning profile for the extension without the needed capability. If downloading the profile from the developer portal the correct capability is present. Could something be "out of sync" regarding what provisioning profiles Xcode fetches vs what I see on the developer portal? If I try to archive using xcodebuild I get the following: "APP requires a provisioning profile with the System Extension feature." and ""BUNDLE_ID.systemextension" requires a provisioning profile with the Endpoint Security feature." I have tried with automatic and manual signing but nothing seems to work.
Posted
by Afogh.
Last updated
.
Post not yet marked as solved
1 Replies
81 Views
I prepare an app to migrate from ObservableObject to Observable, from EnvironmentObject to Environment(MyClass.self) and so so forth. That works OK, very simple. But, that forces to run on macOS 14 or more recent. So I would like to have it conditionally, such as: if macOS 14 available @Environment(ActiveConfiguration.self) var activeConfiguration: ActiveConfiguration otherwise @EnvironmentObject var activeConfiguration: ActiveConfiguration The same for the class declaration: if macOS 14 available @Observable class ActiveConfiguration { var config = Configuration() } otherwise class ActiveConfiguration : ObservableObject { @Published var config = Configuration() } Is there a way to achieve this (I understand it is not possible through extensions of Macros, as we can do for modifiers) ? Could I define 2 classes for ActiveConfiguration, but then what about @Environment ?
Posted
by Claude31.
Last updated
.
Post not yet marked as solved
1 Replies
239 Views
Hello, I tried to build AVCam sample application for iOS17 and run it on MacBook (designed as iPad) with macos14.3 (Sonoma). https://developer.apple.com/documentation/avfoundation/capture_setup/avcam_building_a_camera_app?language=objc When building and testing with Xcode 15.2, AVCam application crashes systematically when choosing target "My Mac (Designed for iPad)" In fact, SIGABORT signal is received in a thread dealing with "portrait effect" Thread 19 Queue : com.apple.portrait.effect_init (serial) Is it a known bug? Is there a workaround about this case? Best regards External webcam is detected by AVCam but preview and capture are systematically upside down. (may be the same FaceTime HD camera's) Is it a known bug? Is there a workaround about this case?
Posted
by ftristani.
Last updated
.
Post not yet marked as solved
1 Replies
243 Views
Using SwiftData for a MacOS app I have a working Table but I'd like to add recursion to the rows so instead of stopping at the first child level I can get to grandchildren, etc. Tried creating a separate func that calls itself but cannot get working syntax, possibly because this is happening inside a DisclosureTableRow or I just have bad syntax. Instead of calling TableRow(childAccount) I'd like to be able to call a recursive function which determines if each child is treated as a parent or not until there are no more grandchildren. Each Account class object has .parent: Account, .children: [Account], and .isExpanded:Bool (required by the DisclosureTableRow but not changed here). This is the working non-recursive code: ForEach(theAccounts.sorted(using: sortOrder)) { account in // Make this account bindable so can use .isExpanded directly @Bindable var account = account // Check if the account is not a child of any other account to avoid duplcates, if !theAssetAccounts.contains(where: { $0.children?.contains(account) ?? false }) { // If the account has children, display them in a DisclosureTableRow… if let children = account.children, !children.isEmpty { DisclosureTableRow(account, isExpanded: $account.isExpanded) { ForEach(children) { childAccount in TableRow(childAccount) } } } else { // …or if the account has no children, display it in a simple TableRow TableRow(account) } } } } First the singleton theMotherAccount is at the top level then we iterate over an array of other accounts, theAccounts, showing only those that are not themselves children. Any children are then surfaced as part of another DisclosureTableRow. I thought I could just create a recursive func to return either a DisclosureTableRow or a TableRow but have not been able to find acceptable syntax. This is what I thought ought to work: if let children = account.children, !children.isEmpty { return DisclosureTableRow(account, isExpanded: Bindable(account).isExpanded) { ForEach(children) { child in recursiveAccountRow(account: child) } } } else { return TableRow(account) } }
Posted
by pikes.
Last updated
.
Post not yet marked as solved
2 Replies
88 Views
A user of my software reports that it is not launching on MAC OS Monterey (Intel architecture, a model that cannot be upgraded to MAC OS Ventura). The error message is saying that "the application cannot be opened because it is not compatible with that particular type of Mac" (this is a paraphrase of the user, I haven't seen the actual message, I suspect it is in Portuguese). I am building my Java application as follows: Open JDK 17 Using jpackage for packaging the executable Signing and notarisation following best practice Distribution as a disk image (DMG) Building everything from a MacBook Pro with Ventura 13.4.1 This is working fine for distribution to (many) users with MAC OS Ventura, and it also works fine (with a different build process) for M1 Macs. I do not have an easy possibility to test and/or build with MAC OS Ventura and I do not have a theory where the problem could come from. Is there any way that Mac OS Monterey would not be compatible with a Java app built with the above parameters? If so, which? And: Can I tackle the problem from a MAC OS Ventura machine, or would I need yet another machine with MAC OS Monterey installed? Any pointers in the right direction would be greatly appreciated. Thanks, Thomas
Posted Last updated
.
Post not yet marked as solved
0 Replies
75 Views
We found that crashes occur on some specific devices. But don't know the root cause for it. It only appears on the user side and cannot be reproduced on our local devices. From the stack, a crash occurs inside AVCapture after calling discoverySessionWithDeviceTypes: NSArray<AVCaptureDevice*>* GetVideoCaptureDevices() { NSArray* captureDeviceType = @[ AVCaptureDeviceTypeBuiltInWideAngleCamera, AVCaptureDeviceTypeExternalUnknown ]; AVCaptureDeviceDiscoverySession* deviceDiscoverySession = [AVCaptureDeviceDiscoverySession discoverySessionWithDeviceTypes:captureDeviceType mediaType:AVMediaTypeVideo position:AVCaptureDevicePositionUnspecified]; return deviceDiscoverySession.devices; } The following is the crash call stack: OS Version: macOS 13.5 (22G74) Report Version: 104 Crashed Thread: 10301 Application Specific Information: Fatal Error: EXC_BAD_INSTRUCTION / EXC_I386_INVOP / 0x7ff8194b3522 Thread 10301 Crashed: 0 AppKit 0x7ff8194b3522 -[NSApplication _crashOnException:] 1 AppKit 0x7ff8194b32b3 -[NSApplication reportException:] 2 AppKit 0x7ff819569efa NSApplicationUncaughtExceptionHandler 3 CoreFoundation 0x7ff8161c010a <unknown> 4 libobjc.A.dylib 0x7ff815c597c8 <unknown> 5 libc++abi.dylib 0x7ff815f926da std::__terminate 6 libc++abi.dylib 0x7ff815f92695 std::terminate 7 libobjc.A.dylib 0x7ff815c65929 <unknown> 8 libdispatch.dylib 0x7ff815e38046 _dispatch_client_callout 9 libdispatch.dylib 0x7ff815e39266 _dispatch_once_callout 10 AVFCapture 0x7ff8328cafb6 +[AVCaptureDALDevice devices] 11 AVFCapture 0x7ff832996410 +[AVCaptureDevice_Tundra _devicesWithAllowIOSMacEnvironment:] 12 AVFCapture 0x7ff83299652b +[AVCaptureDevice_Tundra _devicesWithDeviceTypes:mediaType:position:allowIOSMacEnvironment:] 13 AVFCapture 0x7ff83299e8c0 -[AVCaptureDeviceDiscoverySession_Tundra _initWithDeviceTypes:mediaType:position:allowIOSMacEnvironment:prefersUnsuspendedAndAllowsAnyPosition:] 14 AVFCapture 0x7ff83299e7a4 +[AVCaptureDeviceDiscoverySession_Tundra discoverySessionWithDeviceTypes:mediaType:position:] 15 Electron Framework 0x119453784 media::GetVideoCaptureDevices (video_capture_device_avfoundation_helpers.mm:22) I want to know what is the root cause of this crash. How should I simulate it and fix it? Any suggestions would be highly appreciated. Thank you.
Posted
by Colin1994.
Last updated
.
Post not yet marked as solved
1 Replies
477 Views
When attempting to load an mlmodel and run it on the CPU/GPU by passing the ComputeUnit you'd like to use when creating the model with: model = ct.models.MLModel('mymodel.mlmodel', ct.ComputeUnit.CPU_ONLY) Documentation for coremltools v7.0 says: compute_units: coremltools.ComputeUnit coremltools.ComputeUnit.ALL: Use all compute units available, including the neural engine. coremltools.ComputeUnit.CPU_ONLY: Limit the model to only use the CPU. coremltools.ComputeUnit.CPU_AND_GPU: Use both the CPU and GPU, but not the neural engine. coremltools.ComputeUnit.CPU_AND_NE: Use both the CPU and neural engine, but not the GPU. Available only for macOS >= 13.0. coremltools 7.0 (and previous versions I've tried) now seems to ignore that hint and only runs my models on the ANE. Same model when loaded into XCode and run a perf test with cpu only runs happily on the CPU and selected in Xcode performance tool. Is there a way in python to get our models to run on different compute units?
Posted
by pzagacki.
Last updated
.
Post not yet marked as solved
0 Replies
109 Views
Firstly, everything is ok. I have been connected Apple Vision Pro device to the Xcode via wireless network, also build my app in past several weeks. But since yesterday, I can not connect Apple Vision Pro device to my Xcode anymore. The device did not listed in Devices and Simulators window. I have tried: Update my Xcode to 15.3 Reboot my Mac and Apple Vision Pro Reset Apple Vision Pro also erase all data Other Macs in the same network also did not list any Vision Pro device I'm sure Vision Pro and Mac are in the same network, and it worked before. I go to Settings - General - Remote Devices, and open Xcode's Devices and Simulators window, still can't see any Apple Vision Pro device.
Posted
by A00a.
Last updated
.
Post not yet marked as solved
5 Replies
226 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-&amp;gt;General-&amp;gt;Sharing-&amp;gt;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 &amp;lt;iostream&amp;gt; #include &amp;lt;unistd.h&amp;gt; #include &amp;lt;limits.h&amp;gt; #include &amp;lt;cstring&amp;gt; int main() { char domainname[255]; // Get the domain name if (getdomainname(domainname, 255) != 0) { std::cout &amp;lt;&amp;lt; "Error getting domain name" &amp;lt;&amp;lt; std::endl; return 1; } std::cout &amp;lt;&amp;lt; "Domain name: " &amp;lt;&amp;lt; domainname &amp;lt;&amp;lt; 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
137 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
124 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
2k 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
201 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
.