Skip to content

Commit 1e48093

Browse files
authored
codesign macos apps (#5055)
* wip * rollback readme * change language
1 parent 3bcb76b commit 1e48093

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

packages/cli/src/build/request.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4370,10 +4370,10 @@ __wbg_init({{module_or_path: "/{}/{wasm_path}"}}).then((wasm) => {{
43704370
);
43714371
}
43724372
}
4373-
BundleFormat::Ios => {
4373+
BundleFormat::MacOS | BundleFormat::Ios => {
43744374
if self.should_codesign {
43754375
ctx.status_codesigning();
4376-
self.codesign_ios().await?;
4376+
self.codesign_apple().await?;
43774377
}
43784378
}
43794379

@@ -5254,23 +5254,22 @@ __wbg_init({{module_or_path: "/{}/{wasm_path}"}}).then((wasm) => {{
52545254
.collect()
52555255
}
52565256

5257-
pub async fn codesign_ios(&self) -> Result<()> {
5257+
pub async fn codesign_apple(&self) -> Result<()> {
52585258
// We don't want to drop the entitlements file, until the end of the block, so we hoist it to this temporary.
52595259
let mut _saved_entitlements = None;
52605260

52615261
let mut app_dev_name = self.apple_team_id.clone();
52625262
if app_dev_name.is_none() {
5263-
app_dev_name =
5264-
Some(Self::auto_provision_signing_name().await.context(
5265-
"Failed to automatically provision signing name for iOS codesigning.",
5266-
)?);
5263+
app_dev_name = Some(Self::auto_provision_signing_name().await.context(
5264+
"Failed to automatically provision signing name for Apple codesigning.",
5265+
)?);
52675266
}
52685267

52695268
let mut entitlements_file = self.apple_entitlements.clone();
52705269
if entitlements_file.is_none() {
52715270
let entitlements_xml = Self::auto_provision_entitlements()
52725271
.await
5273-
.context("Failed to auto-provision entitlements for iOS codesigning.")?;
5272+
.context("Failed to auto-provision entitlements for Apple codesigning.")?;
52745273
let entitlements_temp_file = tempfile::NamedTempFile::new()?;
52755274
std::fs::write(entitlements_temp_file.path(), entitlements_xml)?;
52765275
entitlements_file = Some(entitlements_temp_file.path().to_path_buf());
@@ -5285,7 +5284,7 @@ __wbg_init({{module_or_path: "/{}/{wasm_path}"}}).then((wasm) => {{
52855284
)?;
52865285

52875286
tracing::debug!(
5288-
"Codesigning iOS app with entitlements: {} and dev name: {}",
5287+
"Codesigning Apple app with entitlements: {} and dev name: {}",
52895288
entitlements_file.display(),
52905289
app_dev_name
52915290
);

0 commit comments

Comments
 (0)