polyfill-service: Facebook iOS app browser not supported

The Facebook native iOS app uses a UIWebView with a custom user-agent. Ideally Polyfill should return a polyfill for the current Safari/iOS version, but returns an error message.

Here is a polyfill request with a Facebook user-agent:

curl "https://cdn.polyfill.io/v2/polyfill.min.js?features=Object.assign,Promise,Array.prototype.find,Array.prototype.findIndex,Intl,Intl.~locale.nb&flags=always,gated" --header "User-agent: Mozilla/5.0 (iPhone; CPU iPhone OS 9_2 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13C75 [FBAN/FBIOS;FBAV/46.0.0.54.156;FBBV/18972819;FBDV/iPhone8,1;FBMD/iPhone;FBSN/iPhone OS;FBSV/9.2;FBSS/2; FBCR/Telenor;FBID/phone;FBLC/nb_NO;FBOP/5]"

Returns:

/* Unsupported UA detected: facebook/46.0.0 */

About this issue

  • Original URL
  • State: closed
  • Created 11 years ago
  • Comments: 15 (7 by maintainers)

Commits related to this issue

Most upvoted comments

@JakeChampion Thanks, here’s a FB story link that links to the following HTML:

https://m.facebook.com/story.php?story_fbid=10154490930306508&id=739196507

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>FB Browser Window setImmediate repro</title>

    <script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=default,setImmediate"></script>
</head>

<body>
    <script type="text/javascript">
        setImmediate( function() {
            alert( 'setImmediate worked' );
        } );
    </script>
<body>