possibility of unified code-signing "build settings" for Sonoma14 and iPAD OS>=17 OS & iPAD

1) The situation in general: 1A) I begun USB-DExt project for Mac & iPADsOS>=17. 1B) I started-from scratch with DriverKitSampleApp 1C) For these two different targets (Mac,iPAD; using IDE XCode15.0), I couldn't find another way to build the sample project from Apple, beside this: now I have two handmade sets of ini-profiles and two respective "command-files".

2) My current palliative solution comprises of two specific ~"command-files" (each one runs in a directory with specific DriverKitSampleApp.entitlements,project.pbxproj)_ :

2A) my current file "cpy.command" for target "MAC"

## Destination "Mac"
## DriverKitSampleApp.entitlements: "com.apple.developer.driverkit.userclient-access"
##   item0: "com.ry.dexsample1.driver"
## Build Settings "DriverKitSampleApp":Signing:Code Signing Identity:"Sign to Run Locally"
##   "NullDriver":Signing:Code Signing Identity:"Sign to Run Locally"
##   "NullDriver":"AD_HOC_CODE_SIGNING_ALLOWED=YES"
cp DriverKitSampleApp.entitlements ../DriverKitSampleApp
cp project.pbxproj ../RyDExtSmpl1.xcodeproj

2B) my current file ~"cpy.command" for target "iPAD"

## Destination "iPAD"
## Build Settings "DriverKitSampleApp":Signing:Code Signing Identity:"Apple Development"
##  "NullDriver":Signing:Code Signing Identity:"Apple Development"
##  "NullDriver":"AD_HOC_CODE_SIGNING_ALLOWED=NO"
cp DriverKitSampleApp.entitlements ../DriverKitSampleApp
cp project.pbxproj ../RyDExtSmpl1.xcodeproj 

2C) This state is inconvenient (predicting that I will switch between MAC and iPAD dozens thousands of times when debugging this project)

3) The question

3A) I need to build the Apple's sample project "DriverKitSampleApp" just selecting one of two possible targets (Mac,iPad) in XCode-IDE.

3B) Option1: what developer(or team's entitlements) do I need for "3A"?

3C) Option2: what adjustments of project's configuration files do I need for "3A"? .

Answered by ssmith_c in 790002022

You can use a single project for the enclosing app. Use the "Supported Platforms" build setting to build for both macOS and iPadOS. The dext is built for the DriverKit platform.

At the project level, you can create different configurations, e.g. Debug (iPad) and Debug (macOS), use .xcconfig files to change the few things that may need to change between macOS and iPadOS, for example the bundle ID of the driver.

The driver would be the same for macOS and iPadOS, using the same entitlements file - macOS-only entitlements have no effect on iPadOS, and vice-versa.

You can use Automatic signing for development on both the app and the driver, on both platforms.

You can use a single project for the enclosing app. Use the "Supported Platforms" build setting to build for both macOS and iPadOS. The dext is built for the DriverKit platform.

At the project level, you can create different configurations, e.g. Debug (iPad) and Debug (macOS), use .xcconfig files to change the few things that may need to change between macOS and iPadOS, for example the bundle ID of the driver.

The driver would be the same for macOS and iPadOS, using the same entitlements file - macOS-only entitlements have no effect on iPadOS, and vice-versa.

You can use Automatic signing for development on both the app and the driver, on both platforms.

It 100% doesn't work in any straight forward manner: "At the project level, you can create different configurations, e.g. Debug (iPad) and Debug (macOS), use .xcconfig files to change the few things that may need to change between macOS and iPadOS, for example the bundle ID of the driver."

Debug/Release can't be a matter in this topic. Signing seemingly has no relation to configs. Signing depends on "toolchain".

In available XCode15, using (recommended) "automatic code signing", switch between "Apple-developer" (when I build for iPAD) and "Ad-hoc-code signing" (when I build for MAC) works only in IDE.

In the dictionary of XCode-15-IDE, for development-convenience I would like to have an opportunity ~automatically assign -"Ad-Hoc-signing" when target is "macOS" ~ "Apple-development" when target is "anything else"

possibility of unified code-signing "build settings" for Sonoma14 and iPAD OS>=17 OS & iPAD
 
 
Q