2
我想在我的圖標上使用3D Touch時添加快速操作菜單。我的info.plist看起來是這樣的:IOS 9圖標的快速操作
<?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的時候給我的錯誤。
<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>
錯誤消息:
的數據不能被讀取,因爲它是不正確的格式。
有什麼想法可能是錯誤的嗎?我試過使用多個不同的代碼,但仍然錯誤。
非常感謝!像魅力一樣工作! –