Stop or continue Hype project audio on iOS lock screen in Xcode

Oooh. I love that. Sure beats my current way of sending each binary to Testflight, then being puzzled after a long wait for Apple's servers to make it available...

Thanks @Photics for the blow-by-blow breakdown.
So I could use Mozilla's (experimental) cancelAndHoldAtTime() function (link) to stop all sounds and in an ideal world even pick up where we left off upon change to visible...

Though, all that goodness still won't eliminate the control center displaying the last played audio file the way @MarkHunte managed to correct by letting the AVAudioPlayer (iOS) handle audio.

1 Like

Apple just approved my iOS app despite the violation of background audio declaration.

I hope this helps anyone using Hype to create iOS apps without wanting to start coding around Mozilla’s and iOSs weird tango of HTML audio handling.

@MarkHunte and @Photics: Thanks for the generous help and insights.
Yes, @Photics, I left a gushing review in the Mac App Store for your app “Wrapping”.

Now I’ll go and improve the app’s user experience by using @MarkHunte’s code above. Apple doesn’t require it nor will most users ever be put off by the persistent audio but you may as well do things right…

3 Likes