electron / osx-sign

Codesign Electron macOS apps
BSD 2-Clause "Simplified" License
558 stars 96 forks source link

Default `embedded.provisionprofile` doesn't used in `signApplication` #294

Open mahnunchik opened 9 months ago

mahnunchik commented 9 months ago

Hello,

I've faced with different behavior in @electron/osx-sign v 1.0.5 vs electron-osx-sign v 0.5.0.

If options provisioningProfile and preEmbedProvisioningProfile are not specified (preEmbedProvisioningProfile is true by default) then default embedded.provisionprofile is used here https://github.com/electron/osx-sign/blob/06b32b5e8955c95203882ff7ae7f08ae84764a26/src/util-provisioning-profiles.ts#L108-L111 and successfully embedded here https://github.com/electron/osx-sign/blob/06b32b5e8955c95203882ff7ae7f08ae84764a26/src/util-provisioning-profiles.ts#L124 after executing https://github.com/electron/osx-sign/blob/06b32b5e8955c95203882ff7ae7f08ae84764a26/src/sign.ts#L381C11-L381C38

But the following sign application action https://github.com/electron/osx-sign/blob/06b32b5e8955c95203882ff7ae7f08ae84764a26/src/sign.ts#L404 doesn't use it here https://github.com/electron/osx-sign/blob/06b32b5e8955c95203882ff7ae7f08ae84764a26/src/sign.ts#L226-L228 because validatedOpts.provisioningProfile is undefined as it is in original options.

mahnunchik commented 9 months ago

electron-osx-sign filled out the options with the correct profile https://github.com/electron/osx-sign/blob/v0.5.0/util-provisioning-profiles.js#L172

mahnunchik commented 9 months ago

The same for identity