"djay for iPad" How do they do it? - ios

for anyone that have seen the new "djay for iPad" application, how have they managed to access and manipulate tracks from the iTunes music library? So far it was only possible to playback the music with the MPMusicPlayerController. I have looked at iOS 4.2 but could not find any new features that indicates the trick.
Any idea?
André

It isn't actually manipulating the files in iTunes. It is reading them in and copying them to do the manipulations.

You've been able to stream from the iPod library since iOS 4.1. Have a look at AVFoundation.

Related

Convert a video into an IOS Live Photo format without an Apple device

I'm currently making live/animated wallpapers for Android phones, which is pretty easy with GIF/Mp4 files. But I would also like to make the live wallpapers compatible natively with ios/iPhones. I've seen many tutorials on how to convert a video to a Live photo but they all involve some kind of app you need to install on your IPhone. Issue is, I don't own an iPhone or any iOS device to do that and apparently iOS emulators are not a thing, so my question is :
Is it possible to convert a (mp4) video to an iOs Live photo through a 3rd party ? If so, how would you do it ?
I'm pretty inexperienced with the iOS environnement so thank you for your help !
Well, a live photo is a container that holds both a .jpeg and a H.264-encoded .mov file. More details here.
Do you have an Apple computer to do so, or do you want to create it independently from any apple hardware?
For the first case, there are a bunch of (demo) applications on github you could take a look into.
For the second case, I'm not sure if anything exists.

Audiio fiiles inside an iOS application

Is there a way inside an iOS Swift app of mine, to access the sound files I already have available in my itunes library on the same device?
Browsing the net I came accross something called File-Sharing and the UIFileSharingEnabled key, but that does not seem to be quite what I am looking for.
The files? I’m not sure.. if so only those you downloaded or bought on iTunes. For access to Apple Music you probably want to look into MusicKit.
However, there’s a way to get MediaItems via MPMediaPickerController (docs)

How to programmatically change video codec in Xamarin iOS

I've recently run into a issue with taking video on new iPhones(8 and up) written in Xamarin. When capturing the video video on older devices the codec is H.264, but on new devices Apple has switch to H.265. These videos are played in browser and pretty much everything I've checked doesn't support H.265.
Since you can change in the setting of the device between (high efficiency-H.265 and most compatiable-H.264), I figured you can do this programmatically. I haven't been able to find any information on how to do this if at all. Any help would be appreciated.
You can set the codec on a AVCaptureVideoDataOutput, which you add to your Session, through WeakVideoSettings which is just a dictionary of settings.
You can find the keys in the official apple docs: https://developer.apple.com/documentation/avfoundation/avassetwriterinput/video_settings_dictionaries

Apple Music Offline Files Have no URL?

It seems that the property MPMediaItemPropertyAssetURL on a MPMediaItem returns null when the file is one that was from Apple Music and has been made "available offline".
On the other hand, items from my original library which I uploaded to iTunes match/apple music and then make available offline don't seem to have this problem.
Is this a bug? Have I done something wrong? Anyone having similar issues?
It seems that Apple Music files are DRM-protected and subscription based, so probably Apple prohibits the use of references to these assets due to rights management.
Reference: https://forums.developer.apple.com/thread/7389
Things have changed a little and this isn't true anymore. MPMediaItemPropertyAssetURL is not nil on iOS 11 for songs saved offline via Apple Music but AVPlayer is unable to play them since they are still DRM protected. The same song returns MPMediaItemPropertyAssetURL nil on iOS 9.
If you are interested in checking for DRM protected songs or in playing such songs, you can read my detailed answer here: https://stackoverflow.com/a/47694472/4331787

Add Music to iOS programmatically

Let say I want to create an iOS app that download music files from the internet.
Is it possible then to put this music files on the Music Library so that I can play it?
It's not possible. The only way to add music to your library is through iTunes or through the iTunes Store app. Even if you did find a way, it'd probably be through some private API and you'd probably get rejected on the app store.
As Simon said, you won't get music into the native music library. You could however store the audio files and use the AVFoundation Framework (AVAudioPlayer class) to replay them. You could also possibbly use the AudioToolbox framework. Problem is you would have to implement your own music library and your own playback functionality.
Did I mention you have roughly a 0% chance of this app making it into the app store?
It is clearly possible though...even trivial...
Well, in terms of possibility, it is possible if you jailbreak your device, you'd need 2 tweaks to do it:
"Safari download enabler" or manager: to allow you to download files.
"Bride": allows you to import downloaded or saved mp3 files or mp4 video files to your iOS library.
I've been using it for a while and it works like magic
You can have private API/Library. Though I never tried, but you can.
Here is the another similar post:
Programmatically add content to music library

Resources