Updating a Safari Extension?
Asked Answered
B

4

9

I'm writing a simple Safari Extension, and I'm trying to figure out how to get the update mechanism working. Apple's documentation here is delightfully vague:

https://developer.apple.com/library/archive/documentation/Tools/Conceptual/SafariExtensionGuide/UpdatingExtensions/UpdatingExtensions.html

And here's my manifest, based on that documentation:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Extension Updates</key>
    <array>
        <dict>
            <key>CFBundleIdentifier</key>
            <string>net.rickyromero.safari.shutup</string>
            <key>Team Identifier</key>
            <string>TMM5P68287</string>
            <key>CFBundleVersion</key>
            <string>1</string>
            <key>CFBundleShortVersionString</key>
            <string>1.0</string>
            <key>URL</key>
            <string>http://rickyromero.net/misc/SafariExtensions/ShutUp.safariextz</string>
        </dict>
    </array>
</dict>
</plist>

I don't know where to get "YourCertifcateID," for example. And when I increment the values for CFBundleVersion and CFBundleShortVersionString, it doesn't trigger an update. I know Safari is hitting my manifest though, because I'm watching HTTP traffic.

Burkhart answered 9/6, 2010 at 19:33 Comment(0)
C
6

Team Identifier should be Developer Identifier

The Developer Identifier is taken from the string at the top of the Extension Builder window, Safari Developer: (DEVELOPER_IDENTIFIER) EMAIL

Casern answered 9/6, 2010 at 22:59 Comment(5)
Just tried changing that, but unfortunately it didn't do it... It still doesn't prompt to update when I increment the version number.Burkhart
Here's the my manifest, which does seem to work matsadler.github.com/deanimator/updates.plist The Developer Identifier is taken from the string at the top of the Extension Builder window, Safari Developer: (DEVELOPER_IDENTIFIER) EMAIL The other thing I tried was opening the file with Property List Editor.app to check it's a valid .plist, although that doesn't seem to be a problem for you.Casern
Alright, thanks for your help. I examined it a little more closely and my identifiers weren't matching up... Should work just fine now. :-)Burkhart
/me files a documentation bug report…Cowgill
Hi, Where you would mention this*.plist file(aml file used to update the safari extension) URL in safari Extension? Do we mention in info.plist file?Embow
B
1

Similar issue. Safari sees the update (I have set updates to manual) but clicking the install button when an update is detected does nothing. If I then check the "Install Updates Automatically" the update process begins and completes but the new version is not installed. I can see the traffic to the webserver so I know a request has been made.

EDIT: Fixed! Permissions were wrong on the web directory where the extension was stored, fixed this and it installed manually and automatically. Everytime I rebuild the extension and save to my web serving folder I have to set the permissions.

2nd Edit: If you want to look at an existing extension, download it or get it from your Safari extensions folder then change the .safariextz to .xar then open/extract with Pacifist to view the code and if you want add it to the Extension Builder app.

Ballonet answered 10/6, 2010 at 11:8 Comment(0)
Z
1

I had the same problem, the PLIST file was like the one above and here is how I resolved my problem:

  • Had an incorrect Developer Identifier (had a 5 instead of a Z). Duh!
  • Permissions, which are rest every time you update the file:

    chmod 0444 EXTENSIONNAME.safariextz

Zinciferous answered 19/7, 2010 at 15:7 Comment(0)
S
0

Just had the same problem, and permissions were the issue for me, too. The .safariextz file downloaded fine via a direct link on my homepage, but I had to set its permissions to a+x on the server before Safari would download it as an automatic update.

Sphagnum answered 25/7, 2012 at 17:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.