I've tried requesting fullscreen, but that doesn't seem to work. Why was this feature removed?
It wasn't removed, iOS10 changed the way Safari responds to certain feature calls.
You have to use this instead on the first layout:
Browser -> Execute Javascript = "StatusBar.hide();"
Then you can request Fullscreen.
Thanks — I will try it!
It wasn't removed, iOS10 changed the way Safari responds to certain feature calls. You have to use this instead on the first layout: Browser -> Execute Javascript = "StatusBar.hide();" Then you can request Fullscreen.
Thanks! I just tried on my device and it didn't work unfortunately. Can anyone comment if it is an apple restriction?
I've talked to another developer and he tells me safari on ios doesn't respond well to js. That would explain why this doesn't work here. Is there any way in construct 2 to do this? Perhaps a way outside of C2 with custom code on the game page...
Which export tool are you using? Intel XDK, or something else? It does work. You need the external plugin for StatusBar.
Looks like there was a misunderstanding here, I'm just accessing the game through the safari webpage. It's exported as an html5 website.
https://www.scirra.com/manual/110/browser
Request fullscreen
Request that the browser enter fullscreen mode. Note the browser may ignore this request unless the action is in a user-initiated event, such as a mouse click, key press, touch event or button press. The fullscreen modes that can be entered correspond to the Fullscreen in browser project property. For more information see supporting multiple screen sizes. Note not all platforms support requesting fullscreen - use the Supports requesting fullscreen condition to check for availability.
scirra.com/manual/110/browser Request fullscreen Request that the browser enter fullscreen mode. Note the browser may ignore this request unless the action is in a user-initiated event, such as a mouse click, key press, touch event or button press. The fullscreen modes that can be entered correspond to the Fullscreen in browser project property. For more information see supporting multiple screen sizes. Note not all platforms support requesting fullscreen - use the Supports requesting fullscreen condition to check for availability.
scirra.com/manual/110/browser
That's what I've been using, I may be remembering incorrectly but I believe there used to be an event to hide browser url bar. Maybe it has been replaced by this. I was trying it at the start of layout so I tried making it a touch reacted event but that didn't seem to work either. So it appears the answer to my question is no.
What does "Supports requesting fullscreen" return, as mentioned?
Develop games in your browser. Powerful, performant & highly capable.
Safari on iOS has never supported the fullscreen API, so "request fullscreen" won't work. Hopefully they'll add support for it soon.
Safari has flip-flopped on how hiding the address bar works in pretty much every iOS update since iOS 6 that I can remember. Generally if anyone figures out how to hide it then spam websites start abusing it and then Apple change it. Chances are if you figure out how to do it, the next iOS version will break it again. Eventually I gave up trying to keep up.
Thanks for the official response Ashley
Safari has always been such a pain to work with, it's a shame it's the default browser on iphones.