Sorry guys, I was not attentive enough. When I was talking about the devices, I should mention that one of them was actually a simulator (with iOS 7), and the other was a device with iOS 7. So now I've found in the Apple documentation, that:
In iOS 7 and later, if you ask for the MAC address of an iOS device, the system returns the value 02:00:00:00:00:00. If you need to identify the device, use the identifierForVendor property of UIDevice instead. (Apps that need an identifier for their own advertising purposes should consider using the advertisingIdentifier property of ASIdentifierManager instead.)
So, identifierForVendor is exactly what I wanted. It's a pity though, that now in the code a developer should sort out different iOS versions support even for that thing.