I have a call to a URL and receive back a 0 or 1 on fail or success. I have my data in a NSMutableData *data; object.
I get the data, but now want to see if it’s a 1 or 0. How do I do this? Do I need to get the bytes?
Thanks
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 need to convert the
NSDatato anNSStringfirst. Then you can use theintValuemethod onNSStringto convert it to an integer.For example: