I'm trying to use a HKAnchoredObjectQuery
on iOS.
To do so I have to provide an anchor to the query which in this case is a NSUInteger
. I want to save this integer for queries in the future in the NSUserDefaults
and just simply want to use
if(anchor != nil) {
// do stuff
}
But the complier tells me that I'm not allowed to do this because I'm comparing a integer to a pointer and I understand why I'm not able to do this but I don't know how to do it.
The error code is this
Comparison between pointer and integer ('NSUInteger' (aka 'unsigned long') and 'void *')
Does anyone know how I'm able to determine if my anchor has a value or not?