Alpha mask shader working in Unity editor but not when deployed to iOS

I have the following shader:

Shader"Crop/TransparentWithAlphaMask"
{
Properties {
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
_AlphaTex ("Alpha (RGB) Trans (A)", 2D) = "white" {}
}

SubShader {
Tags {"Queue"="Transparent"}
LOD200

CGPROGRAM
#pragma surface surf Lambert alpha

sampler2D _MainTex;
sampler2D _AlphaTex;

structInput {
float2 uv_MainTex : TEXCOORD0;
float2 uv2_AlphaTex : TEXCOORD1;
};

void surf (Input IN, inout SurfaceOutput o) {
fixed4 c = tex2D(_MainTex, IN.uv_MainTex);
fixed4 alpha = tex2D(_AlphaTex, IN.uv2_AlphaTex);
o.Albedo = c.rgb * alpha.a;
o.Alpha = alpha.a;
}
ENDCG
}

Fallback "Diffuse"
}

It is supposed to mask the texture _MainTex with the alpha channel of texture _AlphaTex. They both require different UV sets (UV1 for _MainTex and UV2 for _AlphaTex)

This shader works perfectly in the editor but not when deployed to an iOS device. Does anyone know what is causing this issue? What renders in a black version of the alpha mask and nothing else (because of this I know it is using the correct UV’s for the mask texture).

The mesh I’m using for this is a dynamically built mesh generated at runtime, with shadows casting/receiving/light probes disabled.

Any help would be greatly appreciated.

I found what my issue was. Going to post it here incase someone has a similar issue in the future. The reason everything was coming out black on iOS was I wasn’t supplying normals for my mesh. Seems the desktop/standalone shaders show different results when no vertex normals are supplied. This is what was causing me to think my shader wasn’t compatible with iOS.

Hey, So what exactly did you do to fix it?

I wasn’t setting normals for my mesh so I set them with mesh.normals = normals (where normals is an array of Vector3’s one per vertex). If you’re seeing black geometry on iOs and not in the editor this could be the issue.