PrepAway - Latest Free Exam Questions & Answers

What coould a developer using Apple’s Cocoa accomplish by using the following script?

What coould a developer using Apple’s Cocoa accomplish by using the following script?
NSURL *MyURL = [NSURL URLWithString:@”http://www.apple.com/”];
NSURL *urlContents = [myURL resourceDataUsingCache:YES];
if ([urlContents writeToFile:[@”~/Documents/applewebsite.html”
stringByExpandingTildeInPath]
atomically:YES])
{
// It was successful, do stuff here
} else {
// There was a problem writing the file
}

PrepAway - Latest Free Exam Questions & Answers

A.
Download files

B.
Write code to the applewebsite.html page

C.
Load the contents of www.apple.com to the local cache

D.
Check www.apple.com for vulnerabilities

Explanation:


Leave a Reply