简体   繁体   English

在 Visual Studio Code 上调试 Flutter 应用程序时,如何停止 MacOS 上的“钥匙串访问”权限对话框?

[英]How to stop "keychain access" permission dialog on MacOS when debugging Flutter app on Visual Studio Code?

I had just moved from Android Studio to Visual Studio Code.我刚从 Android Studio 转到 Visual Studio Code。 I'm using Firebase in my app which I debug by running it on MacOS.我在我的应用程序中使用 Firebase,我通过在 MacOS 上运行它来调试它。 Every time I do "Start Debugging" on VS code, I get this dialog which I learned to hate by this time.每次我在 VS 代码上执行“开始调试”时,我都会看到这个我现在讨厌的对话框。 Even if I type my password and click "Always Allow", it still appears next time I start debugging.即使我输入我的密码并单击“始终允许”,它仍然会在我下次开始调试时出现。 在此处输入图像描述

I tried changing Access Control settings in Keychain but that didn't help.我尝试更改钥匙串中的访问控制设置,但这没有帮助。 The dialog is driving me insane.对话让我发疯。 Any ideas?有任何想法吗? 在此处输入图像描述

There are several cases when the permissions popup is presented and some of them cannot be fixed on Firebase side.有几种情况会出现权限弹出窗口,其中一些无法在 Firebase 端修复。

Could you please provide more details on your workflow:您能否提供有关工作流程的更多详细信息:

  • Can you observe Keychain items created by your app with different signing settings?您能否观察到您的应用使用不同签名设置创建的钥匙串项目? If you remove them, do you still observe the alert?如果删除它们,您是否仍会看到警报?
  • Do you observe the alert if you re-install your app without signing changes?如果您在没有签署更改的情况下重新安装您的应用程序,您是否会看到警报?
  • Once you allow access you should not see more alerts.一旦您允许访问,您就不会看到更多警报。 It is the case for you?你是这样吗?

Also, Please check the GitHub discussion on #5603 GitHub另外,请查看#5603 GitHub 上的 GitHub 讨论

You may add the following line to your Podfile for this and try:为此,您可以将以下行添加到您的 Podfile 中并尝试:

pod 'FirebaseInstallations', :git=>'https://github.com/firebase/firebase-ios-sdk.git', :branch=>'master'

Open the Keychain Access app, which is in the the Utilities folder of your Applications folder.打开 Keychain Access 应用程序,它位于应用程序文件夹的实用程序文件夹中。

From the list of keychains on the left side of the window, select "login."从 window 左侧的钥匙串列表中,select“登录”。

From the Edit menu in the menu bar, choose “Change Password for Keychain 'login.'”从菜单栏的“编辑”菜单中,选择“更改钥匙串‘登录’的密码”。

Enter the old password of your user account in the Current Password field.在当前密码字段中输入您用户帐户的旧密码。 This is the password you were using before the password was reset.这是您在重置密码之前使用的密码。

Enter the new password of your user account in the New Password field.在新密码字段中输入您的用户帐户的新密码。 This is the password you're now using to log in to your Mac.这是您现在用于登录 Mac 的密码。 Enter the same password in the Verify field.在验证字段中输入相同的密码。

Click OK when done, then quit Keychain Access.完成后单击确定,然后退出钥匙串访问。

After stealing a solid 3 days from my life, fixed for me with the following:在从我的生活中偷走了整整 3 天之后,为我修复了以下内容:

  • Created a new project on Firebase for the macOs client.在 Firebase 上为 macOs 客户端创建了一个新项目。
  • Added the GoogleService-Info.plist as described in the FlutterFire docs.添加了GoogleService-Info.plist ,如 FlutterFire 文档中所述。 [https://firebase.flutter.dev/docs/manual-installation/macos/] [https://firebase.flutter.dev/docs/manual-installation/macos/]

When I revert this one commit with this only change and rebuild, the permissions dialog comes back immediately.当我用这个唯一的改变和重建恢复这个提交时,权限对话框立即返回。

For those who want to replicate my working configuration, I use the following packages Google Sign In and Firebase Auth:对于那些想要复制我的工作配置的人,我使用以下包 Google Sign In 和 Firebase Auth:

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Flutter with firebase_messaging - 如何在权限对话框中自定义消息? - Flutter with firebase_messaging - how to custom message on permission dialog? 使用 Visual Studio Code 和 Docker 持续开发和部署 Django 应用程序 - Continuously develop and deploy a Django app with Visual Studio Code and Docker Flutter Web:如何创建一个 flutter web 应用程序,它在扫描二维码时打开 - Flutter Web: How to create a flutter web app which opens when a QR code is scanned 如何修复通过 Visual Studio 发布的 function 应用程序中的错误 - How to fix error in function app publish through visual studio 如何在应用程序启动时阻止 Firebase 记录状态更新 - How to stop Firebase from logging status updates when app is launched 为什么在 flutter 应用程序上访问 firebase 时,Windows Android Studio Emulator 会突然变慢? - Why would the Windows Android Studio Emulator suddenly become slow when accessing firebase on a flutter app? 在 Visual Studio 代码中使用 SSO 配置文件调用 AWS cmdlet 时无法进行身份验证 - Unable to authenticate when invoking AWS cmdlets with SSO profile in visual studio code flutter 应用程序中将始终出现通知权限弹出窗口 - Notifications permission pop-up will always appear in flutter app 如何为 Typescript 配置 Visual Studio Code? - How do I configure Visual Studio Code for Typescript? 如何在 Microsoft Visual Studio C/C++ 编译器中关闭与位置无关的代码编译? - How to turn off position-independent code compilation in Microsoft Visual Studio C/C++ compiler?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM