Is there any way to read EDID data in new Apple M1 devices since the below code snippet does not work in M1 machines however it works in Intel based Mac.
Also tried replacing "IODisplayConnect" by "IODPDevice" but still get an empty iterator.
Code Block io_object_t object = -1; io_iterator_t iterator; CFMutableDictionaryRef matching = IOServiceMatching("IODisplayConnect"); kern_return_t kernResult = IOServiceGetMatchingServices(kIOMasterPortDefault, matching, &iterator); if (KERN_SUCCESS == kernResult && iterator != 0) { object = IOIteratorNext(iterator); while (object != 0) { CFDictionaryRef dict = IODisplayCreateInfoDictionary(object, kIODisplayOnlyPreferredName); /* process data here */ object = IOIteratorNext(iterator); } IOObjectRelease(iterator); }
Also tried replacing "IODisplayConnect" by "IODPDevice" but still get an empty iterator.