guannstar
What do you use to compile your app? Cocoon or Phonegap?
Anyway, you can debug your app and check what it writes in console. If it happens on your mobile device, but works in preview, then you should just simply follow this steps:
- Connect the phone to your computer with the wire
- Press F12 on a blank tab in Chrome
- Find 3 vertical dots near to X at top-right corner and press it
- More tools
- Remote devices
- You'll see your device in the list, press it and find your app
- Press inspect
Then find the console and check it if there any errors.
P.s the code I said to use couldn't break your game because it works only after some condition triggers
Sorry if there's a lot if mistakes. I'm not so good at English