Chris
Chris

Reputation: 2907

CUICatalog can't locate asset pack

I'm getting an error after downloading an ODR Asset Pack:

CoreUI: CUICatalog can't locate asset pack 'myprototype.asset-pack-000050KNKHUCF' for bundle 'NSBundle (loaded)'

In Xcode I can see that the asset pack has been downloaded.

Any ideas on why is this happening?

Upvotes: 6

Views: 903

Answers (2)

iroh
iroh

Reputation: 405

As per the apple documentation , the system will remove the downloaded asset when we ending the request access (when system need storage)

There are two ways to end access:

  • Send endAccessingResources to the resource request
  • Deallocate the resource request.

if you declare the request object inside the function, the request object will deallocated when the function execution ends and the asset access is removed.

So it would be better to declare the request object as instance/ static variable.

Upvotes: 0

andrew
andrew

Reputation: 272

I am not sure if this solution makes sense. But, when I had the same issue, I had the NSBundleResourceRequest as a local variable. When I changed it to an instance variable, everything was working fine.

Upvotes: 14

Related Questions