I am getting this error when I am trying to play multiple videos using this swift library (https://github.com/piemonte/player). Not sure if it\'s related to that player, or to t
I had this same "Connection to assetsd was interrupted or assetsd died" error.
Usually followed by a memory warning. I tried to find retain cycles, but it wasn't it.
The problem for me had to do with the known fact that the resultHandler block of any PHImageManager request...()
is not called on the main queue.
So we cannot run UIView code directly within those blocks without asking for trouble later on in the app life.
To fix this we may for instance run all UIView code that would be executed within the scope of the resultHandler block inside a dispatch_async(dispatch_get_main_queue(), block)
I was having this problem because I did not realize that one of the functions that I was calling within one of the resultHandler.s of my app did eventually call some UIView code down the line. And so I was not forwarding that call to the main thread.
Hope this helps.
The issue is occurring because of the TargetSize only. The PHImageManagerMaximumSize option is the culprit. Set the CGSIZE as you want for the imageview.
Your problem might be that you create a new Player-object everytime you start playing a video:
self.currentlyPlaying = Player()
I would recommend you to either remove it after the file has finished playing or to create one player which you will reuse. Otherwise it will stay in the memory.v