Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

lucasgladding

macrumors 6502
Original poster
Feb 16, 2007
319
1
Waterloo, Ontario
Has anyone had any luck linking CFNetwork or CoreServices in their iPhone app? The CFNetwork framework exists in the iPhoneOS but the compiler responds that only the umbrella CoreServices framework can be linked for the device. Unfortunately the CoreServices framework exists only in the iPhoneSimulator frameworks folder.

I'm trying to setup my application for FTP backup and restore and the CFFTPSample example code includes the majority of what I need to do so. If anyone has any advice or has had any success here, please let me know.

Thanks in advance for any assistance.

Luke Gladding
 

lucasgladding

macrumors 6502
Original poster
Feb 16, 2007
319
1
Waterloo, Ontario
I was able to get the frameworks linked and working and am now implementing my interface for FTP backup and restore. The CFFTPSample code can be pasted into any controller above the @implementation and called from Cocoa methods.

To anyone interested in trying this, my major findings were as follows:
- CoreServices and CFNetwork need to be conditionally linked in the build settings as per the iPhone OS Programming Guide.
- Only CFNetwork needs to be imported in the class that requires CFFTPStream and its associated functions and constants.
- Your search path for frameworks should be empty. For some reason, the project template that I started with in the initial SDK was set to search the Mac frameworks directory and resulted in warnings stating that the frameworks were not available for the iPhone.

Best of luck to anyone else trying this. Hopefully this thread helps.

Luke Gladding
 

rafrif

macrumors newbie
Apr 4, 2007
3
0
I was able to get the frameworks linked and working and am now implementing my interface for FTP backup and restore. The CFFTPSample code can be pasted into any controller above the @implementation and called from Cocoa methods.

To anyone interested in trying this, my major findings were as follows:
- CoreServices and CFNetwork need to be conditionally linked in the build settings as per the iPhone OS Programming Guide.
- Only CFNetwork needs to be imported in the class that requires CFFTPStream and its associated functions and constants.
- Your search path for frameworks should be empty. For some reason, the project template that I started with in the initial SDK was set to search the Mac frameworks directory and resulted in warnings stating that the frameworks were not available for the iPhone.

Best of luck to anyone else trying this. Hopefully this thread helps.

Luke Gladding

Any chance you could provide some more details? I am new to iPhone programming and I am trying to write an application that uses CFNetwork. I am getting link time errors: "ld: symbol(s) not found"

Thanks,
Martin
 

Pallavi002

macrumors newbie
Dec 7, 2009
1
0
"- CoreServices and CFNetwork need to be conditionally linked in the build settings as per the iPhone OS Programming Guide."

I searched for how to link CoreServices and CFNetwork conditionally in the build settings, but couldn't get through, could you please provide me the link guiding for the same ?
Thanks.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.