首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >IOS 9图标的快速操作

IOS 9图标的快速操作
EN

Stack Overflow用户
提问于 2015-12-02 23:26:04
回答 1查看 348关注 0票数 1

我试图添加快速行动菜单时,使用3D触摸我的图标。我的info.plist看起来是这样的:

代码语言:javascript
复制
<?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>UIViewControllerBasedStatusBarAppearance</key>
    <false/>
    <key>CFBundleDevelopmentRegion</key>
    <string>en</string>
    <key>CFBundleExecutable</key>
    <string>$(EXECUTABLE_NAME)</string>
    <key>CFBundleIdentifier</key>
    <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>$(PRODUCT_NAME)</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>0.3</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>3</string>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>UIBackgroundModes</key>
    <array>
        <string>remote-notification</string>
    </array>
    <array>
        <dict>
            <key>UIApplicationShortcutItemIconType</key>
            <string>UIApplicationShortcutIconTypeAdd</string>
            <key>UIApplicationShortcutItemTitle</key>
            <string>Home</string>
            <key>UIApplicationShortcutItemType</key>
            <string>quickactions.sweefties.home</string>
        </dict>
        <dict>
            <key>UIApplicationShortcutItemIconFile</key>
            <string>videow</string>
            <key>UIApplicationShortcutItemSubtitle</key>
            <string>Launch video..</string>
            <key>UIApplicationShortcutItemTitle</key>
            <string>Movies</string>
            <key>UIApplicationShortcutItemType</key>
            <string>quickactions.sweefties.movies</string>
        </dict>
        <dict>
            <key>UIApplicationShortcutItemIconType</key>
            <string>UIApplicationShortcutIconTypeShare</string>
            <key>UIApplicationShortcutItemTitle</key>
            <string>Share</string>
            <key>UIApplicationShortcutItemType</key>
            <string>quickactions.sweefties.share</string>
        </dict>
        <dict>
            <key>UIApplicationShortcutItemIconType</key>
            <string>UIApplicationShortcutIconTypeCompose</string>
            <key>UIApplicationShortcutItemTitle</key>
            <string>Message</string>
            <key>UIApplicationShortcutItemType</key>
            <string>quickactions.sweefties.message</string>
        </dict>
    </array>
    <key>UILaunchStoryboardName</key>
    <string>LaunchScreen</string>
    <key>UIMainStoryboardFile</key>
    <string>Main</string>
    <key>UIRequiredDeviceCapabilities</key>
    <array>
        <string>armv7</string>
    </array>
    <key>UIStatusBarStyle</key>
    <string>UIStatusBarStyleLightContent</string>
    <key>UISupportedInterfaceOrientations</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
    </array>
    <key>UISupportedInterfaceOrientations~ipad</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationPortraitUpsideDown</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
</dict>
</plist>

不知怎的,当在下面添加这段代码时,当我试图运行项目时,或者在尝试使用“属性列表”打开info.plist时,它会给我带来错误。

代码语言:javascript
复制
<array>
        <dict>
            <key>UIApplicationShortcutItemIconType</key>
            <string>UIApplicationShortcutIconTypeAdd</string>
            <key>UIApplicationShortcutItemTitle</key>
            <string>Home</string>
            <key>UIApplicationShortcutItemType</key>
            <string>quickactions.sweefties.home</string>
        </dict>
        <dict>
            <key>UIApplicationShortcutItemIconFile</key>
            <string>videow</string>
            <key>UIApplicationShortcutItemSubtitle</key>
            <string>Launch video..</string>
            <key>UIApplicationShortcutItemTitle</key>
            <string>Movies</string>
            <key>UIApplicationShortcutItemType</key>
            <string>quickactions.sweefties.movies</string>
        </dict>
        <dict>
            <key>UIApplicationShortcutItemIconType</key>
            <string>UIApplicationShortcutIconTypeShare</string>
            <key>UIApplicationShortcutItemTitle</key>
            <string>Share</string>
            <key>UIApplicationShortcutItemType</key>
            <string>quickactions.sweefties.share</string>
        </dict>
        <dict>
            <key>UIApplicationShortcutItemIconType</key>
            <string>UIApplicationShortcutIconTypeCompose</string>
            <key>UIApplicationShortcutItemTitle</key>
            <string>Message</string>
            <key>UIApplicationShortcutItemType</key>
            <string>quickactions.sweefties.message</string>
        </dict>
    </array>

错误消息:

数据无法读取,因为它的格式不正确。

有什么不对吗?我试过使用多个不同的代码,但仍然出错。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-12-02 23:39:13

在“常规”部分中将您的部署目标设置为9.0。

然后尝试将代码替换为info.plist中的代码。

代码语言:javascript
复制
<key>UIApplicationShortcutItems</key>
    <array>
        <dict>
            <key>UIApplicationShortcutItemIconType</key>
            <string>UIApplicationShortcutIconTypeAdd</string>
            <key>UIApplicationShortcutItemTitle</key>
            <string>Home</string>
            <key>UIApplicationShortcutItemType</key>
            <string>quickactions.sweefties.home</string>
        </dict>
        <dict>
            <key>UIApplicationShortcutItemIconFile</key>
            <string>videow</string>
            <key>UIApplicationShortcutItemSubtitle</key>
            <string>Launch video..</string>
            <key>UIApplicationShortcutItemTitle</key>
            <string>Movies</string>
            <key>UIApplicationShortcutItemType</key>
            <string>quickactions.sweefties.movies</string>
        </dict>
        <dict>
            <key>UIApplicationShortcutItemIconType</key>
            <string>UIApplicationShortcutIconTypeShare</string>
            <key>UIApplicationShortcutItemTitle</key>
            <string>Share</string>
            <key>UIApplicationShortcutItemType</key>
            <string>quickactions.sweefties.share</string>
        </dict>
        <dict>
            <key>UIApplicationShortcutItemIconType</key>
            <string>UIApplicationShortcutIconTypeCompose</string>
            <key>UIApplicationShortcutItemTitle</key>
            <string>Message</string>
            <key>UIApplicationShortcutItemType</key>
            <string>quickactions.sweefties.message</string>
        </dict>
    </array>
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/34055073

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档