Ios Twitter登录异常抖动
我正在从事颤振项目,并尝试使用插件登录Twitter。它与Android一起工作,但我在使用iOS登录时遇到了麻烦。我搜索了一下,但没有成功。也帮不了我。请帮我解决这个问题 Info.plistIos Twitter登录异常抖动,ios,firebase,flutter,twitter,twitter-login,Ios,Firebase,Flutter,Twitter,Twitter Login,我正在从事颤振项目,并尝试使用插件登录Twitter。它与Android一起工作,但我在使用iOS登录时遇到了麻烦。我搜索了一下,但没有成功。也帮不了我。请帮我解决这个问题 Info.plist <key>CFBundleURLTypes</key> <array> <dict> <key>CFBundleTypeRole</key> <string>Editor</
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>fb26143136******</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>com.googleusercontent.apps.433638145101-40qg2d9uiq4v5t*********</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>twitterkit-mmjB8lbQe3wsBhx*********></string>
</array>
</dict>
</array>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>fbapi</string>
<string>fb-messenger-share-api</string>
<string>fbauth2</string>
<string>fbshareextension</string>
<string>twitter</string>
<string>twitterauth</string>
</array>
CbundleUrlTypes
CbundleTypeRole
编辑
循环流化床锅炉方案
fb26143136******
CbundleTypeRole
编辑
循环流化床锅炉方案
com.googleusercontent.apps.433638145101-40qg2d9uiq4v5t*********
CbundleTypeRole
编辑
循环流化床锅炉方案
twitterkit-mmjB8lbQe3wsBhx*********>
LSApplicationQueriesSchemes
fbapi
fb messenger共享api
fbauth2
fbshareextension
啁啾
twitterauth
颤振码
var twitterLogin = new TwitterLogin(
consumerKey: '**jB8lbQe3wsB****',
consumerSecret:'***j5DrXVTU45mo6fb**********',
);
Future<void> loginWithTwitter() async {
final TwitterLoginResult result = await twitterLogin.authorize();
switch (result.status) {
case TwitterLoginStatus.loggedIn:
var session = result.session;
print(session.token);
print(session.secret);
break;
case TwitterLoginStatus.cancelledByUser:
print("Cancelled");
break;
case TwitterLoginStatus.error:
print(result.errorMessage);
break;
}
}
var twitterLogin=新twitterLogin(
消费者:“**jB8lbQe3wsB****”,
消费者信任:“***j5DrXVTU45mo6fb*********”,
);
Future loginWithTwitter()异步{
最终TwitterLoginResult结果=等待twitterLogin.authorize();
开关(结果状态){
case TwitterLoginStatus.loggedIn:
var session=result.session;
打印(会话令牌);
打印(session.secret);
打破
case TwitterLoginStatus.Cancelled ByUser:
打印(“已取消”);
打破
case TwitterLoginStatus.error:
打印(result.errorMessage);
打破
}
}
错误日志
*** First throw call stack:
(
0 CoreFoundation 0x00007fff23baa1ee __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff50864b20 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23baa02c +[NSException raise:format:] + 188
3 TwitterKit 0x0000000106df38ad -[TWTRTwitter logInWithViewController:completion:] + 649
4 Runner 0x00000001023ded4d -[TwitterLoginPlugin authorize:] + 205
5 Runner 0x00000001023de83f -[TwitterLoginPlugin handleMethodCall:result:] + 335
6 Flutter 0x0000000104d0d4fd __45-[FlutterMethodChannel setMethodCallHandler:]<…>
Lost connection to device.
***第一次抛出调用堆栈:
(
0 CoreFoundation 0x00007fff23baa1ee例外预处理+350
1 libobjc.A.dylib 0x00007fff50864b20 objc_异常_抛出+48
2 CoreFoundation 0x00007fff23baa02c+[N异常提升:格式:][188
3 TwitterKit 0x0000000106df38ad-[TwtrTwitterLoginWithViewController:completion:][649
4运行程序0x00000001023ded4d-[TwitterLoginPlugin Authorization:][205
5运行程序0x00000001023de83f-[TwitterLoginPlugin handleMethodCall:result:+335
6颤振0x0000000104d0d4fd__45-[颤振方法通道设置方法调用处理程序:]
与设备的连接中断。
您应该只有一个CbundleTypeRole,并在数组中放置来自提供商(如google、twitter、facebook等)的所有密钥
就这样,
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>com.googleusercontent.apps.433638145101-40qg2d9uiq4v5t*********</string>
<string>twitterkit-mmjB8lbQe3wsBhx*********></string>
</array>
</dict>
CbundleTypeRole
编辑
循环流化床锅炉方案
com.googleusercontent.apps.433638145101-40qg2d9uiq4v5t*********
twitterkit-mmjB8lbQe3wsBhx*********>