I was building this app and it needs to convert a string to an Int
. So I did this:
Int(someString)
However, sometimes someString
is a very large number. Its value exceeds the max value of Int32
. I know that the max value of Int
can be different if the user uses different OSs.
I used iOS 9 and iOS 8 to test my app and it worked fine. This means that the max value of Int
is 264 - 1, not the 32 bit one. But what about other iOS versions? If the max value of Int
is smaller, my app would produce wrong outputs!
I just want to ask what are the respective max values of Int
in different iOS versions? Which version'(s) max value is 32 bit?