【问题标题】:iOS Pinterest insert nil objectiOS Pinterest 插入 nil 对象
【发布时间】:2015-12-05 00:36:45
【问题描述】:

按照 pinterest 教程建议 (https://developers.pinterest.com/docs/sdks/ios/) 设置我的应用程序后,我尝试固定一个简单的图像但失败了。它返回以下错误:

NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[3]'

即使我使用 pinterest SDK [示例代码][2]。

[PDKPin pinWithImageURL:[NSURL URLWithString:@"https://about.pinterest.com/sites/about/files/logo.jpg"]
    link:[NSURL URLWithString:@"https://www.pinterest.com"]
    suggestedBoardName:@"Tooty McFruity"
    note:@"The Pinterest Logo" withSuccess: ^{
        NSLog(@"successfully pinned pin");
    }
    andFailure: ^(NSError *error) {
        NSLog(@"pin it failed");
    }];

我做错了什么?或者这是一个 SDK 错误?

【问题讨论】:

    标签: ios objective-c cocoa pinterest


    【解决方案1】:

    我自己想通了。我的 plist 文件缺少 BundleDisplayName。为了解决这个问题,您只需将其添加到 plist 文件中即可。

    【讨论】:

    • 原始密钥,CFBundleDisplayName
    • 关于这个领域的进一步讨论here.
    猜你喜欢
    • 2017-12-16
    • 1970-01-01
    • 2013-04-28
    • 2013-10-28
    • 2023-03-29
    • 2021-01-04
    • 2012-08-09
    • 2020-11-08
    • 2016-05-23
    相关资源
    最近更新 更多