You can have Safari automatically check for updates to your extension and offer to download and install an update when one becomes available.
To enable automatic updates, create a text file with the .plist
file extension and put it on a web server, then include the URL of the file in the Update Manifest field of Extension Builder.
The .plist
file is XML with this basic structure:
<?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>com.yourCompany.safari.yourExtensionName</string> |
<key>Developer Identifier</key> |
<string>YourCertificateID</string> |
<key>CFBundleVersion</key> |
<string>Your current bundle version</string> |
<key>CFBundleShortVersionString</key> |
<string>Your current display version</string> |
<key>URL</key> |
<string>Your-.safariextz-URL</string> |
</dict> |
</array> |
</dict> |
</plist> |
Copy the structure, but replace the contents of the <string>
elements with the data for your extension, leaving all other elements exactly as shown.
If your Developer ID is shown in Extension Builder as:
Safari Developer: (12A345BCDE) you@yourmail.com
Then YourCertificateID
for the update manifest is: 12A345BCDE.
Your-.safariextz-URL
must be a valid URL to download the current version of your extension. Be sure your web server has the .safariextz
file extension associated with the MIME type application/octet-stream
. For more information, see “Putting Your Extension on a Web Server.”
If you have more than one extension, you can maintain a single update manifest for all of them. The form for multiple extensions is:
<?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>com.yourCompany.safari.firstExtensionName</string> |
... |
</dict> |
<dict> |
<key>CFBundleIdentifier</key> |
<string>com.yourCompany.safari.nextExtensionName</string> |
... |
</dict> |
</array> |
</dict> |
</plist> |
Include one <dict>
element inside the <array>
element for every extension.
Last updated: 2010-08-03