Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

iPhone simulator

Featured Replies

Anyone got a recommendation for an accurate iPhone simulator. I've got a problem with a page which the Google simulator says works fine but a real device doesn't like. I can't get at the actual device so need a good simulator.

Any suggestions gratefully received.

TIA

Paul

I never found a simulator that works properly. There are loads of sites that show you the layout but that’s not the same as the actual iOS.

Send me the url and I can test on my phone for you 

  • Author

Thanks, I was afraid you might say that.

My tame iPhone user is non-dev so would appreciate your expert eye... Here's the test page - https://www.magnoliajoes.com/interactives/in-the-groove/test-gallery.shtml 

These use display/visibility/opacity to try to reveal a content div after the overlay div has been hidden. Test 1 works on android but none seem to work on a real iPhone SE 2020 - you just get a white screen after pressing Continue.

 

Yup, that’s what happening to me.

If you scroll it then appears.

That being said, the whole UX is pretty horrible. And holding my phone in landscape doesn’t help mindfulness!

  • Author

Thanks for confirming it. Any ideas why and what the solution might be?

I'm wondering if it would help if I can defer the script which loads the content until the div is visible.

No idea how to fix it, I'm not that clever!

But I'm very confused about what I'm even supposed to do. It says something about clicking/tapping and counting but I just see some numbers flash up. Should I be tapping on the numbers?

Note also that the window is larger then the screen so I either get the X to close or the ...Count each note message but not both.

So quite a lot more work to do.

When I close the window I get some breathing thing.

16 minutes ago, NOCK said:

Apple's Xcode comes with an iPhone simulator, you can simulate on any iOS device you want. If you're on a Mac you can get Xcode for free. If you're not on a Mac then I have no idea.

I use this it's pretty accurate.  Those not developing on a mac - god help you.  I'd HATE to be subjected to a windows machine as a developer.

Edited by rbrtsmith

  • Author

☹️ Windows and Android here I'm afraid.

It works fine on a macbook BTW.  It's just mobiles that are causing me grief.  

  • Author

Looks like I've got everything except test01 working on iphone but not on android.

So if the div to which content is being loaded is present but not visible (using visibility or opacity to show and hide it) then it works on iphone, but if you use display:none it works on android but not iphone. So I guess iphone needs the dimensions of the div to resize the content correctly but android doesn't. 

Not aware of an easy way to check for android vs iphone and deliver a different document which would be the easiest route from this point. So I can only think of trying to defer the load of the dynamic content once the div has been made visible/displayed.

You can test with something like https://www.browserstack.com but it's extremely slow.  

Could the "continue" issue be because you're using the full screen API? It's entirely possible there's some kind of inconsistency between browsers or an implementation detail which means some display properties may work on some browsers and not others.

  • Author
2 hours ago, Jack said:

Could the "continue" issue be because you're using the full screen API?

Thanks Jack, I was wondering that too. I have tried removing it but I've run so many different tests in the last couple of days I'm getting to that point where I'm questioning if I've really tried all the combinations in all instances and reset the cache each time etc, etc so I'm going to check that again.

As the animated content is loaded by a function I thought I should be able to defer that function and load the content once the fullscreen div has been created but I've not been able to get it to work and tbh I'm not expert enough to know if it should.

My work have a BrowserStack account so I've had a look, but this has been incredibly difficult to debug so what I propose might not work and isn't the best way to do this at all. If it does work the next step would be to refactor what you have. Also, the modal close button going somewhere else entirely is really annoying and not what most users would expect to happen.

Add an ID to this link:

<a title="Click to Launch Mindfulness Activity" style="width:30%; margin:auto;" href="/info/nojs.shtml" onclick="goFullScreen(); ShowContent('ITG01'); return false;" class="bttn lnk" id="js-launch-ani">Continue</a>

Add this into your scripts file at the bottom:

var initAnimation = function() {
  var Saola = window.AtomiSaola;
  var li = {"color":"#2090e6","density":9,"diameter":60,"range":1,"shape":"oval","speed":1};
  
  Saola.openDoc('itg01im-a.js', 'ITG01', {
    paused: false, 
    preloaderOptions: li, 
    center: 'both', 
    resourceFolder: 'itg01im-a_res', 
    autofit: true
  });
};

var launchEl = document.querySelector('#js-launch-ani')
launchEl.addEventListener('click', initAnimation);

Remove this script:

<script type="text/javascript">
  (function(Saola) {
    var li = {"color":"#2090e6","density":9,"diameter":60,"range":1,"shape":"oval","speed":1};
    Saola.openDoc('itg01im-a.js', 'ITG01', {paused:false, preloaderOptions: li, center: 'both', resourceFolder: 'itg01im-a_res', autofit: true});})(AtomiSaola);
</script>

 

  • Author

Many thanks, Jack and apologies for dragging you into the twisted world of my amateur code. 🙂 I had decided overnight I'd probably have to redesign but I'll give that a go first.

It's not really the code, more that I can see within your code you've thrown a lot at it to try and solve the problem. I have done this plenty of times myself, it ends up being harder to debug because the code you have added to fix the bug might cause others, especially if it's not removed. Sometimes I find it easier to start again rather than trying to patch a solution that doesn't feel right. If you use Git then you can branch or stash your current work and create a new copy without losing the previous.

  • Author

I think I've got the pages working but clearly the whole thing l needs reworking.

Also realised that when switching the iPhone in question to landscape it tripped my breakpoint for delivering a desktop version of the page - which didn't help as I was frequently not looking at my "fixes" at all!

So now I need to discover whether javascript screen.width delivers physical screen pixels of mobile phones or the UIKit resolution which I think is device.width in css and design a better breakpoint.

And  I've still got @Jack 's code to play with. And so further down the rabbit hole we go.... 

  • Author
14 hours ago, fisicx said:

Does it have to be landscape?

It so much easier for people to use an app in portrait.

Thanks for the feedback. I've anguished over this for quite a while. I personally hate the rotate your device option and am considering replacing it with a screencap of the landscape image so it encourages instinctive rotation.

Originally I designed portrait and landscape versions of the pages BUT you don't get the same feel to it when the phone is in portrait ("work") orientation and people rarely switched to landscape. For these particular pages, making it easy to use isn't the primary concern, The whole point of the site is to make people stop and think and take time out. So I decided that disrupting people's expectations and making them reconsider their phone was actually a valuable aspect for the site.

Also it is ultimately a wellbeing "game" and a lot of mobile games are landscape so I didn't think it was critical. Feedback so far has been quite positive about the shift to landscape.

Having said that I intend to develop a portrait version of one the Interactive activities and watch the analytics. I also have abstract contemplations which simply fill any orientation so I'll watch their popularity too.

Fair enough, but I still haven’t worked out how to play the game.

What am I supposed to do when the numbers display? How does this help my wellbeing.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.