Problem using Resources.Load on iOS

Heres the Error Message I’m getting…

InvalidCastException: Cannot cast from source type to destination type.
UnityEngine.Resources.Load[Sprite] (System.String path) (at C:/BuildAgent/work/d3d49558e4d408f4/artifacts/EditorGenerated/BaseClass.cs:656)
AnimateTap.Start () (at Assets/AnimateTap.cs:33)

Heres the code thats causing the problem…

theframes = Resources.Load(“anim000”+i.ToString());
This works fine on windows and android. Its is only when I change the build target to iOS that I start getting this error.
(Just to explain what I’m doing here in this line of code, I’m loading a series of seperate pngs into an array so I can easily animate them by switching the sprite in the sprite renderer.)

Ok. I figured it out…
The problem was with the png images I was using.
It seems if you just import them as sprites as normal they will not work on iOS. You must tick the “override for iphone” box. I then selected “truecolor” format for them.

I have to say the exception I was thrown on this was not very enlightening. Could be improved imo.