How can I skip code signing for development builds in Xcode?
As of Xcode 10, here is how to turn off code signing for a macOS app:
- Select your project in the project navigator.
- Select your app in the list of targets.
- Click “Build Settings”.
- Click “All”.
- Click “Levels”.
- Type “identity” into the search field.
- Click on the Code Signing Identity row, under the column for your app target (labeled “test” in my example). That cell of the table might appear empty.
- In the pop-up menu that appears, choose “Other…”.
- In the popover text box that appears, delete all text so the box is empty.
- Press return to dismiss the popover.
With this setting, Xcode will not sign your app target.
To turn the code signing off, go to your project and target "Build Settings", search for "Code Signing Identity" change its value to "Don't Code Sign" in both of them.
To make this effective you need to change this value in the Project and all of the Targets separately.
If someone uses CMake
(for multi-platform projects) to disable code signing for specific target I used this:
set_target_properties(MyAppTarget PROPERTIES XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "" OUTPUT_NAME "My nice application name" MACOSX_BUNDLE TRUE MACOSX_BUNDLE_BUNDLE_NAME "My nice application name" MACOSX_BUNDLE_INFO_PLIST path/to/Info.plist MACOSX_BUNDLE_BUNDLE_VERSION ${MY_APP_VERSION} MACOSX_BUNDLE_LONG_VERSION_STRING "My nice application name v${MY_APP_VERSION}" MACOSX_BUNDLE_SHORT_VERSION_STRING "${MY_APP_VERSION}" MACOSX_BUNDLE_GUI_IDENTIFIER "com.my.app" MACOSX_BUNDLE_COPYRIGHT "(C) 2019 My Company" MACOSX_RPATH TRUE MACOSX_FRAMEWORK_IDENTIFIER com.myapp.bundle.id XCODE_ATTRIBUTE_LD_RUNPATH_SEARCH_PATHS "@loader_path/Libraries" RESOURCE "${RESOURCE_FILES}" XCODE_ATTRIBUTE_ENABLE_HARDENED_RUNTIME TRUE XCODE_ATTRIBUTE_EXECUTABLE_NAME "exec_name" )