Actually the answer to your first question is 'partially.' Foundation classes are available on the Mac and iPhone OS. So NSArray, NSURLConnection and others are available on Mac and iPhone. UIKit isn't available on Mac, only on iPhone. Mac has AppKit, which is a desktop version of UIKit.
There are a lot of strategies for transferring files between iPhone and desktop computer. If you want to sync some kind of files between both platforms or you want some kind of automated transfer then you need to write code that works on the desktop as well as the device. If you want the transfer to be under the user's control then you might only need to write device-side code.