iOS Accessibility: Custom voice over text for bundle display name

烂漫一生 提交于 2019-11-30 00:14:47

问题


iOS voice over does not correctly read out my companies name. For example it reads out "dog" instead of "D.O.G." (not my real company name but you get the idea)

We get around this by telling the app to read out "D O G" in all places where the company name is read out.

However, voice over reads the bundle display name out incorrectly both on the app icon, and after the app has finished launching.

Is there a way to make my app read out "D O G" instead of "dog" after app launch? I would settle for forcing the app not to read out the bundle display name after app launch and then manually reading out "D O G".

(I'm assuming you can't set a custom voice over for the app icon, but bonus points for anyone that knows if I can or can't)


回答1:


As of iOS 8, you can achieve this by adding the CFBundleSpokenName key to your Info.plist.

https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/plist/info/CFBundleSpokenName




回答2:


I don't think you can provide an alternate bundle name string for VoiceOver. I was however able to find a hack that could work in your specific scenario:

VoiceOver seems to interpret various control characters differently. \u7f is one of the characters that split the word for VoiceOver and yet do not break display in launchpad. Therefore, defining bundle name as:

CFBundleDisplayName="D\U007fO\U007fG";

in InfoPlist.strings seems to achieve what you need.



来源:https://stackoverflow.com/questions/12452003/ios-accessibility-custom-voice-over-text-for-bundle-display-name

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!