I have previously written separate articles:
- Article: Configure Audio Session for background audio mode (iOS Project)
- Article: Display now playing information in Command Center
- Article: Handle Remote Control Commands
Here is the sample project: MediaPlayerExample