Contents

init(resolvingBookmark:)

Create an AIModel by resolving bookmark data pointing to its specialized asset in a cache

Declaration

init?(resolvingBookmark bookmark: Data) throws

Parameters

  • bookmark:

    Data previously obtained from AIModel.bookmarkData.

Return Value

If the bookmark data can be resolved, the resulting AIModel pins and references the cache entry as the model that generated the bookmark data. If it cannot be resolved due to the specialized asset entry no longer being present nil is returned.

Discussion

Resolving bookmark data involves checking it is a valid bookmark, validating the associated cache and cache entry it references exists, and returning a AIModel constructed with that specialized asset contained within that entry. If any of these steps fail, nil is returned

See Also

Creating a model