播放提示音(与默认消息铃声相同) [英] Play alert sound (same as default message ringtone)

查看:27
本文介绍了播放提示音(与默认消息铃声相同)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以播放一些默认声音,例如收到传入的短信/推送时?

Is it possible to play some default sounds, such as when an incoming SMS/push is received?

如果 iOS SDK 没有捆绑这些声音文件,我在哪里可以下载相同的声音?

If iOS SDK does not bundle these sound files, where can I download the same sounds?

推荐答案

是的,这是可能的,但他们使用 未记录的枚举值,这意味着您不应在 AppStore 应用中使用它.

Yes it is possible, but they use undocumented enum values, that means you should not use it on AppStore apps.

AudioServicesPlaySystemSound(1003);

iOS SDK 不捆绑这些声音文件,但您可以在设备上的 /System/Library/Audio/UISounds/ 文件夹中找到它们.但是,我相信这些文件是受版权保护的.

iOS SDK does not bundle these sound files, but you can find them on the device in the /System/Library/Audio/UISounds/ folder. However, I believe these files are copyrighted.

为什么不自己创造声音?

Why not create a sound yourself?

这篇关于播放提示音(与默认消息铃声相同)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