登录我有问题
2020年5月17日06:44:38.565714-0700 OuthFairbeass [3744:135615] [缺省]无法打开URL twitterauth://授权CONSUMER_KEY = 5WnJxeILzBOa2ujeKFsbOiooz&CONSUMER_SECRET = 6EyBR9KvtO055Rrbt4EqM9oQW3xiZtxrR3alAjxkcRXyVlmjpW&oauth_callback = twitterkit-5WnJxeILzBOa2ujeKFsbOiooz&标识符= pzoIhelxQVsJcW5h0eUbduxjzw8Lr + fk8qFg6Xx6qtNeo6nTdPgprnMhLqbqqkrX:错误域= NSOSStatusErrorDomain代码= -10814“(null)” UserInfo = {_ LSLine = 247,_LSFunction =-[_ LSDOpenClient openURL:options:completionHandler:]} 2020-05-17 06:44:39.546329-0700 OuthFairbeass [3744:135619]本地时间与UTC的时间为-35995.546318秒 2020-05-17 06:44:39.546526-0700 OuthFairbeass [3744:135452] [TwitterKit]获取用户身份验证令牌时出错。 (lldb)
在信息列表中,一切都很好。另外,在Twitter上输入应用程序。添加回调URL 特殊Firebase,但我不知道是什么问题,请帮忙
@IBAction func clickedLoginBtn(_ sender: Any) {
TWTRTwitter.sharedInstance().logIn { (session, error) in
if session != nil{
let client = TWTRAPIClient.withCurrentUser()
client.requestEmail { email, error in
if (email != nil) {
UserDefaults.standard.set(email, forKey: "email")
} else {
print("error: \(error!.localizedDescription)");
}
}
}
}
这里是我的文件信息。 plist
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>fbapi</string>
<string>fbapi20130214</string>
<string>fbapi20130410</string>
<string>fbapi20130702</string>
<string>fbapi20131010</string>
<string>fbapi20131219</string>
<string>fbapi20140410</string>
<string>fbapi20140116</string>
<string>fbapi20150313</string>
<string>fbapi20150629</string>
<string>fbapi2016032888</string>
<string>fbauth</string>
<string>fb-messenger-share-api</string>
<string>fbauth2</string>
<string>fbshareextension</string>
<string>twitter</string>
<string>twitterauth</string>
</array>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>FacebookAppID</key>
<string>1462236107289657</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>FacebookDisplayName</key>
<string>OuthChat</string>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>fb146223610728</string>
</array>
</dict>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>twitterkit-xeILzBOa2ujeKFsbOiz</string>
</array>
</dict>
</array>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneDelegateClassName</key>
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
<key>UISceneStoryboardFile</key>
<string>Main</string>
<key>UISceneConfigurationName</key>
<string>Default Configuration</string>
</dict>
</array>
</dict>
</dict>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
FirebaseApp.configure()
TWTRTwitter.sharedInstance().start(withConsumerKey:"xeILzBOa2ujeKFsbOiz", consumerSecret:"4EqM9oQW3xiZtxrR3alAjxkcRXyVlmjpW")
return true
}
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
return TWTRTwitter.sharedInstance().application(app, open: url, options: options)
}