The error comes from the fact that kCIInputCenterKey isn't available on IOS. As you can see in the documentation here, it is only avaiable for OSX 10.5 and later.
That's probably the reason why it works on the simulator and not on the device itself.