微信授权链路诊断 print 清理
授权链路已跑通(commit 625f504),撤掉 a060f29 加的临时诊断 print
+ 本次 shim 的 install 成功日志。AccreditLoginHandler / WeChatManager /
WXOpenURLShim 三处共 13 行 print 一次性清干净,行为不变。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
625f504b85
commit
053232ed26
@@ -33,10 +33,7 @@ public enum WXOpenURLShim {
|
||||
installed = true
|
||||
|
||||
let sel = NSSelectorFromString("openURL:")
|
||||
guard let method = class_getInstanceMethod(UIApplication.self, sel) else {
|
||||
print("[WXOpenURLShim] ⚠️ openURL: method not found, skip")
|
||||
return
|
||||
}
|
||||
guard let method = class_getInstanceMethod(UIApplication.self, sel) else { return }
|
||||
|
||||
let block: @convention(block) (UIApplication, URL) -> Bool = { app, url in
|
||||
app.open(url, options: [:], completionHandler: nil)
|
||||
@@ -44,6 +41,5 @@ public enum WXOpenURLShim {
|
||||
}
|
||||
let imp = imp_implementationWithBlock(block as Any)
|
||||
method_setImplementation(method, imp)
|
||||
print("[WXOpenURLShim] ✅ swizzled -[UIApplication openURL:] → open(_:options:completionHandler:)")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user