macOS is the operating system for Mac.

macOS Documentation

Posts under macOS tag

1,438 Posts
Sort by:
Post marked as solved
5 Replies
2.5k Views
Hi there, I have two extension in my App, a Finder Sync and a Share Extension. Because these are disabled by default and automatically enabling them is, according to my extensive research, not possible, I want to provide an easy way for the user to enable the extensions when the app is opened. I am currently displaying a popup, with a button to open the preferences. I have struggled with this a bit, by now I managed to open the main preferences window using NSWorkspace.shared.open(URL(string: "x-apple.systempreferences:com.apple.preference")!) which is rather suboptimal though, since the user has to select the extensions option manually and isn't directly redirected there. What I have also found is that the menu of the FinderSyncExtension can be opened directly by using FIFinderSyncController.showExtensionManagementInterface() which is unfortunately suboptimal as well, because it only shows the managment interface of the finder extension and not the overview of all extensions. Is there any way to either enable the extensions programatically, or if not, is there a way to show the "Added Extensions" portion of the Extensions menu in the system preferences?
Posted
by Elia314.
Last updated
.
Post not yet marked as solved
10 Replies
2.9k Views
I'm new to Xcode cloud - working with a Mac OS app, build is working great. Now I am trying to add a Test action; the testing target builds but won't run, and the error indicates it can't find the testing bundle in the expected build output. There's also mention of a code signing error, but I have automatic code signing enabled with the same settings on test target as the app. I am only running the unit test (XCTest) scheme, not the UI tests. When I run it locally from the IDE it works fine, either selecting the test scheme explicitly or as the test step of the app scheme. I notice the XCTest target's scheme setup uses Debug builds and expects the test output to be in the Debug .app bundle, I thought perhaps that was the problem (in case only the release app bundle actually gets built in the Xcode Cloud environment). So I created a duplicate scheme and set the build targets to Release - again I can run this fine locally (after creating a release build), but it fails with the same error in Xcode cloud. I also tried changing the code signing certificate from "Development" to "Sign to run locally" to see if that made a difference, but I get the same error. (It's using my developer account Team, and "Automatically manage signing".) Can anyone relate the proper way to set up an XCTest scheme so that the tests will actually run in a Mac OS Xcode Cloud workflow? I'm using Xcode 14.0.1. Here's the full error output, with [AppName] and [TestTargetName] substituted for the actual: [AppName] (....) encountered an error (Failed to load the test bundle. If you believe this error represents a bug, please attach the result bundle at /Volumes/workspace/resultbundle.xcresult. (Underlying Error: The bundle “[TestTargetName]” couldn’t be loaded. The bundle couldn’t be loaded. Try reinstalling the bundle. dlopen(/Volumes/workspace/TestProducts/Debug/[AppName].app/Contents/PlugIns/[TestTargetName].xctest/Contents/MacOS/[TestTargetName], 0x0109): tried: '/Volumes/workspace/TestProducts/Debug/[TestTargetName]' (no such file), '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib/[TestTargetName]' (no such file), '/Volumes/workspace/TestProducts/Debug/[AppName].app/Contents/PlugIns/[TestTargetName].xctest/Contents/MacOS/[TestTargetName]' (code signature in <....> '/Volumes/workspace/TestProducts/Debug/[AppName].app/Contents/PlugIns/[TestTargetName].xctest/Contents/MacOS/[TestTargetName]' not valid for use in process: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)))) Thanks!
Posted
by ccorbell.
Last updated
.
Post not yet marked as solved
0 Replies
25 Views
Hello, I have an iOS app that is recording audio that is working fine on iPads/iPhones. It asks for microphone permission and after that recording works. I installed the same app on my M3 MacBook via TestFlight since iPad apps are supposed to work without a change that way. The app starts fine and everything, but it never asks for Microphone permission, so I can't record. Do I need to do something to make this happen (this is not macCatalyst, its running the arm64 iPhone binary on macOS) thanks
Posted
by uuuuuu.
Last updated
.
Post marked as solved
4 Replies
481 Views
I have an app group to share settings between a main app and a helper. This is accessed using [[NSUserDefaults alloc] initWithSuiteName: @"FDHC2KMZ6V.com.jwwalker.autopairs.suite"]. What's puzzling me is that if I go to Terminal and enter defaults read FDHC2KMZ6V.com.jwwalker.autopairs.suite it tells me that the domain does not exist. Is this a bug in the defaults tool, or is there some trick I'm missing?
Posted
by JWWalker.
Last updated
.
Post not yet marked as solved
0 Replies
85 Views
Apple Transporter.app report this issue: Asset validation failed (90237) The product archive package's signature is invalid. Ensure that it is signed with your "3rd Party Mac Developer Installer" certificate. In the post "https://developer.apple.com/forums/thread/680438" Quinn “The Eskimo!” reply: For the Mac App Store you need: Apple Development: TTT (or the older Mac Developer: TTT) for day-to-day development 3rd Party Mac Developer Installer: TTT for signing the installer package you submit to App Store Connect 3rd Party Mac Developer Application: TTT for signing the code inside that installer package In https://stackoverflow.com/questions/29039462/which-certificate-should-i-use-to-sign-my-mac-os-x-application" Apple Codesigning Certificate Types Mac App Distribution 3rd Party Mac Developer Application: Team Name Used to sign a Mac app before submitting it to the Mac App Store. Mac Installer Distribution 3rd Party Mac Developer Installer: Team Name Used to sign and submit a Mac Installer Package, containing your signed app, to the Mac App Store. Both Mac App Distribution and Mac App Distribution was added to Keychain Access: Picture 1: Xcode -> Preferences -> Account -> Manage Certificates show that "Mac Installer Distribution" is there: Picture 2: And "Mac Installer Distribution" is also shown in my "Account" -> Certificates, IDs & Profiles -> Certificates in developer.apple.com Picture 3: Is "3rd Party Mac Developer Installer" = "Mac Installer Distribution" missing somewhere ? What can I do to fix "Asset validation failed (90237)" in Apple Transporter.app ?
Posted
by Alain_B.
Last updated
.
Post marked as solved
1 Replies
137 Views
I am developing a File Provider Extension on Mac. I am confused about how the extendedAttributes property works. The property never seems to be populated with any extended attributes. I've tried setting some custom extended attributes on my documents in testing, but they are never populated in the itemTemplates that are produced in the extension. The dictionary that would hold the extended attributes always is empty. I began to think that it only supported Mac-created attributes such as com.apple.quarantine. I then tried importing some files that are 'quarantined' with this appropriate extended attribute but still have not seen this data appear in my extension either. Any clarity here with what I should be expecting or what I should try would be helpful.
Posted
by iMDB.
Last updated
.
Post not yet marked as solved
1 Replies
105 Views
Can someone update about the current state of the Automator app in macOS. Automator seems like a valuable tool for automating tasks on macOS but in the recent years I have noticed a growing emphasis on the Shortcuts app for automation. It would be great if you could clarify the following: • Current Status of Automator: Is there any official statement regarding the continued support of the Automator app in future macOS versions? • Future of Automator: Does Apple plan to introduce new features or updates for Automator in upcoming releases? • Indifference to Shortcuts App: From what I understand both the ‘Automator’ and the ‘Shortcuts’ app are used for creating workflows/shortcuts to automate tasks. What is it that Automator app has to offer which cannot be done using the Shortcuts app? assuming the continued support for the Automator app. Can all the automator workflows not be automated using the shortcuts app? I understand that Apple is constantly innovating and introducing new tools. However, clarity regarding the future of Automator would be helpful for users like myself. In addition, as a developer I wanted to offer some actions for my application in the Automator app, so that the user can make use of it to create some workflows. But from what I found in the apple documentation here, these action are created using the ‘Automator action’ Project type template in the xcode. However, in the current version of xcode 15, this project type seems to be missing. Does it indicate that apple no longer provides support for applications to create new automator action? If not, how can I provide automator actions for my xcode application?
Posted Last updated
.
Post not yet marked as solved
1 Replies
306 Views
I am wondering where the source code of ld-prime is on Github. There are references to it in the github for dyld, but I can't find it anywhere. I have a suspicion that it uses LLVM for linking. I'm looking out of curiosity to see if Apple is slowly closing down its compile toolchain and maybe learn how Apple sped up the linking stage.
Posted Last updated
.
Post marked as solved
1 Replies
126 Views
Hi, I'm developing an app using SwiftUI for both iOS and Mac OS and use onOpenURL to handle external links. However, this doesn't seem to work after switching to a single window app on Mac OS. This code works: WindowGroup { Text("Hi").onOpenURL { url in print("Open URL", url) } } But this doesn't: Window("My App", id: "my_app") { Text("Hi").onOpenURL { url in print("Open URL", url) } } Anyone knows a workaround? Thanks!
Posted Last updated
.
Post not yet marked as solved
0 Replies
109 Views
Hi everyone! We are wondering whether it's possible to have two macOS apps use the Voice Processing from Audio Engine at the same time, since we have had issues trying to do so. Specifically, our app seems to cut off the input stream from the other, only if it has Voice Processing enabled. We are developing a macOS app that records microphone input simultaneously with videoconference apps like Zoom. We are utilizing the Voice Processing from Audio Engine like in this sample: https://developer.apple.com/documentation/avfaudio/audio_engine/audio_units/using_voice_processing We have also noticed this behaviour in Safari recording audios with the Javascript Web Audio API, which also seems to use Voice Processing under the hood due to the Echo Cancellation. Any leads on this would be greatly appreciated! Thanks
Posted
by davidesq.
Last updated
.
Post not yet marked as solved
0 Replies
100 Views
I have an installation workflow that works by a user double clicking on the mpkg and going through the prompts to install some software. Within the postinstall of the mpkg, /usr/sbin/installer -pkg "path_to_pkg" -target / is done to install additional software. The software contained in the mpkg contains system extensions and installs without issue. The software contained in the pkg file also contains system extensions and a prompt with this message displayed. "XSoftware" is damaged and can't be opened. You should move it to the Trash This file was downloaded on an unknown date. This is causing issues with the system extension being installed from XSoftware. Curiously enough, when I run /usr/sbin/installer -pkg "path_to_pkg" -target / manually in a terminal window it works successfully and XSoftware is able to install the System Extensions and run properly. I've used the pkgutil --check-signature to check the notarization and signing and it looks correct. This is my dmg structure: dmg | mpkg data_folder | pkg Any suggestions or help would be greatly appreciated. I can provide more details if neccessary.
Posted
by pvf_c877.
Last updated
.
Post not yet marked as solved
1 Replies
121 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
105 Views
im using the m2 MacBook Air, and for some odd reason, according to this test: https://www.testufo.com google runs at 60 hz while safari runs at 30 hz. I havent found a fix to this, and would like to know one. thanks.
Posted
by khoaanngo.
Last updated
.
Post marked as solved
1 Replies
140 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
1 Replies
147 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
1 Replies
184 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
4 Replies
976 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
2 Replies
115 Views
To help with debugging on a customers machine, this terminal command records log entries for my app and writes 'em to disk. log stream --predicate 'process=="Sleep Aid"' --style compact &gt; ~/Desktop/Sleep\ Aid.log In my app I have a function that does something similar to the above with a NSTask, and then I ask the customer to repeat the action that causes the problem. However for one customer, the file is created, but apart from it saying it's being filter by process, nothing else is written. Is there some new security setting that can prevent an app from getting its own logging data, or in this case even prevent the customer from using terminal and the above command to get the log data? This is similar also. https://forums.developer.apple.com/forums/thread/743803 Or should I be filing a radar about a potential bug?
Posted
by rowlands.
Last updated
.
Post marked as solved
1 Replies
160 Views
I am trying to fetch static routes added on my mac machine by DHCP server. I am able to get DHCP info using SCDynamicStoreCopyDHCPInfo and then get DHCP options using DHCPInfoGetOptionData. However, I could not find any API that can help me parse the raw data returned by DHCPInfoGetOptionData. Since macOS is parsing and adding these static routes and also displaying them in AdditionalRoutes of service, is there any API available to developers to parse this raw data into destination, mask and gateway?
Posted Last updated
.