Relative Content

Tag Archive for macos

How do I start a gui app on mac with arguments?

I want to create a desktop icon in vscode that will open a text file in my journal that I use on a daily basis.
All I need to do is run the following command.
code –new-window “diary.txt”

Concerned with the M2 & M3 chips

I’m considering getting the macbook M2 or M3. But I’m concerned it’s not efficient for Data analysis and Data science especially that I ‘ll be using Database a lot. I also heard that M2 and above are still not supported by everyone.

“The application is not open anymore” when there’s background instance of app in form of daemon on MacOS

I’m trying to port my application to MacOS. The application consist of two parts: the first is client, which is simple GUI, the second one is server, which is responsible for IPC via unix sockets. I want to run server part as daemon (with root privileges), so I created plist file, placed it in /Library/LaunchDaemons/my.app.AppServer.plist and load it with launchctl. Inside plist file I launch my app as /Applications/MyApp.app/Contents/MacOS/myapp --server. Launching client (GUI) is just with no arguments. When I have launched daemon I can’t open my app in dock: The application "MyApp" is not open anymore appears. I found some info that it has to be managed through AppDelegate class with appropriate functions implementation. But I do not understand how to implement them the right way. Or maybe there’s another way to solve The application is not open anymore when try to open app from finder/dock? Thank you in advance for answering

search array with wild card and destroy matches

apple has decided to make a ._file.php for each one I edit. they are loaded from an array. that worked great till the files showed up at last update. now it goes haywire. need to remove all the .files from the array. I use the array_diff to remove the directory and readme files from the list. but need the . to be more dynamic.