nspreferencepane

Using Swift with an OS X Preference Pane plugin

我们两清 提交于 2019-12-30 04:11:08
问题 I'd like to use Swift to build an OS X Preference Pane plugin for the System Preferences app, but I can't get it to work. After clicking "Next" the Xcode template doesn't offer an option to choose Swift as a language, but automatically creates the project in Objective-C. Without adding any code or doing anything else, the project builds successfully. If you right-click on the Product and select "Open in External Editor", System Preferences will successfully install and load the preference

Debug System Pref Pane w/10.15 and System Integrity Protection

六月ゝ 毕业季﹏ 提交于 2019-12-11 14:46:18
问题 In the past, I have been able to run/debug a self-developed Preference Pane in System Preferences by self-signing a copy of the System Preferences app, and setting it as the run target in Xcode. A symbolic link is placed in ~/Library/PreferencePanes that points to the output prefPane built by Xcode and everything works... at least it used to under 10.11 through 10.14. See: Debug System Pref Pane w/10.11 and System Integrity Protection Under 10.15 this breaks. While the prefPane properly loads

Why does my Preference Pane seem to think it's always the wrong architecture?

允我心安 提交于 2019-12-08 18:04:56
问题 This has worked just fine for a long time. As far as I can tell from the diffs I haven't changed anything... but I'm not 100% sure. All I know is that now my preference pane shows this error when I try to open it: When I press OK, it restarts and shows the same dialog. This continues ad nauseam. I checked the binary with file and it confirms that it's a 64-bit executable: is-mbp-bleggiero:MacOS bleggiero$ file My\ App\ Preferences My App Preferences: Mach-O 64-bit bundle x86_64 This is...

Using Swift with an OS X Preference Pane plugin

隐身守侯 提交于 2019-11-30 12:14:31
I'd like to use Swift to build an OS X Preference Pane plugin for the System Preferences app, but I can't get it to work. After clicking "Next" the Xcode template doesn't offer an option to choose Swift as a language, but automatically creates the project in Objective-C. Without adding any code or doing anything else, the project builds successfully. If you right-click on the Product and select "Open in External Editor", System Preferences will successfully install and load the preference pane. It just works! Well that's great, but now, I want to add a new Cocoa subclass using Swift. Accepting