I created a new Xcode Preference Pane project which I aim to run in the System Preference application. I have made one modification to the project's build settings:
I have a nib file and NSPreferencePane subclass, yet Xcode doesn't allow me to run the application (only build it, the Run option is disabled).
My environment specs:
Answer: A: Try booting to Safe Mode. That boot up takes minutes and clears caches and other things that may resolve your problem. A lot of times just boot to Safe Mode followed by normal boot resolves problems.
Quick Fixes for Mac System Preferences not respondingForce restart Mac. Delete Preferences plist file. Run Disk Utility First Aid. Restart Mac in Safe Mode.
With Xcode Schemes you can now do this very nicely. Edit the Run action of the scheme like so:
$USER_LIBRARY_DIR/PreferencePanes/$FULL_PRODUCT_NAME
cp -a "$TARGET_BUILD_DIR/$FULL_PRODUCT_NAME" "$USER_LIBRARY_DIR/PreferencePanes/"
Bingo. Run will now launch System preferences and go directly into your prefpane.
By default, schemes are per-user and thus you are probably excluding them from your repository, and even if not other users won't see them. Go to "Manage Schemes..." and mark the prefPane scheme as shared if you want others to get these settings.
NB: For some reason I seem to get random crashes when you launch the prefPane as an argument. Just turn off the argument and manually launch once - from then on you can use the argument again...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With