fix: 修复iOS抖音支付回跳注册

This commit is contained in:
Codex
2026-09-11 10:52:28 +08:00
parent 355ad119af
commit f568fa0f7a
5 changed files with 69 additions and 5 deletions
@@ -7,7 +7,13 @@ public class TbDouyinPayNative {
private static var generation = UUID()
public static func initialize(_ appId: String, _ scheme: String, _ link: String) {
DypayAPI.register(withAppID: appId, universalLink: link, callbackScheme: scheme)
if link.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
// Use the SDK's Scheme-only API instead of registering an empty
// Universal Link with the higher-priority Universal Link API.
DypayAPI.register(withAppID: appId, callbackScheme: scheme)
} else {
DypayAPI.register(withAppID: appId, universalLink: link, callbackScheme: scheme)
}
}
public static func available() -> Bool { DypayAPI.canOpenDypay() }