You should be using NSInteger
whenever you can. The reason is that it will be platform independent. On 32-bit architecture, an NSInteger
will be an int
, on 64-bit a long
.
Therefore, you are OK having used the int
-methods before - it is the smaller subset of the two.
What you have stored in your Core Data database is also OK for the same reason. The fact that you set the value to Integer64 ensures, that also long
numbers will be stored correctly in the future.
The use as currency is also OK, with some caveats. If you are mainly interested in cents, not fraction of cents, you can obviously just keep track of the cents as integers. However, if you want to do more complex calculations that could involve fractions of cents, such as some accounting methods or currency conversion, and store these results you would need something like a float
or (better) a double
.