Browser Widget and Twitter on iOS 13

Ralph DiMola rdimola at evergreeninfo.net
Fri Aug 14 19:46:10 EDT 2020


There is a song to be written for
https://webaim.org/blog/user-agent-string-history/. It may have multiple
time signatures... but I digress. Here's the code that's working for me:


if the environment = "mobile" and the platform = "iphone" and the machine
contains "iPad" then -- one can never be too careful

      switch

         case the systemversion begins with "12" -- iOS 12

            set the userAgent of widget "BrowserW" to "Mozilla/5.0 (iPad;
CPU OS 12_4_8 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko)
Version/12.1.2 Mobile/15E148 Safari/604.1"

            break

         case the systemversion begins with "13" -- iOS 13

            set the userAgent of widget "BrowserW" to "Mozilla/5.0
(Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/605.1.15 (KHTML, like Gecko)
Version/13.1.1 Safari/605.1.15"

            break

         default -- everybody else. This could get me into trouble later.
Maybe default should be deleted?  ****REVISIT****

            set the userAgent of widget "BrowserW" to "Mozilla/5.0 (iPad;
CPU OS 12_4_8 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko)
Version/12.1.2 Mobile/15E148 Safari/604.1"

      end switch

   end if


Ralph DiMola
IT Director
Evergreen Information Services
rdimola at evergreeninfo.net


-----Original Message-----
From: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] On Behalf
Of Mark Wieder via use-livecode
Sent: Friday, August 14, 2020 7:17 PM
To: Ralph DiMola via use-livecode
Cc: Mark Wieder
Subject: Re: Browser Widget and Twitter on iOS 13

On 8/14/20 2:54 PM, Ralph DiMola via use-livecode wrote:
> Mark/Panos,
> 
> Thanks for all your help, this worked like a charm! I got the 
> userAgent from a v12 iPad and v13 iPad. For any other iPad OS version 
> I use the v13 version.

Just curious... what userAgent string worked for you?

--
  Mark Wieder
  ahsoftware at gmail.com

_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list