Skip to main content

Hi,

I'm trying to experiment with deploying Safari web apps to other devices for an IT environment.

I can create a package of a Safari web app on my personal MacBook, and repeatedly deploy the package to my personal MacBook without issue. The Safari web apps are typically installed to ~/Applications, but I can install to the system /Applications folder, or even to a place like the user desktop, and it will work. The app will also work for different users on my personal MacBook.

When I install the package to another computer, there is a pop up saying that says "You can't open the application because it may be damaged or incomplete."

Are Safari web apps hard locked to a device, from something like associating the web app with hardware identifiers? Could changing the web app or an associated plist with the web app via a script resolve this issue, or do web apps have to be manually created per user? Or more importantly, does anyone know if Jamf will support creation of Safari web apps via Jamf Pro in a later version?

no idea.. but.. dig out Composer.. do a snapshot.. make the Safari web app.. see what gets created..  I expect its creating some linked sandbox in the user space.. ~/Library  ??

Interesting, but 'the why' is more of a question.. this overhead vs a bookmark ?


no idea.. but.. dig out Composer.. do a snapshot.. make the Safari web app.. see what gets created..  I expect its creating some linked sandbox in the user space.. ~/Library  ??

Interesting, but 'the why' is more of a question.. this overhead vs a bookmark ?


I work at a school. We disable the GPU in Google Chrome (we do cloud management of Chrome) because it interferes with teachers' ability to use the video projection setup reliably. However, teachers have some websites where they need OpenGL and GPU acceleration, like Google Jamboard. The goal is to make Safari web apps on the dock for teachers that need certain websites, to streamline the end-user experience.

 

I never thought to use Composer to track files, I'll report back.


I work at a school. We disable the GPU in Google Chrome (we do cloud management of Chrome) because it interferes with teachers' ability to use the video projection setup reliably. However, teachers have some websites where they need OpenGL and GPU acceleration, like Google Jamboard. The goal is to make Safari web apps on the dock for teachers that need certain websites, to streamline the end-user experience.

 

I never thought to use Composer to track files, I'll report back.


erm https://arstechnica.com/gadgets/2023/09/5000-google-jamboard-dies-in-2024-cloud-based-apps-will-stop-working-too/


erm https://arstechnica.com/gadgets/2023/09/5000-google-jamboard-dies-in-2024-cloud-based-apps-will-stop-working-too/


I mean there are other things beyond just Jamboard, we're trying to figure out a good compromise for any app that needs GPU acceleration, but yeah that's been on my radar. Doesn't change the staff wanting to use it, sadly.


The easiest way to know if this is possible is to copy one of the apps to another Mac and try it. The apps are stored in your user account's home folder in /Applications. If you right-click one you can view its contents. It's structured like a normal app. There's not much in there though.


If you're trying to open a specific web browser with a specific link, and then add it to the Dock for users, how about AppleScript?

You can create a deployable app, package it, and then add a Dock Item payload.

 

 


I know this is an old thread but I was recently encountering this issue when trying to copy Safari Web apps from one of my Macs to another.  I found the necessary files to copy over to prevent the "You can't open the application because it may be damaged or incomplete." error message so wanted to document it for future reference for others that might be trying to figure this out.

Using Composer I created a new package using Snapshot > Monitor File System Changes while creating a new Safari Web App (in Safari go to File > Add to Dock...).

 

Looking at the results of what Composer generated, I found that you need to copy the following items to get a Web App to work on another Mac.

  • /Users/username/Applications/WebAppName.app
  • /Users/username/Application Support/com.apple.LaunchServicesTemplateApp.dv/HashesV1/WEBAPPNAMEUUID.plist


WEBAPPNAMEUUID is found by looking in the Info.plist located in the application bundle for the Web App in question (/Users/username/Applications/WebAppName.app/Contents/Info.plist).


Are you encountering any permissions issues when trying to copy over the .plist? Additionally, are you taking your username out of the path in the .plist?  <string>file:///Users/username/Applications/WebApp.app/</string>


In my specific case this was for my own use to copy many web apps from my iMac to my MacBook Pro so I didn’t need to change the path or permissions.

If you were going to do this for other users you would need to change the pathname and owner of the WebAppName.app and WEBAPPNAMEUUID.plist if you were trying to copy them to a different user’s home directory.  And if you are doing that for many users on many machines you will likely want to script that process of detecting username for your path and ownership.

I also just double-checked the contents of the WEBAPPNAMEUUID.plist and it looks like there is one key you would need to adjust in that plist to match the path to the location of the WebAppName.app.  See the example below:

	<key>url</key>
<string>file:///Users/username/Applications/WebAppName.app/</string>

You may also want to test whether or not these could be placed in a user agnostic location like /Applications/WebAppName.app and /Library/Application Support/com.apple.LaunchServicesTemplateApp.dv/HashesV1/WEBAPPNAMEUUID.plist.  If that method works it would be much less work since you wouldn’t need to script getting the currently logged in user’s username.


I previously attempted to create a .pkg that put the .app and .plist files in /private/tmp/ and then moved them to the appropriate user locations via a postinstall script. However, the script consistently failed to move the .plist file. I tried generating the .plist via a cat command as well, but encountered the same issue. My assumption is that it’s a permissions issue. I’ll try to put the files in a user agnostic location today and see how that goes. Thanks for the find on the .plist portion.

#!/bin/sh
## postinstall

# Get Current User
currentUser=`stat -f%Su /dev/console`

# Move PWA Application
mv "/private/var/tmp/WebApp.app" "/Users/$currentUser/Applications/"
mv "/private/var/tmp/CC0F99F6-051A-4B1E-A99D-30EA5131CBB5.plist" "/Users/$currentUser/Library/Application Support/com.apple.LaunchServicesTemplateApp.dv/HashesV1/"