Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Playing audio on iOS [BGTaskSchedulerPermittedIdentifiers] #695

Open
olgam4 opened this issue Jan 26, 2025 · 1 comment
Open

Playing audio on iOS [BGTaskSchedulerPermittedIdentifiers] #695

olgam4 opened this issue Jan 26, 2025 · 1 comment

Comments

@olgam4
Copy link

olgam4 commented Jan 26, 2025

Hey peeps! I've succeeded in making rodio work on iOS! Now, tho, I have a new problem.

Down the road, it uses coreaudio et cetera with cpal, but the problem is that iOS and the Apple mobile ecosystem is very restrictive with what can run in the background. Making a music app, it makes it hard that I need the app to be in the foreground to have the audio run... So I'm trying to make my app have Background Modes, from Xcode.

So, BGTaskSchedulerPermittedIdentifiers seems to be the key you need to add to your Info.plist for iOS to make your app have background tasks, but making those tasks run from Rust seems to be my problem.

How can I make my Rust code run in the background? Especially the Rodio part of my app, any ideas?

Thanks a lot!

@dvdsk
Copy link
Collaborator

dvdsk commented Jan 27, 2025

Probably some OS API you have to call to set something up. I suggest asking on the forum again, this is not just a thing for audio but a wider IOs specific principle. Again let us know if you figure it out. I think your journey making a music app in rust might make a good blog post (if you got a blog). Since I can not find anything about it googling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants