Can an iphone app add music to itunes? - iphone

Is it possible for an iphone app to directly add content to itunes, either directly on the phone, or by automatically (i.e. no user actions required) syncing when the iphone is connected to a computer?
If not, what is the fall back? One suggestion what was made to me is that the user can drag and drop files from the apps' Documents folder into the Music folder.
Thanks

Unfortunately, there's no way to do that without using private APIs. I'd enable UIFileSharing and let the user email the audio file, so they may add it manually.

Related

Browsing an apps folder structure on an iDevice

When I plug my iPhone into the computer can I access an apps folder structure that's on the phone? Either programatically or manually with a tool that doesn't involve jailbreaking.
Have you tried iExplorer? See if that satisfies your requirements.(It doesn't need the device to be jailbroken).
It cant be done without jailbreaking, you basically must create your app folder structure with xcode.

Transfer file from Mac/PC to iPhone App Document folder

I want to transfer file from system (mac/Pc), which is present on my iPhone wifi network, to the document folder of my iPhone App.The scenario of my App is this, it will browse the system which are present in it's network. select any file(such as .pdf or ,docx) from that system(mac/Pc), copy it into the document folder of the APP and than use it with in the APP.During my search i come across the link iPhone : Transfer of files from Mac/Pc to app i have not found the detail instruction document, how to use it. Is Apple support any API or farm work to do this ? Please guide me
This is called iTunes file sharing. In the most simple way, you simply set the UIFileSharingEnabled key in your Info.plist file to YES. See for example this tutorial.
Rewriting itunes is not a simple task but I recommend you a clever and easier solution:
Implement a simple webserver on your iOS app. Write a windows application which will connect to your iOS app through wifi network. Then transfer the necessary files this way: you will send a file to you app, then your app should save it in documents directory.

Is it possible to download songs from app to itunes library

I've seen a lot of questions out there looking to play music from the user's library on the app, or to access iTunes from the app to download things, but I'm looking to do the opposite. I'm creating an app for a local band, and they are supplying 5 full length songs to include in the app, and I thought it would be a nice touch to include an option to download the songs from the app into the users iTunes library (at the request of the user of course). Is there a way to make this work?
Probably not. Apple doesn't want you in there, because you could have the ability to mess some things up. If you've ever used a ringtone app, they actually have you copy the ringtones onto your computer, and then reinsert them onto the device as a ringtone, because the app doesn't have access to the ringtone section, so you probably can't do that with songs. I know you don't want to hear this, but you're better off just putting the songs onto the iTunes Store and then putting a link in your app to the songs on iTunes.

iPhone "Share" button

Is there anything like the Android's "Share" button in iPhone?
I am just starting out in iOS development and do not have an iPhone (yet). The idea is to be able to select documents or images saved on the phone and use them in my app. I realize there is an ImagePickerController but that is not what I am looking for. I am also not looking for a third party component, rather something integrated into the OS similar to Android.
Short answer: No.
You can register your app to handle certain file types, and files of those types can then be opened by your app via UIActionSheets that may appear, for example, when you tap and hold on a file in an email. You can also transfer files to your app via iTunes. There's no 'file explorer' type feature in iOS where you can pull up a view of files saved to your phone.
For images, as you mentioned already, you must use UIImagePickerController.
From documentation
Sharing Files with the User
Applications that want to make user data files accessible can do so using application file sharing. File sharing enables the application to expose the contents of its /Documents directory to the user through iTunes. The user can then move files back and forth between the device and a desktop computer. This feature does not allow your application to share files with other applications on the same device, though. To share data and files between applications, you must the pasteboard or a document interaction controller object.
You can read more here:
https://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/StandardBehaviors/StandardBehaviors.html%23//apple_ref/doc/uid/TP40007072-CH4-SW7

iTunes Documents Directory in my app

how can I setup my app to accept documents via iTunes, like the Air Sharing or VLC app?
I mean, I want to allow users to get content from the app using iTunes.
Anyone know how?
Thanks
Copied from http://developer.apple.com/library/ios/releasenotes/General/WhatsNewIniPhoneOS/Articles/iPhoneOS3_2.html#//apple_ref/doc/uid/TP40009337-SW11.
To enable file sharing for your application, do the following:
Add the UIFileSharingEnabled key to your application’s Info.plist file and set the value of the key to YES.
Put whatever files you want to share in your application’s Documents directory.
When the device is plugged into the user’s computer, iTunes displays a File Sharing section in the Apps tab of the selected device.
The user can add files to this directory or move files to the desktop.