gpt4 book ai didi

ios - 使用 Fabric 和 TwitterKit 时应用崩溃

转载 作者:技术小花猫 更新时间:2023-10-29 10:45:19 28 4
gpt4 key购买 nike

我的应用程序 didFinishLaunchingWithOptions 委托(delegate)方法中有这行代码,它导致崩溃:

'[Fabric] Info.plist 键“Fabric”的值必须是 NSDictionary。'

谁能帮我解决这个问题?

这是导致崩溃的代码:

[[Twitter sharedInstance] startWithConsumerKey:@"consumer_key" consumerSecret:@"secret_key"];
[Fabric with:@[[Twitter sharedInstance]]];

最佳答案

来自 Fabric 的 Alex。要使用不同的 Twitter API key 或在 apps.twitter.com 上生成的 API key ,您在上面的代码中正确声明了它。听起来您可能没有通过 Fabric 应用程序完全启用您的应用程序,并且您的 info.plist 中缺少必需的条目,例如 Fabric APIKey

有关 Fabric Mac 应用程序和 info.plist 的更多信息:

当您通过 Mac 应用程序载入套件时,Fabric 词典条目会注入(inject)到您的 info.plist 中。在 Fabric 父项下,将有两个子条目:APIKeyKits

enter image description here

您的 Fabric API key ,如果由于某种原因没有被注入(inject)(如果您使用的是 Fabric 应用程序,它应该自动添加)或者您想手动更改它,可以通过访问 https://fabric.io/settings/organizations 找到。 ,单击您的组织,然后单击组织标题下方的“API key ”。

Kits 数组包含您包含的每个 Fabric 套件的 Item X。如果您包含了 Twitter Kit,自动配置的 consumerKey 和 consumerSecret 会列在 KitInfo 下。

关于ios - 使用 Fabric 和 TwitterKit 时应用崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31552277/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com