fix: 企业微信 Schema 未替换,改写 CFBundleURLTypes 中 wxwork 条目
之前把 wxworkSchema 当成 Info.plist 顶层键写入,但真实 readoor31.plist 里企业微信 Schema 位于 CFBundleURLTypes(CFBundleURLName == "wxwork", 占位值 "1"),顶层键无效、占位符从未被替换。 改为并入 _update_plist 已有的 CFBundleURLTypes 替换逻辑:填写则替换 CFBundleURLSchemes,未配置则整条移除,与 weixinlogin/wechatpay/tencent 一致。 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YZULZ8fkiaiJrxqf318xTn
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
e10afb180d
commit
fa559101b9
@@ -36,18 +36,14 @@ def _update_plist(path: Path, config: dict):
|
||||
plist["CFBundleDisplayName"] = config.get("APPID_NAME", "")
|
||||
plist["AlivcLicenseKey"] = config.get("AlivcLicenseKey", "") or ""
|
||||
|
||||
# 企业微信 Schema:与微信登录 AppID 处理方式一致,未配置则移除该键。
|
||||
wxwork_schema = (config.get("wxworkSchema", "") or "").strip()
|
||||
if wxwork_schema:
|
||||
plist["wxworkSchema"] = wxwork_schema
|
||||
else:
|
||||
plist.pop("wxworkSchema", None)
|
||||
|
||||
scheme = (config.get("BUNDLE_ID", "") or "").replace(".", "").lower()
|
||||
values = {
|
||||
"weixinlogin": config.get("weixinlogin", ""),
|
||||
"wechatpay": config.get("weixinpay", ""),
|
||||
"tencent": config.get("tencent", ""),
|
||||
# 企业微信 Schema 与微信登录 AppID 同样存在 CFBundleURLTypes 中
|
||||
# (CFBundleURLName == "wxwork"),未配置则整条移除。
|
||||
"wxwork": (config.get("wxworkSchema", "") or "").strip(),
|
||||
"readoorUrlScheme": scheme,
|
||||
}
|
||||
url_types = []
|
||||
|
||||
Reference in New Issue
Block a user