iOS 6 Custom URL Scheme Launch Images wrong

2019-03-30 10:42发布

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条回答
冷血范
2楼-- · 2019-03-30 10:45

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!!!

查看更多
登录 后发表回答