init(contentsOf:)
Provides data-backed content from an existing file.
Declaration
convenience init?(contentsOf fileURL: URL!)Parameters
- fileURL:
The URL of the file to use for the item provider’s data. The item provider uses the filename extension to determine the universal type identifier for the associated data.
Return Value
An item provider for the specified file, or nil if an error occurs.
Discussion
The system uses the URL’s filename extension to select an appropriate universal type identifier. If the system can’t determine a specific universal type identifier based on the filename extension, it assigns the public.data universal type identifier for the file.
See Also
Related Documentation
- App Extension Programming Guide