SafariExtensions icon indicating copy to clipboard operation
SafariExtensions copied to clipboard

FB11795767 - Regression: Ventura Safari no longer find higher version extensions outside the Applications folder

Open lapcat opened this issue 2 years ago • 0 comments

macOS 13.0.1 (22A400) and Safari 16.1 (18614.2.9.1.12)

When developing a Safari extension locally, I build and run from Xcode, and if the version number of the built extension is higher than the version number of the extension installed from the App Store in the /Applications folder, then Safari will find the build Xcode version on launch. This has worked great for years, with both Safari web extensions and Safari app extensions, up through and including Monterey. However, it stopped working on Ventura. On Ventura, if I build the extension in Xcode, Safari finds the extension just fine if there's no version of it installed in /Applications. However, if there is a version of the extension installed in /Applications, then Safari won't find a version outside of /Applications, even if the other version has a higher version number. This makes Safari extension development a lot more difficult. See the attached screenshot, where Safari only finds version 1.0, even though version 2.0 (bundle version 2, and 2.0 in the manifest) was run from Xcode. Screenshot 2022-11-16 at 8 42 11 AM

You can test with the Apple sample code extension Sea Creator: https://developer.apple.com/documentation/safariservices/safari_web_extensions/developing_a_safari_web_extension (By the way, I had to change the bundle identifiers slightly to get code signing to work right. The bundle id of the extension needs to be a suffix of the containing app's bundle id. Not sure why it's wrong in the sample project.)

When I called "pluginkit -m -ADv" from Terminal, I saw both versions of my extension, so pluginkit has registered them both, but Safari is finding the wrong one.

com.example.apple-samplecode.Sea-Creator.Extension(1.0) BA3BE037-A7BD-4B0E-B0D5-9D81629A5B41 2022-11-16 14:39:15 +0000 /Applications/Sea Creator.app/Contents/PlugIns/Sea Creator Extension.appex
com.example.apple-samplecode.Sea-Creator.Extension(2.0) 112AEBE0-71F8-40A6-8A08-BF2061B1C415 2022-11-16 14:40:41 +0000 /Users/thebody/Library/Developer/Xcode/DerivedData/Sea_Creator-fxnxkacqodgmlkewgenklyhqipst/Build/Products/Debug/Sea Creator.app/Contents/PlugIns/Sea Creator Extension.appex

lapcat avatar Dec 26 '22 20:12 lapcat