简体   繁体   中英

How to set audio file as ringtone in iphone programmatically

I have created an application. In that, I have to list of audio files and "Set as ringtone" option there. I don't know how to set audio file as ringtone.

It is not possible in iOS.There is no API for setting ringtone. Apple does this for security and safety reasons But u can make ur audio as ringtone through itunes

Enable "itunes file sharing" in info plist

This will help in that case How to add a ringtone from an application to ringtones of iphone?

You cannot. Apple doesn't release an API to export/write ringtones to the operating system. But u can make ur audio as ringtone through itunes

Use iTunes file sharing in your app and copy the ringtone file to the app's documents directory.

Set "Application supports iTunes file sharing" to YES in your info.plist

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM