Updating Extensions

Your extension should provide a way for Safari to automatically check for updates 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 an XML file 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 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.