首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >AFNetworking PLIST

AFNetworking PLIST
EN

Stack Overflow用户
提问于 2013-06-17 22:03:55
回答 1查看 554关注 0票数 0

我正在尝试使用带有AFPropertyListRequestOperation的AFNetworking来下载plist并使用它。不知何故,这不起作用,因为AFNetworking似乎不喜欢plist的格式或其他任何东西。区块甚至都没被解雇。取而代之的是触发错误块。

有什么提示为什么会这样吗?

代码语言:javascript
复制
NSURL *url = [NSURL URLWithString:@"https://dl.dropboxusercontent.com/u/9358444/iOS/zet.plist"];
NSURLRequest *request = [NSURLRequest requestWithURL:url];

AFPropertyListRequestOperation *operation = [AFPropertyListRequestOperation propertyListRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, id propertyList) {
    //do something
    NSDictionary *myDic = (NSDictionary *)propertyList;
           NSLog(@"%@", myDic);
    NSLog(@"Fired PLIST");
} failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id propertyList) {
    //error
     NSLog(@"Error PLIST");
}];

[operation start];
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-06-17 22:08:55

记录错误以启动-这将为您提供错误的指示。如果你仍然被难住了,请回帖。

代码语言:javascript
复制
NSLog(@"%@", error);
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/17149509

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档