Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    12.0p Device type recognition on iPad and Showcase not loading on Chrome iPad

    Hi Isomorphic,

    we have a few problems with running our app on an iPad Air 2, iOS 13.1.3.
    Some of the problems can be seen in the showcase as well.

    Open this sample (v12.0p_2019-11-15) and paste the following code in Safari:
    Code:
    isc.IButton.create({
        title: "Hello",
        icon: "icons/16/world.png",
        iconOrientation: "right",
        click: "isc.say('Tablet: ' + isc.Browser.isTablet + ', Handset: ' + isc.Browser.isHandset + ', Touch: ' + isc.Browser.isTouch + ', Desktop: ' + isc.Browser.isDesktop)"
    })
    The result on button click is that only true is for "Desktop", which is unexpected. I'd expect true for Touch and Tablet and false for Desktop and Handset.

    Please note that while my setting under (menu names are my translation to English, iPad is on German) "Settings" -> "Safari" -> "Always request desktop site" -> "All websites" is enabled (which is most likely the default), I don't think this should affect these four methods.

    Also, the showcase does not load in Chrome (2019-11-03, v78.0.3904.84) on this iPad at all, if I don't explicitly request the desktop version (here it is the other way around, default is to request the mobile version).

    The Safari problems are more relevant for us.
    If it helps, please see the attached different UA outputs from here (random site found for this).

    Best regards
    Blama
    Attached Files

    #2
    Hi Isomorphic,

    can you tell me if this is a bug? I'd need to start with optimizing layout here soon and how to do this depends on if the problem will be addressed.

    Best regards
    Blama

    Comment


      #3
      Hi Blama
      Sorry for the silence on this. We have a developer taking a look and will follow up shortly

      Regards
      Isomorphic Software

      Comment


        #4
        Hi Blama
        As of iOS 13.x, Safari defaults to having the "request desktop version of site" option enabled for all sites.
        As your screenshot above indicates, in this mode the information available in JS about the browser config (navigator.userAgent, navigator.platform, etc) completely omit information indicating that this request is coming from a Tablet device (specifically an iPad).

        Making this the default browser behavior is an interesting design choice by Apple. It means that essentially almost all sites designed with a tablet /mobile interface and a desktop interface will no longer display the tablet interface by default for Safari on iPad.

        We suspect this may cause some annoyance as it'll look like iOS Safari just "breaks" by serving up the desktop interface unless users are savvy enough to navigate through settings and turn this flag off. We suspect it's possible that this decision may be reversed in the future (but we'll see what happens)

        Regardless, for now we've chosen to respond to this by using essentially a hack to detect Safari running in this mode and treat it as any other iPad running Safari (setting isTouch / isTablet etc to true), so the mobile/tablet interface of your SmartClient-based application will continue to be displayed as it was for iOS 12.x

        We have included an undocumented flag (window.isc_ignoreMobileSafariDesktopMode) to turn this hack off. Set this to false prior to loading SmartClient to treat this browser as a desktop browser.
        This change will be present in the next nightly build (Nov 28 or above)

        We will update the documentation around this area once it's clear whether Apple intends to keep this behavior


        We'll respond separately on the Chrome issue

        Regards
        Isomorphic Software

        Comment


          #5
          Hi Isomorphic,

          it's working using v12.0p_2019-11-29, thank you.



          Originally posted by Isomorphic View Post
          Hi Blama
          As of iOS 13.x, Safari defaults to having the "request desktop version of site" option enabled for all sites.
          As your screenshot above indicates, in this mode the information available in JS about the browser config (navigator.userAgent, navigator.platform, etc) completely omit information indicating that this request is coming from a Tablet device (specifically an iPad).

          Making this the default browser behavior is an interesting design choice by Apple. It means that essentially almost all sites designed with a tablet /mobile interface and a desktop interface will no longer display the tablet interface by default for Safari on iPad.
          I did not know that this was different before, but I agree that it is a pretty invasive change in iOS to change this default.



          Originally posted by Isomorphic View Post
          Regardless, for now we've chosen to respond to this by using essentially a hack to detect Safari running in this mode and treat it as any other iPad running Safari (setting isTouch / isTablet etc to true), so the mobile/tablet interface of your SmartClient-based application will continue to be displayed as it was for iOS 12.x

          We have included an undocumented flag (window.isc_ignoreMobileSafariDesktopMode) to turn this hack off. Set this to false prior to loading SmartClient to treat this browser as a desktop browser.
          I did not expect that your browser recognition is user agent based - I assumed some feature detection based way.
          If it is user agent based, is it also future proof, meaning: will it also work with the next iOS version?



          Originally posted by Isomorphic View Post
          We will update the documentation around this area once it's clear whether Apple intends to keep this behavior
          Do you mean the mobileDevelopment docs and here especially the "Device type and overriding"-section?

          Best regards
          Blama

          Comment


            #6
            This is the first time that user-agent-based detection has failed, and it's because a vendor intentionally broke it.

            Feature detection can fail too. The current best approach for figuring out if something is an IPad would probably break if Apple introduced touch-screen laptops.

            Yes, that's the part of the docs that would be updated, if needed.

            Comment


              #7
              We've now fixed the issue causing the showcase failing to load (on our public website) on iPad / Chrome.
              The change has not yet been deployed to our public site but will be deployed soon

              Comment

              Working...
              X