How to manage multiple Airplay receivers on iOS? - ios

I want to create an app that can play music from my iOS device to multiple Airplay speakers. I know that MPVolumeView natively lets you do this on 1 Airplay receiver, so that is not the solution I need. There is an iOS app in the store that does this: Whaale.
How do they do it? I am happy to use private APIs, as I do not plan to release this as a public app right now.

While I cannot answer specifically, I can point you to a few things I've discovered:
- There are a few apps that do this for IOS.
- All of them have the limitation that they can only stream music that is not through itunes and that exist on the device as music files.
- no streaming is available (Pandora, Spotify, etc.)
Good Luck!
Robert

Related

iPhone App: "Inject" audio files into phone conversation

After Googleing and looking through StackOverflow, I haven't found a suitable solution to "inject audio from an iPhone app into an ongoing phone conversation."
As an iPhone app dev newbie, I found Intercepting phone call - iPhone (correct method to hook in CoreTelephony), but I don't want to do ant jailbreaking. I want my iPhone app to insert pre-recorded phrases and noise effects into an ongoing phone conversation.
Can anyone tell me where I would start with that? Any hints, links or just some "general direction" advice would be much appreciated.
The iOS security sandbox actively prevents any (non-Apple) app from injecting audio into another app, such as the Phone app, where inter-app audio is not explicitly supported.

Play Apple Music through 3rd party app on tvOS?

As we can play apple music songs by third party applications on iOS.
As we know Apple given Apple Music Support on tvOS as well. So is it possible to play Apple Music songs from my tvOS application like iOS
On Apple Documentation here it is clearly said that Apple Music is only possible to play by using MPMusicPlayerController but it seems that Apple haven't given access of MPMusicPlayerController in tvOS
any idea.
Short Answer: No, you are not able to play music from Apple Music in your own apps.
Music Library
MPMusicPlayerController and the rest of the MediaPlayer.framework are a set of classes that allow you to play (and browse) the users Music Library.
The Music Library is actually different to Apple Music, it's the collection of music stored on the users device. This could be music purchased through the iTunes store, songs synced through iTunes on a computer or tracks from Apple Music downloaded to the device for offline playback.
Because the Apple TV isn't a portable device, it doesn't really make sense to have a physical music library on the device (it's permanently connected to the internet) so without a physical music library there is no point giving developers access to it.
This is why MPMusicPlayerController isn't available on tvOS.
Apple Music API
If however you wanted access to an actual Apple Music API (like the one Sonos use), you are also out of luck i'm afraid.
This API allows third parties to connect with the Apple Music platform and allow streaming of music directly from Apple's servers however as far as i've seen, Apple only work with select manufacturers (currently only Sonos that we know of) and it doesn't really make sense for them to open something like that up to the public.
With multitasking and the ability to play Apple Music already on the Apple TV already there isn't really a reason why Apple should need to give developers access to play Apple Music within their own apps.
Own Music
If you actually wanted the ability to play your own music files on tvOS, you could do this using AVAudioPlayer.
The Apple Music API is iOS only and isn't (yet) available for apps written for tvOS.

can Apple watch stream music as standalone app

We have an iphone app which is used to stream Music and video and we are planning to develop a Watchkit extension for same.
is it possible for applewatch extension to stream music without iPhone, or
say it is possible to do streaming music when you are not near to your iPhone. or
Watch extensions are depends upon phone to make network calls.
before starting development we are confused .
I don't think that is possible. You can't play a sound on the Apple Watch speaker.
When you play a sound from the extension, it is played on the iPhone as the extension lives on the iPhone.
The only way to play a custom sound through the Apple Watch is to set a custom sound file for a notification but I don't think this fits your case.
As of watchOS 6, it is now possible to both build a standalone watchOS app and stream audio as well.

How to get audio from AppleWatch like Shazam does?

Recently I have realized that Shazam has developed an AppleWatch application but in many questions and answers in StackOverflow, we have talked about the no possibility of recording audio directly from your watch.
Does a new way exist to do it?
The Shazam app simply activates the app on your phone. The WatchKit SDK doesn't allow access to the mic. They mention this in their marketing materials and such.

Can I add a track to an iPhone's music player from another application?

I know the answer to this is probably no, but is there any way to add an AAC file to an iPhone's music library from another application? Apple's iPod library APIs allow for an application to use tracks from the library but I can't find anything to suggest it is possible to add them as well.
Unfortunately it is a one way process. Have a look at the About iPod Library Access.
iPod library access is the iOS interface for retrieving and playing
items from the device iPod library. The iPod library is the set of
media items on a device that a user has synced from iTunes on the
desktop.
Short of jailbreaking the device I dont think this is possible.

Resources