pub fn staple_ticket_to_bundle(
    bundle: &DirectoryBundle,
    ticket_data: &[u8]
) -> Result<(), AppleCodesignError>
Expand description

Staple a ticket to a bundle as defined by the path to a directory.

Stapling a bundle (e.g. MyApp.app) is literally just writing a Contents/CodeResources file containing the raw ticket data.

Examples found in repository?
src/stapling.rs (line 181)
175
176
177
178
179
180
181
182
183
184
    pub fn staple_bundle(&self, bundle: &DirectoryBundle) -> Result<(), AppleCodesignError> {
        warn!(
            "attempting to find notarization ticket for bundle at {}",
            bundle.root_dir().display()
        );
        let ticket_data = self.lookup_ticket_for_executable_bundle(bundle)?;
        staple_ticket_to_bundle(bundle, &ticket_data)?;

        Ok(())
    }