                 }
             }
         }
-
         return nil
     }
 }

                ]
                let data = NSKeyedArchiver.archivedData(withRootObject: dic)
                UIPasteboard.general.setData(data, forPasteboardType: "com.tencent.tencent\(appID)")

                if !openURL(urlString: "mqqOpensdkSSoLogin://SSoLogin/tencent\(appID)/com.tencent.tencent\(appID)?generalpastboard=1") {
                    completionHandler(nil, nil, NSError(domain: "OAuth Error, cannot open url mqqOpensdkSSoLogin://", code: -1, userInfo: nil))
                }

                return
            }

            // Web OAuth

            let accessTokenAPI = "https://xui.ptlogin2.qq.com/cgi-bin/xlogin?appid=716027609&pt_3rd_aid=209656&style=35&s_url=http%3A%2F%2Fconnect.qq.com&refer_cgi=m_authorize&client_id=\(appID)&redirect_uri=auth%3A%2F%2Fwww.qq.com&response_type=token&scope=\(scope)"
            addWebView(withURLString: accessTokenAPI)

        case .weibo(let appID, _, let redirectURL):

            let scope = scope ?? "all"

            guard !account.isAppInstalled else {

                let uuidString = UUID().uuidString

                let transferObjectData = NSKeyedArchiver.archivedData(withRootObject: [
                    "__class": "WBAuthorizeRequest",
                    "redirectURI": redirectURL,

private extension Bundle {

    var monkeyking_displayName: String? {
        func getNameByInfo(_ info: [String : Any]) -> String? {
            guard let displayName = info["CFBundleDisplayName"] as? String else {
                return info["CFBundleName"] as? String
            }
            return displayName
        }
        var info = infoDictionary
        if let localizedInfo = localizedInfoDictionary, !localizedInfo.isEmpty {
            for (key, value) in localizedInfo {
                info?[key] = value
            }
        }
        guard let unwrappedInfo = info else {
            return nil
        }
        return getNameByInfo(unwrappedInfo)
    }

