修复打包签名并支持 App Store IPA 上传

This commit is contained in:
shenlei
2026-07-20 14:16:45 +09:00
parent 7fd3845447
commit 2661435273
6 changed files with 156 additions and 56 deletions
+8 -2
View File
@@ -19,7 +19,9 @@ def test_apply_project_config_without_branch_autopacking(tmp_path):
"PRODUCT_BUNDLE_IDENTIFIER = old.id;\nDEVELOPMENT_TEAM = OLD;\n"
'"DEVELOPMENT_TEAM[sdk=iphoneos*]" = OLD;\n'
"PROVISIONING_PROFILE_SPECIFIER = old;\n"
'"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = old;\n',
'"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = old;\n'
'CODE_SIGN_IDENTITY = "iPhone Developer";\n'
'"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";\n',
encoding="utf-8",
)
(swift / "RDAppConfiguration.swift").write_text(
@@ -49,6 +51,10 @@ def test_apply_project_config_without_branch_autopacking(tmp_path):
assert "工程、签名、版本和分发配置已更新" in messages
assert 'let RD_APP_GUID: String = "guid"' in (swift / "RDAppConfiguration.swift").read_text()
assert "PRODUCT_BUNDLE_IDENTIFIER = com.example.test;" in (project / "project.pbxproj").read_text()
project_content = (project / "project.pbxproj").read_text()
assert "PRODUCT_BUNDLE_IDENTIFIER = com.example.test;" in project_content
assert 'CODE_SIGN_IDENTITY = "iPhone Distribution";' in project_content
assert '"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";' in project_content
assert "iPhone Developer" not in project_content
assert (build_dir / "exportOptions.plist").exists()
assert (logo / "icon-1024.png").read_bytes() == b"icon"