16 Replies
      Latest reply on Oct 17, 2019 4:40 PM by KMT
      antrix1989 Level 1 Level 1 (0 points)

        During authentication flow in Safari, we have a case when in order to satisfy a condition policy, user needs to install the app on his device. Depending on the OS, we ask him to install different applications. Since on iPadOS User Agent in Safari is same as on MacOS Catalina, what is recommened way to distinguish OS on server side?

         

        iPadOS:

        Safari: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Safari/605.1.15

         

        MacOS Catalina:

        Safari: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36

        • Re: User Agent in Safari on iPadOS
          AladdinShane Level 1 Level 1 (0 points)

          I have a similar situation as antrix1989 where our webclient determines if a user is browsing via an iPad with JavaScript and alters/restricts the content.   We can then market our clients to a subscription on/with our native iOS app.   Would be super helpful if the User Agent stated it was iPad OS instead of Mac OS X:  

          Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Safari/605.1.15

          so a regex match could be done to fairly certain determine a user was on iPad.

           

          Hopefully this will change closer to or after the release?

            • Re: User Agent in Safari on iPadOS
              esteban26 Level 1 Level 1 (0 points)

              Any update on this? Will the issue be solved before ios13 is released? I'm facing the same issue on iPads.

               

              In our case we use the user agent to detect if the browser belongs to a mobile device.

               

              This is important because on mobile devices we set our web application to listen the touch events such touchstart, touchend, etc, to drag some elements. But currently we cannot subscribe to those events since we cannot detect it is a mobile device.

               

              Somebody in another forum suggested me to verify if Safari browser is not set to show the desktop version of the web site. I'll check that today. But I think this is still an issue because even if user agent is retrieved as the desktop device, mouse events are not being emulated by safari.

                • Re: User Agent in Safari on iPadOS
                  esteban26 Level 1 Level 1 (0 points)

                  Update:

                   

                  I opened Settings -> Safari -> Request Desktop Website -> All websites. That option is enabled by default. I disabled it and the proper User Agent is now displayed.

                   

                  Mozilla/5.0 (iPad; CPU OS 13_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Mobile/15E148 Safari/604.1

                   

                  IMO it should be disabled by default and if a user enables it a modal window should be displaying indicanting not all web sites will be supported properly. Or maybe you may consider to add the iPad word to the first user agent to allow us to detect if it is an ipad emulating safari desktop or enable mouse event emulation, because I think when it is released several websites will fail.

              • Re: User Agent in Safari on iPadOS
                fanatic Level 1 Level 1 (0 points)

                I have the same issue with one of our sites, we render certain functionality for mobile devices (ipad included) based on the user agent.

                 

                The workaround esteban26 suggested works, but it's not ideal if it's enabled by default, It would be great if Apple considers adding the iPad word, or any other identifier to the user agent string.

                • Re: User Agent in Safari on iPadOS
                  theledger Level 1 Level 1 (0 points)

                  I had submitted a request to add a User Agent change function similar to the Desktop. On my desktop, there are some enterprise web apps speicifally look at browser versions and break on the latest version even though the app would work perfectly fine. I've done this several times where I change the Safari user agent to Chrome or IE11 and apps function just fine. It's just one more thing that would release corporate users from a desktop.

                  • Re: User Agent in Safari on iPadOS
                    cawink Level 1 Level 1 (0 points)

                    Hi..

                    I have a similar situation.

                    Any solution or update ?

                     

                    Thanks

                    • Re: User Agent in Safari on iPadOS
                      AladdinShane Level 1 Level 1 (0 points)

                      FYI, I submitted feedback/bug report via the Feedback app on the iPad back on July 3rd, 2019.   Apple responded on the 19th wanting specific details/steps on how to reproduce the error... I gave specific steps on how to view the user agent via the safari developer console and have yet to hear back from them.   The feeback app is reporting "More than 10" recent similar reports and the resolution is still "Open".

                       

                      Starting to think they're not concerned about this.

                      • Re: User Agent in Safari on iPadOS
                        jeremiefromsaint-constant Level 1 Level 1 (0 points)

                        Hopefully it will be resolved before launch.

                         

                        This will impact thousands of our users

                        • Re: User Agent in Safari on iPadOS
                          JohnnieM Level 1 Level 1 (0 points)

                          Any news on this?

                          • Re: User Agent in Safari on iPadOS
                            jagannath Level 1 Level 1 (0 points)

                            This is a problem for one of our application which is provided for major clients.

                            Would there be any meta tag which if present by default will launch the site in mobile?

                             

                            Anyone else have any update on this?

                            • Re: User Agent in Safari on iPadOS
                              neal1 Level 1 Level 1 (10 points)

                              Hi Antrix1989,

                              from what I've observed another way to load a mobile version of  a given website on iPadOS is to ensure that the browser's width is compact. To achieve this you must use the multi-tasking feature and place safari in a popup or split paned with another app such that Safari now has compact width.

                               

                              Neal