I ran into a problem when the GetMethod reflection method does not return a static method for the class. This only happens on a real iphone; On the simulator, it works correctly. I tried the following:
MethodInfo methInfo = _type.GetMethod (methodName);
and
MethodInfo methInfo = _type.GetMethod (methodName, System.Reflection.BindingFlags.Static);
but none of them returns the method specified in the method name. The specified method exists, as shown by the fact that it works on the simulator. I confirmed with a debugger that my _type member variable contains the correct class type reference. The methods I'm trying to get are declared public in the class.
Has anyone come across this before or knew why this would work on a simulator but not on an actual iphone?
source share