• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

HTML5 Touch input does not work on iOS 10.3 beta.

Coded Games

Member
Since iOS 10.3 beta 1 was released every GameMaker HTML5 game I have tested no longer can get touch input, making them all unplayable.

Now that we have gone through 7 betas, all with this bug, it's time to start figuring out what is going wrong. I am using the latest version of GameMaker: Studio 1.4 and have tested a number of games both on an iPhone 7 and an iPad Pro, both devices have this bug. This bug also affects every web browser that I have tried.

One thing that I noticed that is rather strange is that once the game is loaded you can still scroll the page up and down, this is something that you could not do before. Along with that, you can select the entire page if you tap a few times, also something that you could not do prior to iOS 10.3.

I have reported this bug to both YoYoGames and Apple but haven't gotten any responses about it. All of my attempts at fixing this haven't made any difference.

New Discovery: I tested another random game and noticed that I could tap the enable sound button in it. After that touch input stopped working and if I pressed anywhere outside the button touch input would stop working. My current theory is that the mouse pressed event is firing once and then gets stuck before the mouse event fires. The game isn't completely freezing though, which is strange.

Any incite or suggestions on what might be causing this problem would be greatly appreciated. If you want me to test your game please post a link to it below.
 

Coded Games

Member
Your game is affected by the bug. You can get past the enable sound screen but after you touch anything once touch stops working after that. All of my testing has been in GM:S 1.4, was this game made in GMS 2? I was hoping using that might fix the problem but haven't gotten around to testing it myself.
 
Well that's annoying. Thanks for trying.

This was made in 1.4. I tried moving over to 2 a couple of weeks ago but I have encountered crippling bugs, so I'm back to 1.4 at the mo. Now that's on the verge of not working too :mad:

I'm guessing True Valhalla's games are affected too? Maybe it'll take someone with some clout to get it fixed.
 

Coded Games

Member
I tried a couple of his games and they are also broken. I have yet to find a game made with GMS that doesn't have this bug.

It's pretty normal for iOS betas to have bugs with HTML5 games but this one is definitely the worst I have seen. The fact that it's been around for 7 betas is truly worrying. Especially since the last 4-5 betas have supposed to be all bug fixes. I'm still hoping that Apple gets whatever is causing this fixed before release.

Update: When I touch the screen I get this error (or something similar) in three different games I tried:

TypeError: _n21.noteOn is not a function. (In '_n21.noteOn(0)', '_n21.noteOn' is undefined)

The noteOn function seems to be the source of the problem. Unfortunately my knowledge of Javascript is rather limited so I'm not completely sure how I would go about debugging this.
 
Last edited:
Hmm, well I optimistically hope it's fixed before 10.3 is rolled out. I was on the verge of trying to sell/promote a few games I've made but will hold fire just in case. Don't want to find as I'm trying to sell my games they don't work on ios - that would be a bit of an issue!

Is that error from the obfuscated versions or run in debug mode? I suspect it won't make a difference and the error is buried in GM functionality, but on the off chance just wondering if it relates to a code function being used by the developer... Unlikely but never know.

My JavaScript knowledge is limited too - really need to improve it. But will try and do some research on noteOn later.
 

chmod777

Member
Seems to be an issue with AudioContext, with "noteOn" being the old method of "start" (so can you try replacing all the "noteOn"with "start" in your file?).
 

Coded Games

Member
Glad to hear that it is fixed in the latest version but is there a way that I could manually fix this without having the wait for the update and recompiling my games? For example I could add a noteOn function to my javascript files that doesn't do anything so that I don't get the undefined error. Would that fix it? The reason I'm asking is because some of my games have bugs in newer versions of GMS while they don't in older so I would be nice just to add a little to the Javascript file instead of having to update them.
 

Coded Games

Member
I found that if you go into the console, find the function causing the error, and delete it from your Javascript file, it seems to fix the problem. Although, for some reason I'm not getting audio now if I play my game in the Safari browser but sound does work if I add the page to my home screen. Strange.
 

chmod777

Member
So, iOS 10.3 is now out of beta and the games still crash.

