Post

Replies

Boosts

Views

Activity

Instruments not starting in specified working directory
Instruments is not honouring the working directory that I have specified in the target. It invokes the executable with the specified argument, but the working directory is root! (). Needless to say this causes problems with my app. Changing the directory within the app doesn't work either. I have granted Instruments Full Disk Access rights within the Security and Privacy settings, but that makes no difference. As a workaround, I attach to the already running process, but I'd like to know if this is a bug or if there is a trick to do this. XCode 13.1 and macOS 12.0.1. Note that I had to codesign the executable to over come the "Failed to Get Authorization" error. See https://developer.apple.com/forums/thread/681687. Thanks, Stew
2
1
979
Mar ’23
vtool -set-build-version error: mkstemp: No such file or directory
I'm trying to overcome a problem by changing the build versions within some third party dylibs. See https://developer.apple.com/forums/thread/726412. However, I'm getting an error when I run the command: vtool -set-build-version macos 12.0 12.0 -replace -output "/Volumes/Data/Projects/MyApp/Pharo/Builds/1.0.0/Bundle/intel64/MyApp.app/Contents/MacOS/PluginsFixed/libUnixOSProcessPlugin.dylib" "/Volumes/Data/Projects/MyApp/Pharo/Builds/1.0.0/Bundle/intel64/MyApp.app/Contents/MacOS/Plugins/libUnixOSProcessPlugin.dylib" The error is: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/vtool error: mkstemp: No such file or directory. It looks like it is failing when creating a temporary file, so maybe it is a configuration problem? This is my last hurdle with the whole notarization, codesigning journery, and any help is very much appreciated!
4
0
1.1k
Mar ’23
How to use vtool to change LC_VERSION_MIN_MACOSX to LC_BUILD_VERSION?
I've discovered that some of my third party intel dylibs are using the old LC_VERSION_MIN_MACOSX, which I'm pretty sure are causing library loading problems. My reasoning is that the arm versions all use the new format and works. The intel version works without signing and notarisation, but not when signed and notarised. See: https://developer.apple.com/forums/thread/127450 "The LC_VERSION family of load commands are no longer emitted when targeting the latest versions of the operating systems. Those commands are superseded by LC_BUILD_VERSION." https://developer.apple.com/forums/thread/659964 Just wondering what the incantation is to change from the old to the new so that: myThirdPartyPlugin.dylib: Load command 8    cmd LC_VERSION_MIN_MACOSX  cmdsize 16  version 10.7    sdk 10.15.4 becomes something like: myThirdPartyPlugin.dylib: Load command 8    cmd LC_BUILD_VERSION  cmdsize 32  platform MACOS   minos 12.0    sdk 12.3   ntools 1    tool LD  version 820.1 Thanks in advance for your time and response. Stew
2
0
1.3k
Mar ’23
Codesigned and notorized app won't open unless dragged to another folder. Why?
Hi, I'm at the the end of the whole codesign, notorize, staple deployment journey and testing the installation of my app that I've downloaded from Google Drive. It is a zip file that contains just the app. When I double click to open, I get the "My App" is an app downloaded from the internet....prompt. It says it has checked it for malicious software and none has been detected. When I click on Open, the app runs but the UI doesn't present - no windows are open. Quit doesn't work, I have to Force Quit. If I drag it to another folder it opens OK. I realise that most third party apps have DMG installer, so the user has to drag the app as a matter of course, but I like the simplicity of using a .zip file. I'd appreciate if someone could explain why this is happening (even after the user has granted approval to open) and if there is a way to open the app directly from where it has been downloaded to? Thanks, Stewart
2
0
817
Mar ’23
How to remove firewall permission programmatically?
Hi, For testing my app, I'd like to be able to use a utility to remove the user granted incoming connection permission. System Permissions > Security & Privacy > Firewall > Firewall Options.... I use tccutil reset SERVICE [BUNDLE_ID] to reset the Privacy Permissions, and I'm hoping there is a similar utility for the firewall permissions. Please let me know if there is a way to do this?
0
1
440
Mar ’23
Accessibility permission for app launched using a "Trampoline" is created on the Trampoline, not the app. Wondering why?
In order to be able to pass arguments to my executable (and avoid using a problematic script) I have adopted the "Trampoline" approach as suggested here: https://developer.apple.com/forums/thread/720057?answerId=736527022#736527022 After resetting the Privacy permissions using tccutil, and running the app by double clicking it, the trampoline invokes the target executable using execve, as described: "Execve() overwrites the current process so that it executes the file in path with the arguments in argv, and the environment variables in envp. Execve() does not return unless it encounters an error, such as the file in "path" not existing, or not being an executable file." The app launches as expected - it appears in the Activity Monitor correctly, however once the User Accessibility prompt is encountered and the Security settings opened, the newly created entry is the Trampline executable, not the .app. (along with an Exec icon, not the app icon). It still works fine, though. Confusingly, responding to the Apple Event prompt, which is also presented, creates an entry with the app name and Icon, as expected. I'm wondering if this can be explained, and perhaps remedied so that the app and Icon appear as expected in the Accessibility section of S&P settings?
1
0
803
Mar ’23
CGEventPostToPid not posting to background app's open dialog
Previously, I have used CGEventPost to post events to another application (Logic) which works provided it is in focus. (Please see https://developer.apple.com/forums/thread/724603?page=1#744466022). I'm actually sending events to a dialog that I've opened via OSC, which causes Logic to "bounce" in the dock indicating that the user needs to respond to the dialog. As I'm getting some "flashing" due to focus switching, I've tried using CGEventPostToPid to post to the application directly. The theory is that it no longer needs to be in focus, so will obviate the need for focus switching. Unfortunately this doesn't work. I still need to bring Logic into focus for the dialog to respond to the sent events. I can see that the main window of Logic has lost focus, which implies that, from its point of view the dialog has focus - I would have thought that it would respond to the background event posts. Any pointers on how to get this to work appreciated. Just wondering if I need to send events directly to the dialog window somehow? Note that I'm doing this to work around a positioning bug in the OSC interface when songs have mixed time signatures. Thanks, Stew
0
0
975
Feb ’23
CgEvent post works from command line, but not from app on development machine
Hi, M1 - Mac OS 12.0.1. I am simulating keyboard events targeted to Logic Pro by posting CgEvents. This works when I launch my app executing the script that is set as the executable for the app within the info.plist (CFBundleExecutable) on the command line, but not when I double click on the app to open it. I have enabled the app within Privacy & Security > Accessibility > MyApp.app. I've also deleted the accessibility setting, and the app, rebuilt and reenabled to no effect. In contrast, as the app uses the network, if I enable the Firewall, I'll get an Allow Request. If I disable the Firewall, the Allow Request doesn't show. I realise that to ship I need to do the code sign/notarize dance, but I'd expect to get a similar prompt as per the Firewall permissions when running on my development machine, and be able to authorise the sending of keystrokes. Any help very much appreciated! Thanks, Stew
9
0
1.9k
Feb ’23
Logic Pro Position Playhead Controller Assignment Bug?
Hi, I have been experimenting with positioning the play head by using a control assignment with: Class=Global Parameter=Playhead (Beats) Part=Bar Value Change=BF 6B Lo7 Format=Sign Magnitude Mode=Relative. I test this by using sendmidi command: (a command line utility for sending midi): sendmidi dev '<IAC Device Name Here'> hex raw BF 6B 10 This works fine to jump 16 bars. However, if I change it to Direct mode, it should go to bar 16. Instead, it jumps to -8 1 1 1, regardless of the value I send it. Other absolute positioning such as Left Locator doesn't work either. Is this a bug? (Apple M1, Monterey)
0
0
875
May ’22