SOLVED: Using CFNetwork for FTP backup

Discussion in 'iOS Programming' started by lucasgladding, Sep 5, 2008.

  1. macrumors 6502

    Joined:
    Feb 16, 2007
    Location:
    Waterloo, Ontario
    #1
    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
     
  2. thread starter macrumors 6502

    Joined:
    Feb 16, 2007
    Location:
    Waterloo, Ontario
    #2
    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
     
  3. macrumors newbie

    Joined:
    Apr 4, 2007
    #3
    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
     
  4. macrumors newbie

    Joined:
    Dec 7, 2009
    #4
    "- 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.
     
  5. macrumors newbie

    Joined:
    Apr 4, 2010
    #5
    I have the same problem, anyone has details about the solution?
     

Share This Page