macOS is the operating system for Mac.

macOS Documentation

Posts under macOS tag

1,455 Posts
Sort by:
Post not yet marked as solved
0 Replies
16 Views
After upload using transporter I get following message: "Cannot be used with TestFlight because the signature for the bundle at “GSequencer.app” is missing an application identifier but has an application identifier in the provisioning profile for the bundle. Bundles with application identifiers in the provisioning profile are expected to have the same identifier signed into the bundle in order to be eligible for TestFlight." (90886) I am unsure about the cause of this problem, please give some advice howto fix?
Posted
by joel2001k.
Last updated
.
Post not yet marked as solved
0 Replies
24 Views
We have a legacy app written in a mix of C, ObjC, C++ and ObjC++ with .xib files. It is not sandboxed. It sends an Apple Event to TV (the app of that name from Apple, not a physical TV) using /usr/bin/osascript, calling a compiled Apple Script which is in our app bundle's Resources directory with parameters which we generate in our app at runtime. The first time it does this on a fresh system, the OS puts up a dialog asking for permission to control TV, and after the user clicks Allow, our app appears under Security and Privacy in the Automation section. That's all fine, but what is unexpected is that the app has no Apple Events entitlement (com.apple.security.automation.apple-events), and it doesn't have a NSAppleEventsUsageDescription string either. The documentation at https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_automation_apple-events says Your app doesn’t need the Apple Events Entitlement if it only sends Apple events to itself or to other processes signed with the same team ID. but we're not on the Apple team. When I filter the log for messages from tccd pertaining to our app, it does indeed complain : Prompting policy for hardened runtime; service: kTCCServiceAppleEvents requires entitlement com.apple.security.automation.apple-events but it is missing for accessing={TCCDProcess: identifier=<our bundle id>” But despite those complaints, everything works - I can send the event, and TV acts upon it. Is this working only by accident, and might fail in some minor future OS update? tccd also complains about the microphone Prompting policy for hardened runtime; service: kTCCServiceMicrophone requires entitlement com.apple.security.device.audio-input but it is missing for requesting={TCCDProcess: identifier=<our bundle ID> but we don't use the microphone tccd complains about this too <path-to-our-app> attempted to call TCCAccessRequest for kTCCServiceAccessibility without the recommended com.apple.private.tcc.manager.check-by-audit-token entitlement What does that mean, and should we be concerned?
Posted
by ssmith_c.
Last updated
.
Post not yet marked as solved
0 Replies
22 Views
Hi, I have codesigned my application and after this macos won't run the binary anymore. codesign -f -o runtime --timestamp -s "Developer ID Application: YOUR NAME (TEAM_ID)" --entitlements $HOME/workspace/GSequencer-cocoa/gsequencer-macos/macos-contrib/GSequencer.entitlements -i com.gsequencer.GSequencer --deep $HOME/workspace/GSequencer-cocoa/gsequencer-macos/build/universal/GSequencer.app Verify signature works. codesign -vv $HOME/workspace/GSequencer-cocoa/gsequencer-macos/build/universal/GSequencer.app The same for the DMG file, still doesn't work anymore. codesign -f -o runtime --timestamp -s "Developer ID Application: YOUR NAME (TEAM_ID)" $HOME/workspace/GSequencer-cocoa/gsequencer-macos/build/arm64/GSequencer-6.9.1.dmg I would love to distribute my application with code signing. Note all libraries are built using clang or clang++. I figured out that when I leave entitlements away it would launch but complains about library signatures. regards, Joël
Posted
by joel2001k.
Last updated
.
Post not yet marked as solved
0 Replies
29 Views
Hi, So recently I've been itching to get some actual work done and create something that is genuinely useful to me. Mainly, I want to practice my skills and hopefully build up some new ones. My concept/idea is to create something that resembles spatial audio ( or spatialized stereo ), but on steroids for macOS. I want to create something that has much more customizability, but also ease of use. I'd like to make use of the power in products like AirPods Pro and create a more immersive audio experience. However, before I make any serious plans, I'd like to ask for some feedback, really just to consider the feasibility of something like this. I throughly enjoy a rich audio experience, but I feel the experience as is on macOS is quite lackluster, especially compared to iOS with system wide spatialized stereo already available. I would genuinely appreciate any feedback or support that could be given on this project. Thank you for your time. I also apologize if this is the wrong usage of this forum/support.
Posted Last updated
.
Post not yet marked as solved
3 Replies
888 Views
In my sandboxed MacOS app I want to access OSLogStore programmatically to fetch logs for multi-component application (app, libraries, deriver) for further analysis. According to the documentation, - https://developer.apple.com/documentation/oslog/oslogstore/3366102-local the app should have com.apple.logging.local-storeentitlement. I have added this entitlement "by hand" to the entitlement file as I I can't find a correspondent entry in the Xcode -> Sign & Capabilities interface. When I run the app, I get Unsatisfied entitlements: com.apple.logging.local-store error and the app doesn't start. If I remove the entitlement, the app can't get access to the logd subsystem. How can I add com.apple.logging.local-store to my app? Should I request this not visible via Xcode configuration UI from apple? Thanks!
Posted
by kriki44.
Last updated
.
Post not yet marked as solved
3 Replies
111 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
0 Replies
78 Views
Hello, I have some question about the usage of the function: func update(NEFilterSocketFlow, using: NEFilterDataVerdict, for: NETrafficDirection) (https://developer.apple.com/documentation/networkextension/nefilterdataprovider/3543400-update) provided by the NEFilterDataProvider class of the content filter network extension. If I understand correctly, this function can be used on an instance of NEFilterDataProvider to update an already issued verdict for a network flow. By "issuing verdict" I mean returning any of .allow()/.drop()/.init(pass: peek:) in handleNewFlow/handleInboundData/handleOutboundData However, I am having difficulty with it. My workflow involves maintaining an array of currently active flows. Flows are inserted in handleNewFlow() and they are deleted when handleReport(report: NEFilterReport) with event flowClosed is called (flow identification is based on their UUID). Then, at some point in future, based on our business logic, I iterate through the container of "active flows" and attempt to call func update(NEFilterSocketFlow, using: NEFilterDataVerdict, for: NETrafficDirection) on all of them, with intention of changing the already issued verdict. However, calling that function seems to have no effect. Am I using it the wrong way? What is the intended usage? Is it even possible to update verdict of already allowed or postponed by .init(peek:pass:) flows? The issue I'm trying to solve is that we evaluate flows based on our business logic and return either .drop() or .init(pass: peek:) verdicts for them. Sometimes, we want to reevaluate the .init(pass: peek:) verdict immediately, which is when we attempt to call the update() function and provide a new .init(pass:peek) or .drop() verdict. The main objective is to promptly drop certain flows, particularly those awaiting further data evaluation due to .init(pass: peek), immediately on demand. Thanks.
Posted Last updated
.
Post not yet marked as solved
0 Replies
73 Views
OS Version: MacOS Monterey Version 12.7.4 (21H1123) This is happening for a while, I tried to replace mouse battery but the issue is same. Both external mouse and trackpad stops working for some seconds. I don't know what is causing this issue. Need help, I know I can switch off the trackpad if external mouse is in use, but I don't want to do that, cause I use both at the depending on my work.
Posted Last updated
.
Post not yet marked as solved
3 Replies
105 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
185 Views
SMAppService.statusForLegacyPlist() stops working in macOS Sonoma 14.5 beta. It always returns .notFound even if the service is installed, runs and the main app is able to connect it through XPC. It used to work fine before. The service LaunchDaemons plist contains the following keys: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>AssociatedBundleIdentifiers</key> <string>xxxx</string> <key>KeepAlive</key> <true/> <key>Label</key> <string>xxxx.helper</string> <key>MachServices</key> <dict> <key>xxxx.helper.xpc</key> <true/> <key>xxxx.helper.xpcgate</key> <true/> </dict> <key>ProgramArguments</key> <array> <string>/Library/Application Support/yyyy/xxxx/zzzz/xxxx.helper</string> </array> </dict> </plist> Is this a bug in the beta version of Mac OS or a deliberate change that requires some kind of response from our side? Thanks in advance, Aleksandr Skobelev
Posted
by ilowry.
Last updated
.
Post not yet marked as solved
1 Replies
1.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
0 Replies
65 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
50 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
215 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
118 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
2 Replies
253 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
264 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
103 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
94 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
.