Download .dmg file in Cocoa
How can I 开发者_开发百科download and open a .dmg file using cocoa or applescript
Try NSURLDownload or NSURLConnection. Google also answers the question handily if you leave out the "dmg" part and go more generic.
As @Joshua said, you can use NSURLDownload or NSURLConnection to retrieve the file. To mount it, run an NSTask that executes hdiutil attach /path/to/downloaded/file.dmg.
加载中,请稍侯......
精彩评论