Post

Replies

Boosts

Views

Activity

Reply to Finder Sync Extension develop in macos 14.4 but crash in macos 10.15
I tried installing an older version of xcode on a 10.15 VM and created a simple finder sync extension. The comparison revealed an extra piece of information in the info.plist of the program compiled from the old xcode on 10.15 <?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> // ....... other ....... <key>NSPrincipalClass</key> <string>NSApplication</string> </dict> </plist> I tried to add this information to the info.plist file of the previous project and it worked fine with the lower version! Thanks for helping me troubleshoot and fix this!
2w
Reply to Finder Sync Extension develop in macos 14.4 but crash in macos 10.15
Below is the info.plist file content of the demo that can be reproduced, I see that there is NSExtensionPrincipalClass in it. Is it because there is a difference in the info.plist specification between the 10.15 system and the latest one? <?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>BuildMachineOSBuild</key> <string>23E214</string> <key>CFBundleDevelopmentRegion</key> <string>en</string> <key>CFBundleDisplayName</key> <string>finder</string> <key>CFBundleExecutable</key> <string>finder</string> <key>CFBundleIdentifier</key> <string>com.cxy-test.finder-test.finder</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>finder</string> <key>CFBundlePackageType</key> <string>XPC!</string> <key>CFBundleShortVersionString</key> <string>1.0</string> <key>CFBundleSupportedPlatforms</key> <array> <string>MacOSX</string> </array> <key>CFBundleVersion</key> <string>1</string> <key>DTCompiler</key> <string>com.apple.compilers.llvm.clang.1_0</string> <key>DTPlatformBuild</key> <string></string> <key>DTPlatformName</key> <string>macosx</string> <key>DTPlatformVersion</key> <string>14.5</string> <key>DTSDKBuild</key> <string>23F73</string> <key>DTSDKName</key> <string>macosx14.5</string> <key>DTXcode</key> <string>1540</string> <key>DTXcodeBuild</key> <string>15F31d</string> <key>LSMinimumSystemVersion</key> <string>10.15</string> <key>LSUIElement</key> <true/> <key>NSExtension</key> <dict> <key>NSExtensionAttributes</key> <dict/> <key>NSExtensionPointIdentifier</key> <string>com.apple.FinderSync</string> <key>NSExtensionPrincipalClass</key> <string>FinderSync</string> </dict> </dict> </plist>
3w
Reply to Finder Sync Extension develop in macos 14.4 but crash in macos 10.15
The symptom of failure is that the extension is active in the System Plugin Settings panel, but there is no expected response that the plugin has executed. For example, add the following sample code to the plugin - (instancetype)init { // Set up the directory we are syncing. self.myFolderURL = [NSURL fileURLWithPath:@"/"]; // ...... return self; } - (NSMenu *)menuForMenuKind:(FIMenuKind)whichMenu { NSMenu *menu = [[NSMenu alloc] initWithTitle:@""]; [menu addItemWithTitle:@"Test" action:@selector(testAction:) keyEquivalent:@""]; return menu; } This method expects the finder's file context menu to have an extra option "Test", which is fine on macOS 14, but when I packaged the program for 10.15 no option appeared. I don't know how to know if the plugin is currently activated or running. So I'll try to try to see if it agrees with the normal situation by executing the plugin binary. (And it did run differently than the normal situation) This problem was able to be reproduced even with the simplest demo I could find, but unfortunately I can't upload the zip file of the project here. I can briefly describe how to build this simple demo: In MacOS 14.4 Create a new app project using the following parameters Add a new Target and select Add Finder Sync Extension, using the following parameters Use the default code, or change it to the above code. Modify the minimum supported MacOS version to 10.15. Compile and run it in macOS 14.4 (remember to activate the extension in the Extensions panel of the System Settings), you can see that the plugin is working properly! Compile the program in macOS 14.4, send it to macOS 10.15 and run the program. Activate the extension in the Extensions panel of the System Settings, but at this point you will see that the extension is not working, even though you activated the extension.
May ’24