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
I'm working with TSKSPKIHashCache, and I found a crash using the initialization method:
/** Create a new cache of SPKI hashes. The identifier is required to ensure that multiple cache instances do not attempt to use the same file on disk for persistence. If nil, persistence will be disabled (not recommended). @param uniqueIdentifier A unique identifier that is stable across app launches/instance creation @return An initialized hash cache.*/
- (instancetype _Nullable)initWithIdentifier:(NSString * _Nullable)uniqueIdentifier NS_DESIGNATED_INITIALIZER;
It says that If nil, persistence will be disabled. We also have a _Nullable key: it means that identifier can actually be nil.
However, in the implementation of the class, the following line crashes:
I'm working with
TSKSPKIHashCache
, and I found a crash using the initialization method:It says that If nil, persistence will be disabled. We also have a
_Nullable
key: it means that identifier can actually be nil.However, in the implementation of the class, the following line crashes:
It tries to get the path of the cache file, but trying to generate the URL for the cache file, an assert checks for a valid name:
If the identifier is nil, the
NSAssert
will let application crashes. Shouldn't it just disable the persistence?The text was updated successfully, but these errors were encountered: