Ekzel Dest Ekzel Dest - 6 months ago 22
Swift Question

An Objective-C message was sent to a deallocated 'UIActivityIndicatorView' object

When running my app on device, it crashes right when I initiate my

AvPlayer
to stream an mp3. However, it works fine on simulator.

I have tried to run it through Zombie and I get the following error message when it crashes : "An Objective-C message was sent to a deallocated 'UIActivityIndicatorView' object (zombie) at address: 0x108c020e0"

I am using an Activity indicator in previous scenes but I have tried to remove it completely, leaving no line of code mentioning any
UIActivityIndicatorView
and I still get the same error.

Any idea of how to deal with this? Can it be linked to the system activity indicator displayed the status bar?

Many thanks for your help

Answer

It's a crash because of abusing appearance API not as documenting (setting a property not marked with UI_APPEARANCE_SELECTOR).

For reference, see here.

Comments