cfnetwork

Missing Required Architecture arm in file

When I compile my application, I get an error stating that /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/CFNetwork, missing required architecture arm in file. I have checked all the frameworks, and they all point to the iPhone 3.0 SDK Frameworks... What am I missing here? ...

How do I 'get' a SSLContextRef from CFNetworks?

I am attempting to look at the SSLContext in a CFReadStream. secureTransport has lots of useful methods for examining a SSLContextRef like SSLGetEnabledCiphers, but I don't have a good way to get a SSLContextRef from CFReadStream. Is there some sort of getter method for SSLContextRef in CFNetworks? ...

cfnetwork memory leaks in iPhone

I am getting following type of memory leak in my application - instruments checking. I have properly allocated & deallocated every object. However i am getting this type of memory leak. std::_Deque_base<__CFURLCacheNode*, std::allocator<__CFURLCacheNode*> >::_M_allocate_node() What is the reason behind generating these kind of leak? W...

iPhone networking problems

Hi, i'm having trouble to asatblish a CFSocket connection to a java server from iphone. Server is listening on port 80. Wireless LAN connection works great. EDGE NOT (T-Mobile) One Strange thing: If i first go to safari and open a website which address is my server ip and then start the app it connects. Please help me! I'm really ha...

iPhone NSURLConnection through Proxy+Auth

I am using NSURLConnection to make connections to a server, through a proxy that requires authentication this fails. The proxy settings are set under the WiFi, but the connection still fails. I believe there is a part of CFNetwork that can fix this, but this might be just for streams and I am unsure of how to implement it with NSURLConne...

how to add cfnetwork & other frameworks to your project for asynchronous transmission - iphone

I am trying to add facility of asynchronous transmission in my project. I want following in my application. A table view should load data through web service ( I can do ) Each cell must have an image ( I can do ) But the problem is up to now I was using synchronous transmission. i.e all data is loaded & then displayed including imag...

set network timeout and exception in iPhone

Hello all I am developing an iPhone application in which I am loading lots of data from another server via web-services . I want have read somewhere in the apple guides that for network aware applications you have to set the network time out and after that you have alert the user for the same that "The network is not available". How c...

CFNetwork still passing CFStreamErrors even though its deprecated?

I'm writing some code that is wrapping up some CFNetwork stuff to do DNS resolution in Objective-C. Everything is fine and it's working, but I have a few questions: The callback function prototype for CFHost's asynchronous resolution is passing references to CFStreamError structures even though the documentation says CFStreamError is d...

Objective-C memory leak in loading remote content

I try to load a plist file from my server. I can think of 2 ways to do that, but for both Instruments says there's huge memory leak : NSData* plistData = [NSData dataWithContentsOfURL:url]; and NSDictionary* updateDigest = [NSDictionary dictionaryWithContentsOfURL: [NSURL URLWithString:updateURL] ]; The backtrace of the memory lea...

Why a DataCallBack method listen in the background is not being invoked?

Hi, I've been working with CFNetwork to create a client application for iPad, it is a small application, nothing fancy. This is how I create the connection to the server (running in windows). - (void) startConnection { char ip[] = "192.168.0.244"; NSString *ipAddress = [[NSString alloc] initWithCString:ip]; /* Build our s...

SSDP on the iPhone

I need to be able to send out a UDP message and also receive one in order to discover SSDP devices on the network from the iPhone. I know that I need to send the packet to the multicast address and my HTTP request needs to look something like this: M-SEARCH * HTTP/1.1 Host: 239.255.255.250:1900 Man: ssdp:discover Mx: 3 ST: "urn:schemas...

CFNetwork and Bonjour integration for iPhone to Mac integration

I want to use CFNetwork and Bonjour in conjunction to be able to have communications between my iPhone app and a Mac app. The app on the iPhone would have one button. Then on the Mac app, there will be a label. If the button is pushed on the iPhone app, the label changes on the Mac app. Is there example code out there that can do this?...

CFHTTPMessageSetHeaderFieldValue - Failing for unknown reasons

CFHTTPMessageSetHeaderFieldValue is silently failing for me on certain parameters without warning or error. The header's value is simply not set. Header Key: Authorization Header Value: GoogleLogin auth=DQAAAJAAAAAIuG7Ki5ZtvxH9NyZU3NRK5IexJOASkWOnMaH2f42WerL0omocuQycif3ub8AorRnDERJV9An2_Js4hqigOyLzkrV5r6ZSnWn8FbXZQNn37HZjmS0rDGzS1A...

CFNetwork packet read callback not being called (iPhone)

Running on the iPhone simulator, I am listening on a port for packets, but my callback never gets called (and the packets are being sent for sure, checked with wireshark). Simplified code follows: #define IN_PORT (51112) static void ReadCallback (CFSocketRef theSocket, CFSocketCallBackType theType, CFDataRef theAddress, const void *da...

Application behaves differently when output is redirected to an NSPipe object?

I have an application which works with sockets and reads / writes data. It uses Foundation framework combined with CFNetwork and stdio. Here is the issue - when it is launched from console (bash shell) it works 100% fine and there is nothing wrong with. However when it is invoked by another application via NSTask madness begins. The who...

Possible Memory Leak in CFReadStreamRead??

Hi Stackoverflow, I know this might be not correct at all, but I'm currently getting memory leaks in Instruments while using CFReadStreamRead and CFReadStreamOpen. The code looks like this: UInt8* streambuffer = malloc(kReadStreamBufferSize); int readBytes = CFReadStreamRead(httpReadStream,streambuffer,kReadStreamBufferSize); ... free...

Broadcast data bytes through iPhone app

Hi all, I want to broadcast some data bytes in particular wifi range through my iPhone app...so that every receiver in that particular range will receive that bytes. I am very much new to this concept. Is there any sample app? Thanks in advance... ...

Multiple files uploading to FTP using SimpleFTPSample

Hello, I am trying to upload files from my iPhone to my FTP. I have found two options: one is the S7FTPRequest and the second is SimpleFTPSample from Apple. With both of them I have the same problems. 1st problem was that uploading could not start, I think it was because of Passive mode that was disabled on my FTP. After adding line: [s...