带有 Firebase 身份验证和收入 cat 的 IAP 的 Flutter 应用程序未连接
Posted
技术标签:
【中文标题】带有 Firebase 身份验证和收入 cat 的 IAP 的 Flutter 应用程序未连接【英文标题】:Flutter app w/ Firebase Auth and Revenue cat's IAP not connecting 【发布时间】:2021-04-27 21:27:27 【问题描述】:所以我面临一个非常奇怪的问题,不知道该去哪里找。
我有一个内置 Flutter 的应用程序。我正在为 CI/CD 使用 Bitrise。直到昨天,我才将配置设置为使用 XCode 11。我没有注意到它需要更改,直到我收到消息说我需要使用 ios 14 SDK 进行构建。我升级了堆栈,并且能够将构建发布到 testflight。
我将版本设置为使用 XCode 12.5(最新)。该应用程序将在重新打开后要求再次登录,并且会收到一条错误消息,指出无法加载应用程序购买。错误代码:21004
这只发生在 testflight 构建中。使用 XCode 12.5 的本地构建可以很好地处理 IAP 和 firebase 身份验证。我无法将调试器附加到 testflight 构建。
我决定,因为唯一的区别是 XCode,我将退回到 12.4,这似乎解决了 IAP 问题,但应用程序每次打开时仍会注销。本地数据库上保存的用户配置文件很好。只是 firebase 认为它已注销。
错误日志没有帮助。我唯一能找到的是
default 13:45:20.643023-0600 photoanalysisd PLAccountStore accountDidChange, clearing cached properties.
default 13:45:20.643750-0600 assetsd PLAccountStore accountDidChange, clearing cached properties.
default 13:45:20.644216-0600 backboardd [1.26.0] +[ASEProcessing shouldEnhanceWidth:height:destinationWidth:destinationHeight:]: src= 1242w x 2688h , dest= 1240w x 2683h , aseFunctionOnYesOffNo=1
default 13:45:20.645602-0600 fitcored [1031] <private>::<private>
default 13:45:20.645884-0600 assetsd photoStreamAccountSettingsChanged
default 13:45:20.646817-0600 assetsd Clearing cached PLPhotoSharingHelper state
default 13:45:20.646867-0600 ptpd PLAccountStore accountDidChange, clearing cached properties.
default 13:45:20.647514-0600 wifid -[WiFiAccountStoreManager _updateIsManagedAppleIDAndNotify:]_block_invoke: No change Current (Non-Managed Account)
default 13:45:20.648268-0600 accountsd "<private> (<private>) received"
default 13:45:20.648443-0600 appstored elided platform fast path for key: re6Zb+zwFKJNlkQTUeT+/w
default 13:45:20.648542-0600 accountsd "<private> (<private>) received"
default 13:45:20.648829-0600 accountsd "<private> (<private>) received"
default 13:45:20.649444-0600 appstored AMSMescal: [IAPF9A5435D/[MY APP]:2_1] Skipping mescal - unabled to locate data to sign
error 13:45:20.649481-0600 appstored AMSURLRequest: [IAPF9A5435D/[MY APP]:2_1] Failed to add mescal header. Error: Error Domain=AMSErrorDomain Code=204 "Bag Value Missing" UserInfo=NSLocalizedDescription=Bag Value Missing, NSLocalizedFailureReason=The bag does not contain signed-actions nor did anyone register a default value. <AMSBagNetworkDataSource: 0x104e18ff0; profile: appstored; version: 1; sandbox: 1>
default 13:45:20.649516-0600 appstored AMSURLSession: [IAPF9A5435D/[MY APP]:2_1] Preparing request: <AMSURLRequest: 0x1051bcd90> URL: https://sandbox.itunes.apple.com/WebObjects/MZFinance.woa/wa/inAppPendingTransactions?guid=00008030-001A20E83C78802E
default 13:45:20.649678-0600 appstored AMSURLSession: [IAPF9A5435D/[MY APP]:2_1] Task created: LocalDataTask <B3B892EF-AF0E-4185-AFE5-A28937F04BD8>.<2> Session: <__NSURLSessionLocal: 0x10762d2b0>
default 13:45:20.649717-0600 appstored Task <B3B892EF-AF0E-4185-AFE5-A28937F04BD8>.<2> resuming, timeouts(60.0, 604800.0) QOS(0x19) Voucher <private>
default 13:45:20.650280-0600 appstored [Telemetry]: Activity <nw_activity 12:2 [8861910E-6C9C-4029-8C30-FB15A400CDE9] (reporting strategy default)> on Task <B3B892EF-AF0E-4185-AFE5-A28937F04BD8>.<2> was not selected for reporting
default 13:45:20.650562-0600 appstored Task <B3B892EF-AF0E-4185-AFE5-A28937F04BD8>.<2> strength 0, tls 4, ct 0, sub 0, sig 1, ciphers 0, bundle 1, builtin 0
default 13:45:20.650599-0600 appstored Task <B3B892EF-AF0E-4185-AFE5-A28937F04BD8>.<2> now using Connection 2319
default 13:45:20.654134-0600 fitcored [1031] <private>::<private>
default 13:45:20.655855-0600 appstored Task <B3B892EF-AF0E-4185-AFE5-A28937F04BD8>.<2> sent request, body S 592
default 13:45:20.656338-0600 CommCenter #I querying acount name
default 13:45:20.656497-0600 accountsd "<private> (<private>) received"
default 13:45:20.657079-0600 backboardd [1.26.0] +[ASEProcessing shouldEnhanceWidth:height:destinationWidth:destinationHeight:]: src= 1242w x 2688h , dest= 1240w x 2683h , aseFunctionOnYesOffNo=1
default 13:45:20.658111-0600 fitcored Storefront matches cache: <private>
我很茫然,有人有什么想法吗?
【问题讨论】:
【参考方案1】:所以在调试了很多乐趣之后。
我用 firebase 发现了一个错误。
https://github.com/FirebaseExtended/flutterfire/issues/5955
【讨论】:
以上是关于带有 Firebase 身份验证和收入 cat 的 IAP 的 Flutter 应用程序未连接的主要内容,如果未能解决你的问题,请参考以下文章
使用带有 Redux 和 Firebase 身份验证的 React-Navigation v5
带有 Firebase UI 的 Firebase 电话身份验证存在 SafetyNet 问题