I have written a fix, I have not tested much yet but it seems to be fine in all desktop browsers and... iOS 10.3 of course (well I hope the fix has not broken anything on 10.2 but it shouldn't).

FIND:
Code:
if(window.hasOwnProperty('AudioContext')&&(!window.hasOwnProperty('webkitAudioContext')||window.webkitAudioContext.prototype.createGainNode===undefined)){window.webkitAudioContext=AudioContext;
AND REPLACE:
Code:
if(window.hasOwnProperty('AudioContext')||(window.hasOwnProperty('webkitAudioContext')&&window.webkitAudioContext.prototype.createGainNode===undefined)){if(window.hasOwnProperty('AudioContext'))window.webkitAudioContext=AudioContext;else window.AudioContext=webkitAudioContext;
 
N

N8Games

Guest
So, iOS 10.3 is now out of beta and the games still crash.

I have written a fix, I have not tested much yet but it seems to be fine in all desktop browsers and... iOS 10.3 of course (well I hope the fix has not broken anything on 10.2 but it shouldn't).

FIND:
Code:
if(window.hasOwnProperty('AudioContext')&&(!window.hasOwnProperty('webkitAudioContext')||window.webkitAudioContext.prototype.createGainNode===undefined)){window.webkitAudioContext=AudioContext;
AND REPLACE:
Code:
if(window.hasOwnProperty('AudioContext')||(window.hasOwnProperty('webkitAudioContext')&&window.webkitAudioContext.prototype.createGainNode===undefined)){if(window.hasOwnProperty('AudioContext'))window.webkitAudioContext=AudioContext;else window.AudioContext=webkitAudioContext;
This doesn't seem to do anything to help with touch input in my project got iOS 10.3

I have a series of buttons that basically take you to the next room and the first one works, but then after that none of the rest work. Same button just directs to different room.

Any ideas?

Thank you.
 

chmod777

Member
Which version of GMS are you using? Because this should work on projects exported from the last stable (1.4.1763) and in EA <= 1.99.525.
 

Jack S

Member
There seems to be an issue with mobile browsers (or chrome dev tools set to mobile emulation) where no touch inputs are registering (mouse_check_button and device_mouse_check_button ) function groups are not firing at all. Only on mobile tho - desktop browsers work fine and as expected.

I also noticed that mouse_x and device_mouse_x are only updating on mobile / mobile emulation when the user clicks (which is somewhat expected since it's expecting touch.)
 
N

N8Games

Guest
I'm still having this issue with my HTML5 games when trying to play them on iOS device. How did you guys solve this?
 
I'm still having this issue with my HTML5 games when trying to play them on iOS device. How did you guys solve this?
This isn't an issue anymore as far as I'm aware.

Have you implemented the hot fix above? Tbh I don't know if this has now been fixed in 1.x as I've moved to 2, and there's no issues there. But the hot fix definitely works if it still hasn't been fixed. What version are you using?

Finally, have you tried to build a simple project and see if that works? As it might be an issue with your code?
 
N

N8Games

Guest
This isn't an issue anymore as far as I'm aware.

Have you implemented the hot fix above? Tbh I don't know if this has now been fixed in 1.x as I've moved to 2, and there's no issues there. But the hot fix definitely works if it still hasn't been fixed. What version are you using?

Finally, have you tried to build a simple project and see if that works? As it might be an issue with your code?
I retried the hot fix and it seems to be working now. I must have done it wrong the first couple of times. Thank you for providing that by the way.

Doesn't this hot fix have a negative effect on game audio?

I'm running version 1.4.1763 I even uninstalled & reinstalled GMS to make sure I was running the most up to date version. I wish they'd fix this I only purchased the engine and all the modules less than 6 months ago. :(
 

True Valhalla

Full-Time Developer
GMC Elder
This is officially fixed in the latest EA release (1.99.548) Thanks to everyone who shared hotfixes during the waiting period.
 
N

N8Games

Guest
This is officially fixed in the latest EA release (1.99.548) Thanks to everyone who shared hotfixes during the waiting period.
I see it's fixed in the Early Access but not the stable version yet. Thank you for pointing that out. I'm still new to Game Maker so I will try this version.
 
Top