If I recall iOS OpenGLES2 can draw non power of 2 textures but on some cases it won't draw them.
First we are talking about uncompressed textures because that is what you are trying to do in the code.
Secondly, you didn't give a lot of information. What exactly "doesn't work"?
I will assume that by doesn't work you mean you are getting a black texture.
It is possible you have a mipmap mismatch, for instance if you specify:
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
Specifying a mip map min scale filter when your texture doesn't have mip map levels will result in a black texture.
Actually, you can't use mipmaps at all with non power two textures.
Another thing is you can't use GL_REPEAT with non power 2 textures.
You can't do this on iOS for non power 2 textures:
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S,
GL_REPEAT);
Instead you can do this:
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S,
GL_CLAMP_TO_EDGE);
Hope this helps.