0

我正在尝试将 AFNetworking 与 AFPropertyListRequestOperation 一起使用来下载 plist 并使用它。不知何故,这不起作用,因为 AFNetworking 似乎不喜欢 plist 或其他任何格式的格式。该块甚至没有被解雇。相反,错误块被触发。

任何暗示为什么会这样?

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];
4

1 回答 1

0

记录错误以开始 - 这将为您提供错误指示。如果您仍然难过,请回帖。

NSLog(@"%@", error);
于 2013-06-17T14:08:54.833 回答