Flickr Photo Manager中的JSON警告

时间:2013-06-28 15:57:14

标签: ios json nsjsonserialization

我在iOS应用中收到警告。它似乎没有影响iOS 6中的性能,但我的应用程序在从iOS 7 beta 2中的Flickr加载照片时崩溃,我不确定它是否是测试版的问题,或者可能与此警告有关但是无论如何,我想摆脱警告。有什么帮助吗?

Implicit conversion from enumeration type 'enum NSJSONWritingOptions' to different enumeration type 'NSJSONReadingOptions' (aka 'enum NSJSONReadingOptions')

NSError *error;
NSDictionary *results = [NSJSONSerialization JSONObjectWithData:responseData options:NSJSONWritingPrettyPrinted error:&error];

2 个答案:

答案 0 :(得分:4)

非常简单!!只需重新阅读警告。它表示您在期望NSJSONWritingOptions时在options参数中传递NSJSONReadingOptions选项。

更改您的代码行,如下所示:

NSDictionary *results = [NSJSONSerialization JSONObjectWithData:responseData options:NSJSONReadingMutableContainers error:&error];

它可以帮助你。

答案 1 :(得分:0)

Core Background适用于iOS 6和iOS 7 beta 1,2。该项目的灵感来自雅虎天气iOS应用程序。 ObjectiveFlickr用于Flickr集成。

https://github.com/justinmfischer/core-background