mobile-safari

Any way to automate SFSafariViewController in UI tests?

南笙酒味 提交于 2019-12-10 02:11:47
问题 Is there any way to automate SFSafariViewController? I like the Xcode 7 UI test feature, but it seems it does not support SFSafariViewController automation. Some of the UI flows I am testing require a web browser so the app uses SFSafariViewController to make it safer vs a web view. 回答1: If it's similar to launching extensions (currently broken with direct interactions), try tapping the screen at the point where the element you're looking for is: Example of tapping an action sheet which

Facebook FB.login works in Safari, but not mobile Safari

限于喜欢 提交于 2019-12-10 01:54:32
问题 The following FB.Login function works fine in desktop Chrome, FF, and Safari. But in mobile Safari (tested on an iPhone 4S), it hangs and does not return to the FB.login callback. I can also see this in the console when I use Safari and set the User Agent to "Safari iOS 4.3.3 - iPhone". Is it because mobile Safari blocks popups? (FB.login triggers a popup dialog). How do I fix this? Thanks. function Login(returnLink) { FB.login(function(response) { if(response.status === 'connected') {

Can javascript detect when scrollbars are unavailable (i.e. on mobile browsers)?

我们两清 提交于 2019-12-09 23:53:57
问题 I've got a javascript-based Scrolling Widget Thingy™. One of the things it does is create a fixed height div and gives it overflow: auto . Alas on mobile Safari (and other mobile browsers) overflow: auto; doesn't show a scrollbar. Any content below "the fold" can only be found by accident. Is there a way to detect this in javascript, without resorting to browser detection? e.g. if (there is a scrollbar) { /* give me a fixed height and a scrollbar */ } else { /* Do something more suited to

iBeacon mobile web application development

我们两清 提交于 2019-12-09 21:47:56
问题 Are there any custom APIs for iBeacon access from mobile web applications? Probably it could be a mobile safari extension. Thanks in advance. 回答1: Unfortunately, no. You could write a native iOS app that looks for iBeacons in the background and launches a specific web app URL on mobile Safari. You could even pass ranged beacon info in query parameters. But you would still need a native app installed on the phone to do this. And once the Safari page is launched, getting further updates is

Is there a way to TouchEndInside in Mobile Safari?

无人久伴 提交于 2019-12-09 20:30:14
问题 I'm trying to determine whether a users does a touchupinside in mobile safari for an iPhone web app. So far I've been unsuccessful. touchend event fires regardless of where the touchup event happens on the screen, and I can't seem to discern that the target has changed by anything in the event argument. Can anyone point me in the right direction on how to capture a touchendinside (vs. touchendoutside) event using javascript? $('a.arrow').bind('touchend',function(e) { console.log($(e

Stop overscroll when using “-webkit-overflow-scrolling: touch”?

不羁岁月 提交于 2019-12-09 18:22:23
问题 I've found the: -webkit-overflow-scrolling: touch; css element to give us native scrolling on ios. This seems to work ok for me. But is there a way to turn off the "overscroll" effect? For example, when scroll position = zero, and you keep dragging downwards, the top of my content will move downwards revealing a little bit of white space above it. When you release your finger, the content snaps back upwards. Is there a way to disable just that portion of it? Also I read from here: http:/

safari fullscreen in iOS 7.1 with minimal-ui meta tag

一个人想着一个人 提交于 2019-12-09 16:37:40
问题 I've read on multiple sites (including some stackoverflow questions) that there will be a minimal-ui meta tag for iOS 7.1 Safari. So today i've updated my iPad and it seems to have no effect. Can anyone confirm that this should work? This is my meta tag: <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no, minimal-ui"> 回答1: This option is for iPhone only (right now). It removes the additional bars on top and bottom of the viewport introduced with iOS 7.0 when

Is there a list of supported fonts for Safari Mobile (ie. iPad and iPhone)?

笑着哭i 提交于 2019-12-09 14:31:14
问题 I'm looking for an exhaustive list of the supported fonts in Safari Mobile for iPad and iPhone. In fact, which fonts can I use in my website? 回答1: You should try this site: http://iosfonts.com/ it has a table with all supported Fonts for iPhone and iPad 来源: https://stackoverflow.com/questions/7316269/is-there-a-list-of-supported-fonts-for-safari-mobile-ie-ipad-and-iphone

how to resize / rezoom webpage in ipad

我是研究僧i 提交于 2019-12-09 13:41:51
问题 I have a website that uses jquery mobile for it's mobile version. I have a problem when I am changing it from portrait to landscape it zooms in correctly, but when I flip to portrait, it stays same zoom level and is wider then the view which breaks user experience. I use regular: <meta name="viewport" content="width=device-width, initial-scale=1"> from all the search I did, this should do. Unfortunately it isn't working for me. Here is my question, I can use onorientationchange event to

Web-apps: Can the iOS share sheet be triggered – and/or the shared URL customised – programatically?

自闭症网瘾萝莉.ら 提交于 2019-12-09 13:38:11
问题 Specifically, I would like to share granular page content via triggering the iOS share sheet with in-page buttons. In my webapp page, I have a table of downloadable PDFs. I would like to be able to add a column called "Share" into the table, so that a button could be tapped to share the URL to that document, without having to open the document itself and share from there. In order to do this, I assume I would need to customise this triggered share sheet to share a different URL to the one