Shader no longer working on iOS

I have this shader I wrote (probably horribly, first time I’ve written a shader) which gets put on a plane and masks off most of the screen except a transparent circle based on the position of a light object. In the previous build on iOS it worked fine, I upgraded to 4.1, rewrote some of the math to add more knobs to tweak with and now it’s not working on iOS. It works perfectly fine on Desktop in the simulator. Anyone know what might be causing it to misbehave? Not sure if there’s some CG function or setting I’m using that iOS doesn’t support.

Shader "Masked/Mask" {

	Properties {
		_Color ("Main Color", Color) = (1,1,1,1)
		_LightPos ("Light Position", vector) = (0,0,0)
		_LightStr ("Light Strength", Float) = 50.0
		_MaxLightFalloff ("Max Light Falloff", Range (0.0, 1.0)) = 1
		_MinLightFalloff ("Min Light Falloff", Range (0.0, 1.0)) = 0
		_MaxLightRadius ("Max Light Radius", Float) = 3.0
		_MinLightRadius ("Min Light Radius", Float) = 0.5
	SubShader {
		Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
        Blend SrcAlpha OneMinusSrcAlpha 
		//Unneeded features
		Cull Off Lighting Off ZWrite Off Fog { Mode Off }
        Pass {

			// Upgrade NOTE: excluded shader from DX11 and Xbox360; has structs without semantics (struct v2f members vertexWorldCoord)
			#pragma exclude_renderers d3d11 xbox360 d3d11_9x

    		#pragma vertex vert
    		#pragma fragment frag
    		#include "UnityCG.cginc"
 			fixed4 _Color;
            fixed4 _LightPos;
            fixed _LightStr;
            fixed _MaxLightFalloff;
            fixed _MinLightFalloff;
            fixed _MaxLightRadius;
            fixed _MinLightRadius;
 			// TANH Function (Hyperbolic Tangent)
			float tanh(float val)
	 			float tmp = exp(val);
	    		float tanH = (tmp - 1.0 / tmp) / (tmp + 1.0 / tmp);
	    		return tanH;
    		//Vertex Shader Input / Output
    		struct a2v {
    			float4 vertex : POSITION;
			//Fragment Shader Input
			struct v2f {
				float4 vertexWorldCoord;
        		float4 pos : POSITION;
		    //Vertex Shader
		    v2f vert (a2v v) {
    			v2f o;
    			o.pos = mul( UNITY_MATRIX_MVP, v.vertex);
    			o.vertexWorldCoord = mul(_Object2World,v.vertex);
    			return o;
         	//Fragment Shader
            float4 frag(v2f i) : COLOR {
                float4 c = _Color;
                //Distance the fragment is from the light source
                float fragmentDistance = clamp(distance(_LightPos,i.vertexWorldCoord),0.0f,_LightStr);
                //The radius the light should reach given the depth
                float lightRadius = (_MaxLightRadius-_MinLightRadius)*saturate((_LightStr+_LightPos.y)/_LightStr) + _MinLightRadius;
                float falloff = (_MaxLightFalloff-_MinLightFalloff)*saturate((_LightStr+_LightPos.y)/_LightStr) + _MinLightFalloff;
                //Transition function for light falloff
                float shift = lightRadius * falloff;
                float scale = clamp(lightRadius * 1.0 - falloff,1,lightRadius);
                c.a *= saturate((tanh(4.0*((fragmentDistance-shift)/scale)-2.0)+1.0)/2.0);
                return c;

Solved the problem. It had to do with precision. Made sure the precision values were correct and it was fine.