We have hit a problem with Unity 4.0.0 and iOS when using RemoteNotifications. Push notifications arrive correctly to the device but the contents on userInfo are incorrect when we provide a custom int payload:
{ "sample": 405 }
If you provide an int as a custom payload, userInfo on the RemoteNotification object will have an Int64 value for that key where the high part is seemingly random and the lower part is the actual value sent through APNS.
We can obtain the desired value by shifting and converting to int but is there any other way to fix it? Is it fixed in a new version of Unity?
Int64 val = (Int64)remoteNotification.userInfo["sample"];
int realVal = ((int)(val << 32) >> 32);
Thanks!