5. A Player Needs to Support
• Built-in Speaker
• Headsets on Headphone Jack
• Bluetooth Headsets/Speakers
• AirPlay
• CarPlay
• Other In-Car Systems
• MIH Hearing Aids (助聽器)
7. There is only a session about
CarPlay Audio, and too much
Apple did not tell you.
8. Getting Start With CarPlay
1.Get an entitlement
2.Get test devices
3.Get your self into the mine area
(踩雷)
9. The CarPlay Experience
• You can provide only a tree structure to let users to
browse your contents
• You cannot customize user interface
• You can use only the callback block when user want to
play an item. There is no way to prompt alerts
14. Implementing CarPlay
• Implement the data source and delegate of
MPPlayableContentManager
• Set now playing info to MPNowPlayingCenter
• Implements commands of MPRemoteCommandCenter
17. WWDC 2018 #213
But if you do not
implement any command,
MPPlayerableContenManager
does not call your data source
and delegate!
18. BTW. On Apple TV,
MPRemoteController
does not work without
setting now playing info.
19. MPRemoteCommandCenter
• Since iOS 7.1
• Not only for CarPlay
• But also for controls on iOS lock screen, remote controls
on Blue Tooth headsets, other in-car system and so on
28. If you are making a player using
Core Audio, don’t call
AUGraphStop() then
AUGraphStart() immediately.
AUGraphStart()would fail
when connecting to CarPlay
29. AudioGraph
• Apple’s C API.
• Deprecated in 2019. Apple asks us to use AVAudioEngine
instead, but, let’s take a look at UIWebView…
• AudioGraph manages audio nodes. You shall put the
audio nodes into an audio graph, connect the nodes, and
then initialize the audio graph
• AUGraphStart() and AUGraphStop() are APIs for
AudioGraph
30.
31. A Core Audio Player
Remote
IO
Node
EQ Node
Reverb
Node
Mixer
Node
Audio Graph
Bus 0 Bus 0Bus 0
Bus 0
Bus 1
Render Callback Function
Render Callback Function
EQ
Audio
Unit
Reverb
Audio
Unit
Bus 1 of Remote IO
is for input
32. An iOS Streamer
Mixer
Node
Render Callback Function
Online
Data
Decrypt
DRM
Parse
Audio
Convert
to PCM
Audio
Converter
Service
or
AVAudioConverter
Audio File
Stream
Service
NSURLConnection,
URLSession…
33. A Core Audio Player on Mac
Output
Node
EQ Node
Reverb
Node
Mixer
Node
Audio Graph
Bus 0 Bus 0Bus 0
Bus 0
Bus 1
Render Callback Function
Render Callback Function
EQ
Audio
Unit
Reverb
Audio
Unit
Sub Audio Graph
34. MFi Heading Aids
Since iPhone 5
Compatible hearing devices are listed at
https://support.apple.com/en-us/HT201466