Open app automatically at system startup in dock - macos

I have a MAC OS X application and I want to launch my app automatically in the dock when user opens his PC. I know a user can explicitly select an app to "alway open on startup" but what if user dont select that option. Thats why I want to do it automatically (myself) once he/she install my app. Later he can remove my app from launching at the startup though. Kindly suggest me some solution or guide me to the right path. Not very familiar with Mac development.
Thanks.

Take a look at Daemons and Services Programming Guide. What you are looking for is an agent.

Related

Installing MagicDraw “libjvm.dylib” cannot be opened because the developer cannot be verified on mac M2 pro

I installed MagicDraw 190_sp3 on my mac but it couldn't be opened. When I try to open it shows the error that the developer couldn't be verified. Can anyone help me in this regard, please?
Is your macOS showing an error alert like below?
If so, your app is not signed and notarized.
If you’re certain that an app you want to install is from a trustworthy source and hasn’t been tampered with, you can temporarily override your Mac security settings to open it.
If you still want to open an app for which the developer cannot be verified, open System Preferences. Go to Security & Privacy. Make sure Allowed apps downloaded from is set to App Store and identified developers. Click the Open Anyway button in the General pane to confirm your intent to open or install the app.
The warning prompt reappears, and if you're absolutely sure you want to open the app anyway, you can click Open.
The app is now saved as an exception to your security settings, and you can open it in the future by double-clicking it, just as you can any authorized app.
See this KB from apple for details
Thanks for your answer kakaiikaka.
I did all of those steps but it was still showing the problem, then I found out the problem was with my JDK version on my JVM. So, I installed JDK version 8 and again tried to open this and it worked as a charm!

Detect if application is installed on users Mac OS X from browser

How can I detect from a browser if an application is installed on a users Mac OS X.
I want to achieve, that if the user clicks the download button then if he has the application installed it downloads a specific file which can be opened with this application, and if the user don't have the application, then he is prompted that he needs to download the application first to view the actual file.
This link solved my question.
Thanks goes to Doug Stephen for providing the link, here:
Determine if an app exists and launch that app on iOS
This link was also helpful to move on with the parsing.

How to tell finder that my application is installed?

I am working on a cocoa application. I see a strange behaviour on Mac OS 10.6.8..!
My Cocoa application has an Automator action inside it. I want it to be listed in Automator as soon as I install it.
The conditions are as follows:
1. After installation, user should not go to the installed path.
2. User should not launch the application.
I mean, I am seeing this bug only for above mentioned situations. If I go to the installed folder, or launch the application, the automator app gets listed.
I didn't see this defect on Mac OS 10.7.5 or Mac OS 10.8.2..
Also I tried touch command via terminal just in case thinking that if any kind of Access updating is required and all. But that wasn't the case.
Any suggestions? Can I run any kind or Shell/Applescript while installing [After installation of the application] so that I can list the automator action in automator?
Any advice or help would be great!!
You can have a .txt file with the below script and then you have to add postflight script when taking .pkg file in Package Maker.
open "/Applications/yourAppName.app"
Try this Terminal command.
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister .../Whatever.app
You shouldn't hard-code the path, though, as users sometimes stick apps in weird locations (citation: I do it :).

Creating feature in mac app to override the users security setting

I'm a newbie at mac osx development. I would like to know if there's any way to override the mac desktop security settings to allow an application - which is not registered in the Mac App Store, to be installed?
The setting should come from the app that I'm trying to install. That means, whenever I install the app to any mac computer, regardless of its security settings as the following,
Allow applications downloaded from:
Mac App Store
Mac App Store and identified developers
Anywhere
The app should set the settings to Anywhere, allowing it to be installed.
Any help would be very much appreciated.
Launch System Preferences from the Apple menu.
Choose “Security & Privacy” and then click the “General” tab, followed by clicking the lock icon in the corner to unlock the settings.
Look for “Allow applications downloaded from:” and choose “Anywhere”.
Accept the security warning and allow.
Note that you should be careful and aware that now the job of protecting the system from malicious apps belongs to you instead of the OS.
Right click the (app) icon and click 'open' in contextual menu - no need to disable the OS security.
This is not possible. The existence of that setting is intended to protect users from malicious executables. If there were a way for any arbitrary executable to override that setting, what protection would it offer? Malicious executables would simply change the setting to "Anywhere" like you suggest, bypassing the security features of Mac OS X.
You need to sign your application using a Mac Developer certificate, which you can obtain from Apple. That will mark your app as built by an "identified developer" and it will launch just fine without changing any settings.
Control Click the app icon to override this security feature. This is a one off, you don't have to change your settings, you can do it per-app.
There is one other way...
All you have to do to do it manually is to open up Terminal, cd into the .app application, cd into the Contents folder, then cd into the MacOS folder, then type ./YourAppNameHere and execute by typing Enter.

bundle a jnlp so you can add to dock on a mac?

I want to be able to drag Findbugs to the Dock on my Mac.
The problem is it's a JNLP.
Is there a distilled idiots guide to creating an Mac application bundle from a JNLP?
I saw this article on the Apple website: http://developer.apple.com/library/mac/#documentation/Java/Conceptual/Java14Development/03-JavaDeployment/JavaDeployment.html
but it was a case of 'information overload'!
Quoting from the Java Web Start section of the linked article:
Mac OS X’s desktop integration with Java Web Start lets users can create a local application bundle from any Java Web Start application. The Shortcut Creation setting in Java Preferences controls whether the user is prompted to create an application bundle when opening a Java Web Start application. Bundled Java Web Start applications have all of the benefits of native application bundles, which are described in “Mac OS X Application Bundles.”
Try looking in Applications->Utilities->Java Preferences. Click on the Advanced tab. You should see the Shortcut Creation setting. Let us know if it works for you.

Resources