I have a piece of code for changing calls between different platforms. But I found a problem using iphone and ipad, the definition of TARGET_OS_IPHONE only works with iphone, but there is no ipad, I don’t want to try another one to think it is an ipad, because maybe this will be a source of problems in the future.
I lost 2 days looking for a color issue in the opencv matrix caused by this .....
My question is: is there a right solution to execute part of the code in iOS SO (Iphone AND Ipad)?
As a link, I always look at this link.
Code selection example:
#ifdef __linux__
#elif _WIN32
#elif __APPLE__
#ifdef TARGET_OS_IPHONE
#elif TARGET_IPHONE_SIMULATOR
#elif TARGET_OS_MAC
#else
#endif
#elif __ANDROID__
#else
#endif