macOS is the operating system for Mac.

Posts under macOS tag

200 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Having error alert when ./configure curl in a folder with an ".app" extension since macOS 14
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.
0
0
234
Apr ’24
Ambiguous "Apple Developer" certificate for macOS
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.
3
0
599
Apr ’24
Shared directories configuration not running on macOS virtual machine
When using the sample code included on the Running macOS in a virtual machine on Apple silicon. I am adding the following changes to the swift files: Added to 'MacOSVirtualMachineConfigurationHelper' file: static func createAutomountSingleDirectoryShareDeviceConfiguration() -> VZVirtioFileSystemDeviceConfiguration { let sharedDirectory = VZSharedDirectory(url: directoryURL, readOnly: false) let singleDirectoryShare = VZSingleDirectoryShare(directory: sharedDirectory) // Assign the automount tag to this share. macOS shares automounted directories automatically under /Volumes in the guest. let sharingConfiguration = VZVirtioFileSystemDeviceConfiguration(tag: VZVirtioFileSystemDeviceConfiguration.macOSGuestAutomountTag) sharingConfiguration.share = singleDirectoryShare return sharingConfiguration } Added to 'path' file: let directoryURL = URL(fileURLWithPath: NSHomeDirectory() + "Projects") Added to the 'AppDelegate' file: virtualMachineConfiguration.directorySharingDevices = [MacOSVirtualMachineConfigurationHelper.createAutomountSingleDirectoryShareDeviceConfiguration()] When the above is added and the sample app is run, the following error is shown: macOSVirtualMachineSampleApp/AppDelegate.swift:95: Fatal error: Virtual machine failed to start with Error Domain=VZErrorDomain Code=2 "A directory sharing device configuration is invalid." UserInfo={NSLocalizedFailure=Invalid virtual machine configuration., NSLocalizedFailureReason=A directory sharing device configuration is invalid., NSUnderlyingError=0x600000c343c0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}} On the host device the directory that is being shared is ~/Projects and it does exist. What do I need to change to create the shared directory and have it work? Is there a sample code project for the same configuration that was shown in the demo?
2
0
465
Apr ’24
App transfer with Developer ID
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.
7
0
680
Apr ’24
Thread stack region size is quite large than usual
After enabling the signal alternative stack using sigaltstack, the thread stack region size comes to be 128 MB. The stack region size is only 8 MB without enabling the signal alternative stack. (get by calling the mach_vm_region_recurse function) It only happens on macOS 14 or later, and M series silicon. The growth of the stack region size results in a too-large minidump file when we generate a crash report using Google's crashpad library. Could anybody tell me why the size has increased so much? And is there a way to work around it?
2
0
348
Apr ’24
MacOS Reset Passcode not working- Urgent
I have tried to deploy passwordpolicy script using pwpolicy pwpolicy -n /Local/Default -setglobalpolicy "usingHistory=5 canModifyPasswordforSelf=1 maxMinutesUntilChangePassword=129600 requiresAlpha=1 requiresNumeric=1 minChars=8 passwordCannotBeName=1 requiresMixedCase=1 requiresSymbol=1" sudo defaults write /Library/Preferences/com.apple.loginwindow PasswordExpirationDays 14 errcode=$? if [ "$errcode" -ne 0 ]; then echo "" echo "Failed to apply with errorcode $errcode" 1>&2 echo "" exit 1 fi echo "Password Policy applied successfully" 1>&2 After deploying, on next login, It prompted for login, On entering password, It shows wrong password. When I tried to reset the password, It is not accepting the password. Instead It prompts again and again. Like this , I have got 300 mac machines struck in login page. I tried to run these two commands via a app running in root pwpolicy -u "$user" -clearaccountpolicies pwpolicy -clearaccountpolicies After Running this, I can able to loggin for first time. When tried to login second or successive times, It is failing with wrong password or sometimes no error instead of a jumping prompt in password page. When tried to change password after a login after clearpolicy command, It is not accepting the admin's password (Which was used to login the current session). Please help on this issue. As it does have a serious impact.
0
0
408
Apr ’24
New user template on current macOS versions
We'd like to use a custom setup for our new students via a modified User Template folder. On macOS 14 the new user template is located at /Library/User Template/Non_localized I can add e.g. another folder here (as "root"): drwxr-xr-x 2 root wheel 64 8 Apr 13:58 newFolder And when a new user is created this folder is added to users homedir, as expected. But this folder has an additional unexpected ACL: $ ls -lde newFolder drwx------+ 2 newuser staff 64 8 Apr 13:59 newFolder 0: group:everyone deny delete Is there any documentation about the user template handling for current macOS versions? We are specially interested in How are ACLs added Predefining standard preferences (e.g. connected servers are visible on desktop) Ayn clue here?
0
0
249
Apr ’24
Problems importing iPhones’ medias into macOS’ Photos app via USB cables.
With USB cable connection (no cloud) to import from updated iPhones (11 Pro Max, 12 mini, and 13 with their updated iOSes) into updated macOSes (Ventura v13.x, Big Sur v10.11.x, and Mojave v10.14.x)'s Photos app, I noticed imports show already imported medias and missing brand new medias. Others and I noticed this problem in our multiple macOSes with iPhones: https://discussions.apple.com/thread/255565285 and https://talk.tidbits.com/t/does-anyone-have-problems-importing-iphones-medias-into-macos-photos-app/27406/. Thank you for reading and hopefully answering soon. :)
0
0
355
Apr ’24
Changing Accessibility Settings from Within a Script
Hello, Recently, I've been hacking at trying to find a way for the colors of the system cursor to be changed via an executable (in particular, I'm trying to get them to match the foreground/background colors chosen by wal.) In my most recent investigation, I've located the relevant setting in ~/Library/Preferences/com.apple.universalaccess (which is a wierd place for it to be, but w/e) and attempted to change it via defaults write. This immediately caused all my GUI apps including Finder to crash repeatedly until I went into recovery mode and deleted the changed file. My next direction in this quandary, then, is to make an application that asks for the relevant Accessibility settings (via the standard prompt that I often see) and upon being granted proper permission, is able to make the modifications without breaking the system. Is anyone able to point me towards the documentation for such functionality, if it's possible? Preferably some kind of C or shell interface.
0
0
352
Apr ’24
macOS undo sometimes called multiple times
I've a non-document based single window (mostly) SwiftUI app. In my observable app state class an undo manager is defined and changes are registered using that manager. This has not been a problem in the past. But now... 1st is a bug reported in FB13708788. I've replaced the macOS undo/redo with code that references the UndoManager I created. The menu does not reflect the current undo status. This is easily duplicated in a small app submitted with the feedback. 2nd issue is hit or miss. Sometimes selecting Undo via the menu or the keyboard invokes undo multiple times. This is rare when running the app, but it has happened. On the other hand undo is always invoked multiple times when running an XCUITests. A little logging shows the invocations are quite close together. Undo invoked at 2024-04-05 13:14:19.975570-0700 Undo invoked at 2024-04-05 13:14:19.975768-0700 Calls were only 198 microsec apart. The test makes a change, makes a second change, then tried to undo the second change. Both changes are undone. But not (usually) if I perform the exact steps by hand instead of as an XCTest. Any ideas on how I might track down the cause? Mac Studio M2 Max running 14.4.1.
0
0
389
Apr ’24
Open Recent menu stopped working in my doc-based Mac app
Recently, when I open a document in my app, it just adds a blank line to the Open Recent submenu. Attempting to select that line produces an error alert saying "The document “(null)” could not be opened. The file doesn’t exist." However, the document does appear in the global Recent Items menu. I tried rebooting. I'm not subclassing NSDocumentController or doing anything weird about opening files. Ideas? P.S. I tried logging in to a different account, and tried changing the bundle ID. Neither helped.
1
0
436
Apr ’24
MacOS "Made for iPad" builds are not being updated by Xcode
I suddenly noticed that changes I made in code had no effect on the app when I rebuilt it and ran it on my M1 Mac as a "made for iPad" target. The debugger will even stop on new lines and seem to execute them, but they do nothing. If I clean the build folder and re-run, the same line executes as expected. This wastes an incredible amount of time until you discover what's happening. Now I have to remember to clean build folder every time I build and run. The application's structure is very simple, with no included libraries or third-party dependencies. Anybody else seeing this? Xcode 15.3 under Sonoma (14.4.1).
0
0
313
Apr ’24
iPad app on Mac - Fix window aspect ratio
I'm developing an app that works on iOS and iPadOS in Portrait mode only. I'd like it to be able to run on Apple Silicon Macs as well, but when I try running it on my Mac, the application screen it resizable to any size and any aspect ratio. (Oddly, it works fine in visionOS, where the window can be made bigger or smaller but always maintains a portrait aspect ration.) Is there some way I can have the aspect ration fixed when the app runs on macOS? Thanks!
1
0
351
Apr ’24