I know in C int cannot be nil, which brings me to ask this question. I am using a rails API that uses an int for a certain property (rating). This API call could return nothing for the rating because it doesn't have a rating yet. I am using RestKit to map the results of the API call.
Maybe I should convert the int passed back from server API call to an NSNumber instead of an int? Or can I check in int is nil some how?
intcannot benilin Obj-C. Only object types (pointer) can benil(null). If you want to have a way to handlenil, you need to use objects (e.g.NSNumber). This is what most parsing frameworks do.