Jump to content

Loss of focus on iOS9 devices after ad shows


Riddik
 Share

Recommended Posts

Hi!

 

After the ad triggers and you close the ad, a game don't get the focus back. The issue is present only iOS9 - devices.
 
In callback func which calls after the ad closing I set up game.paused = false; And music continues, update logic continues, but not the input - it makes any tap to impossible, all buttons don't work.
 
I need to return the input focus back to the game. Is it possible to make something with this? 
 
I use Phaser 2.4.3 version, and disableVisibilityChange = false; Before showing the ad, I set pause, and unpause after closing.
Link to comment
Share on other sites

Tom Atom,   I've called  "window.focus();" after ad close - unfortunately it didn't help and the iOS 9 issue is still there :( :(  :(

 

I figure out that the problem is on sponsor side.
The game places into an iframe, and after show ad the iframe loses focus. Perhaps some divs overlaps the game div or something else.
 
Is it possible to return focus back to the iframe?
Link to comment
Share on other sites

I've called  "window.focus();" after ad close - unfortunately it didn't help and the iOS 9 issue is still there

 

 

Just add this as global object:

var PhaserGlobal = {    stopFocus: true}

I had the same problem with iOS (iOS8) - once the focus was lost I never got it back again (game was also in iframe). This global object hepled me - give it exactly the name as it is here and place it in code before game is created. Calling windows.focus did not help me.

Link to comment
Share on other sites

Thanks again, but I can't say that method works or not, because we found out that the issue is something between iOS9 and the Gamesplaza Portal Base Template (test portal).

 

 

Is the iframe loaded through https? because ios9 doesn't allow loading http domains now.

 

Indeed the iframe is loaded  through http. Thank you for this point!

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...