Accessing iOS music library - ios

I have been programming for iOS for a while. It is simply out of my passion for learning new things. Recently I was trying to access the music files that are transferred to iPhone using iTunes. I could use the mediaPlayer to access them and play the music. I was wondering if there is a way to access the core mp3 files and upload them to a personal server. This is not for an app or something, but just a new learning about iOS.
Thanks in advance,
Videep

You can imagine, for obvious copyright reasons, that you're not allowed to do this. You are able to play it because the owner of the phone owns the song and it's playing for himself, but you are certainly not allowed to upload the mp3 of the whole library of all your customers to your server...

Related

How protect music file downloaded by my music app?

I am need a solution for protect music file downloaded in an music app.
We have all rights for the audios, so, we need to garante only our app is able to play this audios.
This music app actually is only for streaming. The next update is for implement the functionality for download e play music offline.
I know Spotify , for example, use DRM protection, but it is a little bit controvercious for some people, and I think this is not what we need now.
During my researches, I dont find any concrete solution. So, my questions are which functionalities, libraries or resources can I use to protect the downloaded files.
Maybe I need to encrypt/decrypt the files? But, Swift have a native functionality for this, and have some documentation available?
So, what can I use to protect the audios with Swift, and keep playing the audio only in my own app?
This question gets asked almost daily and the answer is, and will always be, the same - if a user can play your audio on their device, then they can also extract and keep a copy of that audio - no amount of DRM, encryption or any other naive concept anyone dreams up can change this.
You can prevent "script kiddies" from just copying the files off their phone by embedding an encryption key in your app and streaming files through a stream cipher before playing them, but again, it's trivial to reverse engineer and get the key.
You can transcode your .mp3 files to HLS file which will generate one master playlist and several segment files and then you can apply ALS encryption on it using ffmpeg or Apple Media segmenter.
For More Info:
https://www.theoplayer.com/blog/content-protection-for-hls-with-aes-128-encryption

Store videos for an iOS app online or offline?

I am currently working on an iOS app where users can watch several videos (e.g. fitness videos). The videos are all captured by my team, so I don't need access to external videos.
Now my question is, does it make more sense to store the video files offline right in the app or use some kind of online server (and which one would you recommend)? I don't want to embed Youtube videos.
Thanks in advance!
It is always better to go online. Because the size of video may vary and huge video files would scrap user device's memory. SO it is recommended to use an external server to host the video files.
You can also add an option to download the files if needed.

How To Push Music Playable Data Streamed From Spotify To A Device That Does Not Use The SDK Provided By Spotify

I apologise for the possibility of the title of my question would lead to confusion of the problem. For that I will explain my purpose in detail.
We are currently developing our own wifi speaker which is built with MIPS. The speaker comes with an app that will be used to manage it. One of the features that would we would like to include in the app is accessing contents of Spotify and be able to play them on the speakers.
Unfortunately, after going through the iOS SDK Documentation, and did some tests on Web API Console provided by the official of Spotify, I noticed that Spotify does not allow developers to directly get URL of a song, except for preview purposes. I also wasn't able to find any way to get the data bytes of the music streamed from the server. Every content comes with a corresponding URI which is used for a request.
For the device(WiFi Speaker) part, we recently tried to contact Spotify and ask for an SDK that can be used for development. However, one problem is that Spotify told us that they have SDK for x86, and ARMs architecture only. They don't have MIPS.
Now, here are my questions:
Is there any way for me to push music from an app to the WiFi Speakers without having to use SDK (for backend device)?
If Spotify can provide an SDK for our device, then how can we integrate the SDK with our platform?
I'll explain my 2nd question for clarity. Like for instance, in Android and iOS, these are popular platforms and are widely used by mobile devices. So if they provide SDKs for the two OS, then they can use default system frameworks to access the player for playing the content. (In iOS, it's the AVFoundation Framework). However, if Spotify were able to provide the SDK that we need, how would we able to integrate that with our own platform?
I will answer your question no 1:
You should be able to push music from an app using a buffer that you can read from using Core Audio and also forward to a device of your choice. I think what you are looking for can be found at CocoaLibSpotify

Simplest way to get an audio file from an iOS app into the user's music library without violating app store terms

I'm making an iOS app in which I'd like to allow the user to save an audio file (a specific file that the app uses internally, not just any arbitrary audio file) to their music library so they can play it from other apps on the device. Ideally I'd like to save a sound directly to the users music library, but it seems from other similar questions that this is not possible. File sharing with iTunes seems to be the next best solution.
Is there anything about using the iTunes file sharing option for saving audio in this way that violates the app store terms?
Is this the path of least friction for the user, or is there another way to achieve this that I'm missing?

Read user's music library within Phonegap

I'm currently developing an app with Phoengap which uses peer-to-peer connection through WebRTC. For my purposes I need to list the sounds available on the user's device.
So I'd like to know if it's currently possible with Phonegap to gain access to the user's music library and e.g. list all available songs sorted by artists? I came across this article from Aurelio de Rosa but I tested it and it doesn't seem to work on iOS.
Any suggestions? Or is there maybe a plugin around which I'm not aware of?
You can find the iOS SDK, Music Library Access example code here. I expect you will need to write a plugin to expose this to Cordova.
Your link should work, but only with music that you store inside your app sandbox or inside the assets (inside www folder).
If you want to use the music library you will need a plugin
I have found one, but it's very old, you will need to update it. It searchs the music and plays it natively too
https://github.com/hutley/HelloPhoneGap1.0/tree/master/HelloPhoneGap1/Plugins/iPod
here you can find a tutorial about how to create a music player using Music Library Access, but it's in japanese. The code is in english http://blog.asial.co.jp/884

Resources