Mac - Launch desktop application from browser passing parameters

流过昼夜 提交于 2019-12-23 01:57:12

问题


I have written a click-once deployed application in .Net that runs on windows machines. I had a requirement to launch the application from a browser so that I can pass information to the application based on the current browser session (the HTTPHeadercontains a single-sign-on id that needs to be passed to the application so it can call secured web services).

So the click-once application is provided as a link on a jsp, and the required id is passed as a querystring parameter in the link, which the click once application can read).

Now I need to make similar functionality available for Mac users. Is there any way to do this that doesn't require Java? I would like to write in Objective C, but then the question of how to trigger the launch of the application from the browser, passing the necessarily information remains.

The flow is:

  1. User hits link to our site
  2. User is routed to single sign-on authentication form
  3. User submits form and is redirected to our site (with id embedded in HTTPHeader)
  4. Server builds page with a link to Click Once application with id appended as a querystring parameter
  5. User clicks link, click once deployed app is downloaded and executed with full trust on the users computer (the app is signed with a code signing cert).
  6. Application runs locally on users computer and calls RESTful web services on server passing the single-sign-on ID as a cookie along with the web request which allows the request to make it through.

I would appreciate any ideas that point me down the right path, as I am primarily a windows developer.

Thanks!


回答1:


I just saw your request to my original post on this topic.

The need for this was put on the back burner for a time, but the solution that we will probably pursue is to have a server-side process that modifies the delivered Zip or DMG file on-the-fly. The additional information would be inserted into the application's Info.plist file. This will not invalidate the cryptographic signature, and does not require anything additional to be downloaded.



来源:https://stackoverflow.com/questions/12080447/mac-launch-desktop-application-from-browser-passing-parameters

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!