UIApplicationShortcutItem 未显示基于 Info.plist
UIApplicationShortcutItem not showing base on Info.plist
我的 plist 中定义了 5 个项目。只显示了4个。♂️
我在 Simulator
和 实际 iPhone XS Max
.
中尝试过
<array>
<dict>
<key>UIApplicationShortcutItemIconFile</key>
<string>home</string>
<key>UIApplicationShortcutItemTitle</key>
<string>Home</string>
<key>UIApplicationShortcutItemType</key>
<string>homePressed</string>
</dict>
<dict>
<key>UIApplicationShortcutItemIconFile</key>
<string>security</string>
<key>UIApplicationShortcutItemTitle</key>
<string>Security</string>
<key>UIApplicationShortcutItemType</key>
<string>securityPressed</string>
</dict>
<dict>
<key>UIApplicationShortcutItemIconFile</key>
<string>alert</string>
<key>UIApplicationShortcutItemTitle</key>
<string>Alert</string>
<key>UIApplicationShortcutItemType</key>
<string>alertPressed</string>
</dict>
<dict>
<key>UIApplicationShortcutItemIconFile</key>
<string>network</string>
<key>UIApplicationShortcutItemTitle</key>
<string>Network</string>
<key>UIApplicationShortcutItemType</key>
<string>networkPressed</string>
</dict>
<dict>
<key>UIApplicationShortcutItemIconFile</key>
<string>settings</string>
<key>UIApplicationShortcutItemTitle</key>
<string>Settings</string>
<key>UIApplicationShortcutItemType</key>
<string>settingsPressed</string>
</dict>
</array>
结果
我做错了什么吗?
根据Apple:
The system limits the number of quick actions displayed when a user presses a Home screen app icon. Within the limited set of displayed quick action titles, your static quick actions are shown first, starting at the topmost position in the list. If your static items do not consume the permissible number for display and you have also defined dynamic quick actions using this class, then one or more of your dynamic quick actions is displayed.
即系统规定显示的最大项目数,并选择您提供的前 n 个项目进行显示。
我找不到显示确切限制的任何地方,但我还没有看到任何应用超过 4 个项目 + "share" 项目。
我认为有四个项目的限制,查看 documents
The system limits the number of quick actions displayed when a user
presses a Home screen app icon. Within the limited set of displayed
quick action titles, your static quick actions are shown first,
starting at the topmost position in the list. If your static items do
not consume the permissible number for display and you have also
defined dynamic quick actions using this class, then one or more of
your dynamic quick actions is displayed.
更新讨论
关于分享 项目:
Apparently iOS adds SHARE automatically BUT only if the app is
installed from Appstore. – kyo
这使它们成为四个 + 共享项,因为 AppStore 会自动在每个下载的应用程序上添加共享应用程序项
我的 plist 中定义了 5 个项目。只显示了4个。♂️
我在 Simulator
和 实际 iPhone XS Max
.
<array>
<dict>
<key>UIApplicationShortcutItemIconFile</key>
<string>home</string>
<key>UIApplicationShortcutItemTitle</key>
<string>Home</string>
<key>UIApplicationShortcutItemType</key>
<string>homePressed</string>
</dict>
<dict>
<key>UIApplicationShortcutItemIconFile</key>
<string>security</string>
<key>UIApplicationShortcutItemTitle</key>
<string>Security</string>
<key>UIApplicationShortcutItemType</key>
<string>securityPressed</string>
</dict>
<dict>
<key>UIApplicationShortcutItemIconFile</key>
<string>alert</string>
<key>UIApplicationShortcutItemTitle</key>
<string>Alert</string>
<key>UIApplicationShortcutItemType</key>
<string>alertPressed</string>
</dict>
<dict>
<key>UIApplicationShortcutItemIconFile</key>
<string>network</string>
<key>UIApplicationShortcutItemTitle</key>
<string>Network</string>
<key>UIApplicationShortcutItemType</key>
<string>networkPressed</string>
</dict>
<dict>
<key>UIApplicationShortcutItemIconFile</key>
<string>settings</string>
<key>UIApplicationShortcutItemTitle</key>
<string>Settings</string>
<key>UIApplicationShortcutItemType</key>
<string>settingsPressed</string>
</dict>
</array>
结果
我做错了什么吗?
根据Apple:
The system limits the number of quick actions displayed when a user presses a Home screen app icon. Within the limited set of displayed quick action titles, your static quick actions are shown first, starting at the topmost position in the list. If your static items do not consume the permissible number for display and you have also defined dynamic quick actions using this class, then one or more of your dynamic quick actions is displayed.
即系统规定显示的最大项目数,并选择您提供的前 n 个项目进行显示。
我找不到显示确切限制的任何地方,但我还没有看到任何应用超过 4 个项目 + "share" 项目。
我认为有四个项目的限制,查看 documents
The system limits the number of quick actions displayed when a user presses a Home screen app icon. Within the limited set of displayed quick action titles, your static quick actions are shown first, starting at the topmost position in the list. If your static items do not consume the permissible number for display and you have also defined dynamic quick actions using this class, then one or more of your dynamic quick actions is displayed.
更新讨论 关于分享 项目:
Apparently iOS adds SHARE automatically BUT only if the app is installed from Appstore. – kyo
这使它们成为四个 + 共享项,因为 AppStore 会自动在每个下载的应用程序上添加共享应用程序项