故障排除
复制一个包含安装步骤和本插件的完整 Markdown 指南的配置提示。
无效的隐私清单(ITMS-91056)
标题:无效的隐私清单(ITMS-91056)如果 App Store Connect 报告此错误:
ITMS-91056:无效的隐私清单 - 来自以下路径的 PrivacyInfo.xcprivacy 文件无效:…
检查您的应用级别 PrivacyInfo.xcprivacy 文件:
- 该文件必须是有效的 JSON。
- 仅使用 Apple 文档的键和值。
- 不要将隐私清单添加到插件包中;将其添加到您的应用中。
请参阅 隐私清单和 iOS URL 处理程序 例如。
Google Play Console AD_ID 权限错误
Google Play Console AD_ID 权限错误在将应用程序提交到 Google Play 后,您可能会看到:
Google Api Error: Invalid request - This release includes the com.google.android.gms.permission.AD_ID permissionbut your declaration on Play Console says your app doesn't use advertising ID.Facebook 的 SDK 包含 AD_ID 和其他与广告相关的权限。如果您的应用程序不使用 Facebook 登录,请在 capacitor.config.ts:
import type { CapacitorConfig } from '@capacitor/cli';
const config: CapacitorConfig = { plugins: { SocialLogin: { providers: { google: true, facebook: false, apple: true, }, }, },};
export default config;然后运行:
npx cap sync该插件使用虚拟类而不是真实的 Facebook SDK,因此 Facebook 依赖项和权限不会包含在您的构建中。
Google Sign-In 28444 on Android
Google Sign-In 28444 on AndroidGetCredentialCustomException: [28444] Developer console is not set up correctly 来自 Google Credential Manager 的是当安装的 APK 的签名证书、包名或 webClientId 不匹配 Google Cloud Console。
使用完整的 Android Google 故障排查清单. 登录失败后,过滤 Logcat 以 GoogleProvider,并且一个掩码 package, signingSha1以与您的 OAuth 客户端进行比较。 webClientId Google Sign-In with Family Link 监督账户
Google Sign-In with Family Link 监督账户
Section titled “Google Sign-In with Family Link supervised accounts”家庭链接受管账户可能会出现以下问题:
NoCredentialException: No credentials available对于需要支持家庭链接账户的应用程序,请在Google登录调用中禁用授权账户过滤:
import { SocialLogin } from '@capgo/capacitor-social-login';
await SocialLogin.login({ provider: 'google', options: { style: 'bottom', filterByAuthorizedAccounts: false, scopes: ['profile', 'email'], },});关键点:
- 设置
filterByAuthorizedAccounts到falsecontext:产品页面/区域:实时更新产品页面。角色:短的UI标签或导航项。消息键`live_update_dynamic_label_to`(实时更新动态标签到)。true. - ; 默认值为
standard插件会自动重试bottom样式如果NoCredentialException. - 样式失败时使用
- 错误消息建议禁用
filterByAuthorizedAccounts当检测到此故障时
存储访问令牌的位置
标题:存储访问令牌的位置使用 @capgo/capacitor-persistent-account 当您的应用程序需要本机安全存储访问令牌或刷新令牌时
在 Android 上,它将数据存储在 Account Manager 中。 在 iOS 上,它将数据存储在 Keychain 中。