< Previous PageNext Page > Hide TOC

Deprecated NSURL Methods

A method identified as deprecated has been superseded and may become unsupported in the future.

Deprecated in Mac OS X v10.4

loadResourceDataNotifyingClient:usingCache:

Loads the receiver’s resource data in the background. (Deprecated in Mac OS X v10.4.)

- (void)loadResourceDataNotifyingClient:(id)client usingCache:(BOOL)shouldUseCache

Parameters
client

The client of the loading operation. client is notified of the receiver’s progress loading the resource data using the NSURLClient informal protocol. The NSURLClient messages are delivered on the current thread and require the run loop to be running.

shouldUseCache

Whether the URL should use cached resource data from an already loaded URL that refers to the same resource. If YES, the cache is consulted when loading data. If NO, the data is always loaded directly, without consulting the cache.

Discussion

A given NSURL object can perform only one background load at a time.

Availability
Declared In
NSURL.h

propertyForKey:

Returns the specified property of the receiver’s resource. (Deprecated in Mac OS X v10.4.)

- (id)propertyForKey:(NSString *)propertyKey

Parameters
propertyKey

The key of the desired property.

Return Value

The value of the property of the receiver's resource for the provided key. Returns nil if there is no such key.

Availability
See Also
Declared In
NSURL.h

resourceDataUsingCache:

Returns the receiver’s resource data, loading it if necessary. (Deprecated in Mac OS X v10.4.)

- (NSData *)resourceDataUsingCache:(BOOL)shouldUseCache

Parameters
shouldUseCache

Whether the URL should use cached resource data from an already loaded URL that refers to the same resource. If YES, the cache is consulted when loading data. If NO, the data is always loaded directly, without consulting the cache.

Return Value

The receiver's resource data.

Discussion

If the receiver has not already loaded its resource data, it will attempt to load it as a blocking operation.

Availability
Related Sample Code
Declared In
NSURL.h

setProperty:forKey:

Changes the specified property of the receiver’s resource. (Deprecated in Mac OS X v10.4.)

- (BOOL)setProperty:(id)propertyValue forKey:(NSString *)propertyKey

Parameters
propertyValue

The new value of the property of the receiver's resource.

propertyKey

The key of the desired property.

Return Value

Returns YES if the modification was successful, NO otherwise.

Availability
Declared In
NSURL.h

setResourceData:

Attempts to set the resource data for the receiver. (Deprecated in Mac OS X v10.4.)

- (BOOL)setResourceData:(NSData *)data

Parameters
data

The data to set for the URL.

Return Value

Returns YES if successful, NO otherwise.

Discussion

In the case of a file URL, setting the data involves writing data to the specified file.

Availability
Declared In
NSURL.h

URLHandleUsingCache:

Returns a URL handle to service the receiver. (Deprecated in Mac OS X v10.4.)

- (NSURLHandle *)URLHandleUsingCache:(BOOL)shouldUseCache

Parameters
shouldUseCache

Whether to use a cached URL handle. If shouldUseCache is YES, the cache is searched for a URL handle that has serviced the receiver or another identical URL. If shouldUseCache is NO, a newly instantiated handle is returned, even if an equivalent URL has been loaded.

Return Value

A URL handle to service the receiver.

Discussion

Sophisticated clients use the URL handle directly for additional control.

Availability
See Also
Declared In
NSURL.h

< Previous PageNext Page > Hide TOC


© 2009 Apple Inc. All Rights Reserved. (Last updated: 2009-02-04)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.