Well finally I detect the CNA with the user agent. When inside the CNA the user agent does not include "Safari/" in the UA string. Also tested with a dozen of alternative browsers like Opera mini, Dolphin, Mercury, Puffin, Atomic, 360 Lite, ...
For example Safari UA string is :
Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5355d Safari/8536.25
On the same device, inside a CNA, the user agent string would be :
Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5355d
So in PHP my detection looks like :
$userAgent = strtolower($_SERVER['HTTP_USER_AGENT']);
if ((strpos($userAgent, 'iphone') || strpos($userAgent, 'ipad')) &&
(strpos($userAgent, 'mozilla/') !== false) &&
(strpos($userAgent, 'applewebkit/') !== false) &&
(strpos($userAgent, 'mobile/') !== false) &&
(strpos($userAgent, 'safari') === false))
{
// Yes, we are in a CNA popup
[...]
}