ADC Home > Reference Library > Technical Q&As > Networking > Carbon >
|
Q: I'd like to download files directly from within my application. Which API should I use, URL Access or CFNetwork? A: Apple highly encourages you to use CFNetwork on Mac OS X 10.1 and higher. You'll likely see better reliability and performance. CFNetwork is replacing the functionality of URL Access, and future enhancements and improvements to file downloading and access to internet resources will occur in CFNetwork. Many of Apple's own applications, including Safari, rely on CFNetwork. To be precise, Safari uses the new Foundation URL Loading System introduced in Mac OS X 10.3 which is implemented on top of CFNetwork. The Foundation URL Loading System is an Objective-C API which provides support for accessing resources using HTTP, HTTPS, FTP and file URLs. For applications that need to run on both Mac OS 9 and Mac OS X, the easiest path is to choose URL Access, since CFNetwork isn't available on Mac OS 9. One option would be to use URL Access when running on Mac OS 9, and CFNetwork when running on Mac OS X. The other case where you would choose URL Access is if your application needs to support FTP download or upload and it needs to run on Mac OS X 10.2.x and earlier. FTP support was added to CFNetwork starting in Mac OS X 10.3. Please see QA1296 for related information regarding proxy server support. [Oct 29, 2003] |
|