I am having issues with getting input from an iPhone on html5 builds.
I have this simple “empty mobile” app on itch. It is built with Debug to get the prints but a Release version behaves the same. The only thing that I have changed is that I have added a script to print the input and change position of the logo. It works as it should on mac/windows but on iPhone the action_id is nil.
function init(self)
msg.post(".", "acquire_input_focus")
end
function on_input(self, action_id, action)
print("action_id == ", action_id)
if action_id == hash("click") and action.pressed then
print('action_id == hash("click") and action.pressed - OKAY!')
go.set_position(vmath.vector3(action.x, action.y, 0), "/go1")
end
end
I tried other Defold games, I stumbeled upon Ben James Word Worm and on that it accepts the input. I downloaded the source for it and built it with 1.2.147 and the input stopped working. I asked Ben and he said he simply uploaded the “raw” html build. His setting for Word Worm is also identical to the Empy Defold project.
Am I missing something to be able to get input from iPhones on my html5 builds?
Here is the EmptyProject (2.5 MB) files if you want to verify everything.