I know this is a problem that has already been asked a thousand times, but from the few published examples that I tried, I still run into problems.
Now I'm trying to display a value in my debug log of an object that contains the data that I need as NSNumber. I tried to use the following line of code:
NSString *distanceString = [NSString stringWithFormat:@"%d", (NSNumber)self.selectedBeacon.distance ];
However, with the above, I get the following error:
The type used is 'NSNumber' where arithmetic or pointer type is required
So, I tried the following:
NSString *distanceString = [NSNumber self.selectedBeacon.distance];
But when I approached the type self.selectedBeacon.distance, the line did not appear in my intelisense. So for my third attempt, I tried the following line:
NSString *distanceString = [NSString stringWithFormat:@"%d", [NSNumber self.selectedBeacon.distance]];
But I get the error:
Expected ']'
, , . - ?