SampleFTPSample代码中的iOS

SampleFTPSample代码中的iOS

本文介绍了SampleFTPSample代码中的iOS 6 EXC_BAD_ACCESS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我运行从iOS开发人员中心下载的SampleFTPSample源代码(iOS6.0 SDK,Xcode4.5)。

I run the SampleFTPSample source code (iOS6.0 SDK, Xcode4.5)which downloaded from iOS Developer Center.SampleFTPSample

作为图像,当我从ftpServer检索列表时,有时会出现EXC_BAD_ACCESS错误。我没有修改代码,我不知道为什么,我该如何修复它?

as the Images, when I retrieved a list from ftpServer, sometimes will get EXC_BAD_ACCESS error. I have not modified the code, I don't know why, and How can I fixed it?

非常感谢。



推荐答案

通过在创建流后立即将kCFStreamPropertyFTPAttemptPersistentConnection属性设置为false(使用CFReadStreamCreateWithFTPURL)来完成此操作。这可能是这样的:

do this by setting the kCFStreamPropertyFTPAttemptPersistentConnection property to false, immediately after creating the stream (using CFReadStreamCreateWithFTPURL). Here's what that might look like:

 success = [self.networkStream setProperty:(__bridge id) kCFBooleanFalse
    forKey:(__bridge NSString *) kCFStreamPropertyFTPAttemptPersistentConnection
];
assert(success);

这篇关于SampleFTPSample代码中的iOS 6 EXC_BAD_ACCESS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-23 10:39