iOS 6 Custom URL Scheme Launch Images wrong

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-05 00:47:25

问题


I have implemented custom URL schemes in my application. Also I have different names for the splash image using the UILaunchImageFile key in the info.plist. The documentations says:

If your app supports one or more custom URL schemes, it can also provide a custom launch image for each URL scheme. When the system launches your app to handle a URL, it displays the launch image associated with the scheme of the given URL. In this case, the format for your launch image filenames are as follows:

<basename>-<url_scheme><scale_modifier><device_modifier>.png

The modifier is a string representing the name of your URL scheme name. For example, if your app supports a URL scheme with the name myscheme, the system looks for an image with the name Default-myscheme.png (or Default-myscheme@2x.png for Retina displays) in the app’s bundle. If the app’s Info.plist file includes the UILaunchImageFile key, the base name portion changes from Default to the custom string you provide in that key.

Note: You can combine a URL scheme modifier with orientation modifiers. If you do this, the format for the filename is

<basename>-<url_scheme><orientation_modifier><scale_modifier><device_modifier>.png.

For more information about the launch orientation modifiers, see “Providing Launch Images for Different Orientations.”

on iOS 5 the correct splash image for the scheme is presented but on iOS 6 it shows the normal splash image. I discovered that if I rename it using the "Default" basename it works fine on iOS 6 but this will mess up my project. Thus I will not be able to support multiple versions

Anyone has the same problem?


回答1:


Well issue solved. FYI everyone out there that has value for the key UILaunchImageFile with a file extension at the end of the base name. This is the problem. So do not include file extensions like ".png" in your basename for the launch image!!!



来源:https://stackoverflow.com/questions/13235862/ios-6-custom-url-scheme-launch-images-wrong

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