You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Convenience accessor to retrieve a shared image cache instance.
44
+
Returns the shared image cache.
45
+
46
+
@return A shared instance of `FICImageCache`.
47
+
48
+
@note Fast Image Cache can either be used as a singleton for convenience or can exist as multiple instances. However, all instances of `FICImageCache` will make use of
49
+
shared resources, such as the same dispatch queue and the same location on disk for storing image tables.
50
+
51
+
@see [FICImageCache dispatchQueue]
45
52
*/
46
53
+ (instancetype)sharedImageCache;
47
54
55
+
/**
56
+
Returns the shared dispatch queue used by all instances of `FICImageCache`.
57
+
58
+
@return A generic, shared dispatch queue of type `dispatch_queue_t`.
59
+
60
+
@note All instances of `FICImageCache` make use a single, shared dispatch queue to do their work.
The name of the image format. Each image format must have a unique name.
45
+
46
+
@note Since multiple instances of Fast Image Cache can exist in the same application, it is important that image format name's be unique across all instances of `<FICImageCache>`. Reverse DNS naming
47
+
is recommended (e.g., com.path.PTUserProfilePhotoLargeImageFormat).
The data protection mode that image table files will be created with.
128
+
129
+
`FICImageFormatProtectionMode` has the following values:
130
+
131
+
- `FICImageFormatProtectionModeNone`: No data protection is used. The image table file backing this image format will always be available for reading and writing.
132
+
- `FICImageFormatProtectionModeComplete`: Complete data protection is used. As soon as the system enables data protection (i.e., when the device is locked), the image table file backing this image
133
+
format will not be available for reading and writing. As a result, images of this format should not be requested by Fast Image Cache when executing backgrounded code.
134
+
- `FICImageFormatProtectionModeCompleteUntilFirstUserAuthentication`: Partial data protection is used. After a device restart, until the user unlocks the device for the first time, complete data
135
+
protection is in effect. However, after the device has been unlocked for the first time, the image table file backing this image format will remain available for readin and writing. This mode may be
136
+
a good compromise between encrypting image table files after the device powers down and allowing the files to be accessed successfully by Fast Image Cache, whether or not the device is subsequently
137
+
locked.
138
+
139
+
@note Data protection can prevent Fast Image Cache from accessing its image table files to read and write image data. If the image data being stored in Fast Image Cache is not sensitive in nature,
140
+
consider using `FICImageFormatProtectionModeNone` to prevent any issues accessing image table files when the disk is encrypted.
The dictionary representation of this image format.
129
151
130
-
@discussion Fast Image Cache automatically serializes the image formats that it uses to disk. If an image format ever changes, Fast Image Cache automatically detects the change and invalidates the image table associated with that image format. The image table is then recreated from the updated image format.
152
+
@discussion Fast Image Cache automatically serializes the image formats that it uses to disk. If an image format ever changes, Fast Image Cache automatically detects the change and invalidates the
153
+
image table associated with that image format. The image table is then recreated from the updated image format.
@param devices A bitmask of type `<FICImageFormatDevices>` that defines which devices are managed by an image table.
152
175
153
-
@return An autoreleased instance of `<FICImageFormat>` or one of its subclasses, if any exist.
176
+
@param protectionMode The data protection mode to use when creating the backing image table file for this image format. See the `<protectionMode>` property description for more information.
177
+
178
+
@return An autoreleased instance of `FICImageFormat` or one of its subclasses, if any exist.
@param imageFormat The image format that describes the image table.
77
77
78
+
@param imageCache The instance of `<FICImageCache>` that owns this image table.
79
+
78
80
@return A new image table.
79
81
80
82
@warning `FICImageTable` raises an exception if `imageFormat` is `nil`. `FICImageTable`'s implementation of `-init` simply calls through to this initializer, passing `nil` for `imageFormat`.
@param sourceImageUUID The UUID of the source image that represents the actual image data stored in an image table entry. Must not be `nil`.
112
114
115
+
@param preheatData A `BOOL` indicating whether or not the entry's image data should be preheated. See `<[FICImageTableEntry preheat]>` for more information.
116
+
113
117
@return A new image created from the entry data stored in the image table or `nil` if something went wrong.
114
118
115
119
@discussion The `UIImage` returned by this method is initialized by a `CGImageRef` backed directly by mapped file data, so no memory copy occurs.
116
120
117
-
@note If either of the parameters to this method are `nil`, the return value is `nil`.
121
+
@note If either of the first two parameters to this method are `nil`, the return value is `nil`.
118
122
119
123
@note If either the entity UUID or the source image UUID doesn't match the corresponding UUIDs in the entry data, then something has changed. The entry data is deleted for the
Adds a block to be executed when this image table entry is deallocated.
90
+
91
+
@param block A block that will be called when this image table entry is deallocated.
92
+
93
+
@note Because of the highly-concurrent nature of Fast Image Cache, image tables must know when any of their entries are about to be deallocated to disassociate them with its internal data structures.
0 commit comments