All I want is an integer which everytime my app opens is incremented by one. Is there an easy way to do this? Please help.
Thanks, in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You will want to do something like this:
This also works if the key has never been registered. integerForKey will just return 0, which is actually what we want. However, if you want to be extra-secure, you can check it beforehand. after the second line by something like this: