NSPOSIXErrorDomain Code=12 “Cannot allocate memory” in 3G network

后端 未结 2 1346
忘掉有多难
忘掉有多难 2021-02-06 16:27

I\'m trying to send a file on FTP server in my iPhone application. Everything seems to be okay in WiFi and GSM:EDGE network, but in 3G network an error appears (not always, but

2条回答
  •  孤独总比滥情好
    2021-02-06 17:05

    And here it is - the solution (or rather workaround):

    you should set property of writeStream to false, to switch off default persistant connection

    CFWriteStreamSetProperty( (CFWriteStreamRef)writeStreamRef, kCFStreamPropertyFTPAttemptPersistentConnection, kCFBooleanFalse ) ;
    

提交回复
热议问题