3

自从将 Xcode 升级到 v5 并将启动和应用程序图标图像转换为图像资产目录后,我一直无法在 iOS 6.1 和 iOS 7 的报刊亭中看到我的应用程序的报刊亭图标。相反,我看到的是常规应用程序图标. 我仍然在针对 iOS SDK 6.1 进行编译,因为 iOS 7 中的样式发生了明显的变化,我还无法深入测试。

也就是说,这是我在我的报亭图标 icon-newsstand.png 上尝试过的:

  1. 将 icon-newsstand.png 转换为位于 ./Images.xcassets/icon-newsstand.imageset/icon-newsstand.png 的资产目录。
  2. 将 icon-newsstand.png 作为项目的一部分保存在我的 Resources 文件夹中。

这些解决方案都不起作用。这是我的 info.plist 供参考。我已经编辑了应用程序名称,仅供参考。

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleDevelopmentRegion</key>
    <string>English</string>
    <key>CFBundleDisplayName</key>
    <string>---- ----</string>
    <key>CFBundleExecutable</key>
    <string>${EXECUTABLE_NAME}</string> 
    <key>CFBundleIcons</key>
    <dict>
        <key>UINewsstandIcon</key>
        <dict>
            <key>CFBundleIconFiles</key>
            <array>
                <string>icon-newsstand.png</string>
            </array>
            <key>UINewsstandBindingEdge</key>
            <string>UINewsstandBindingEdgeLeft</string>
            <key>UINewsstandBindingType</key>
            <string>UINewsstandBindingTypeMagazine</string>
        </dict>
    </dict>
    <key>UIBackgroundModes</key>
    <array>
        <string>newsstand-content</string>
    </array>
    <key>UINewsstandApp</key>
    <true/>
    <key>CFBundleIdentifier</key>
    <string>com.----.----</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.1</string>
    <key>CFBundleName</key>
    <string>---- ----</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>2.0.1.13830</string> <!-- The Version of the app. -->
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>UIPrerenderedIcon</key>
    <true/>
    <key>UIStatusBarHidden</key>
    <true/>
    <key>UISupportedInterfaceOrientations</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationPortraitUpsideDown</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
    <key>UISupportedInterfaceOrientations~ipad</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationPortraitUpsideDown</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
    <key>CFBundleURLTypes</key>
    <array>
        <dict>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>CFBundleURLName</key>
            <string>FB Connect</string>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>fb150871295037449------</string><!-- The app id must be appended to the end of this string. Example: <string>fb150871295037449connections</string>  -->
            </array>
        </dict>
    </array>
</dict>
</plist>

在升级 Xcode 并转换为图像资产目录之后,有没有人遇到过这个问题?有没有人知道从哪里开始对我的项目进行更改?到目前为止,从我的搜索来看,在线和 StackOverflow 上关于 Newsstand 和 Xcode 5 问题的详细信息很少。

我将不胜感激任何帮助。谢谢!

4

1 回答 1

7

我发现这个问题只发生在 iPad 上。自从发现之后,我意识到我的 info.plist 中缺少一个部分,如下所示:

    <key>CFBundleIcons~ipad</key>
    <dict>
        <key>UINewsstandIcon</key>
        <dict>
            <key>CFBundleIconFiles</key>
            <array>
                <string>icon-newsstand.png</string>
            </array>
            <key>UINewsstandBindingEdge</key>
            <string>UINewsstandBindingEdgeLeft</string>
            <key>UINewsstandBindingType</key>
            <string>UINewsstandBindingTypeMagazine</string>
        </dict>
    </dict>

谜团已揭开!

于 2013-11-19T15:26:25.110 回答