Small knowledge, big challenge! This article is participating in the creation activity of “Essential Tips for Programmers”.

In the previous article, I talked about how to configure a shortcut menu when packaging Android app to facilitate users to directly use some functions.

However, the method mentioned is only applicable to the Android system. Ios apps also support configuration, but different from Android, it needs to be configured in MacOS through the XOCde editor.

The ios app is not called a shortcut menu. It’s called 3D Touch.

Open the MacOS or VIRTUAL machine and start the Xcode editor. Since uniApp is packaged offline, you can download an offline package from the official website, throw the Builder-Hello project into Xcode, and go to the info.list file, which is a list item by default when opened. You can open the source view in the menu on the left to see if you want to.

In the list view, you can find the following configuration items to see the default configuration.

The fields are described as follows.

The node name The node type Optional sex Nodes that note
UIApplicationShortcutItems Array Will choose Icon Shortcut menu node declaration
UIApplicationShortcutItemType String Will choose The menu type
UIApplicationShortcutItemTitle String Will choose The title of the menu item
UIApplicationShortcutItemSubtitle String optional The subtitle of a menu item
UIApplicationShortcutItemIconFile String optional Specifies the menu item to display the ICONS in the installation package relative to the root directory of the installation package With the configuration at the same time priority than UIApplicationShortcutItemIconType UIApplicationShortcutItemIconType node
UIApplicationShortcutItemIconType String optional Specifies menu items to display system ICONS For details, seeApple Official Documentation
UIApplicationShortcutItemUserInfo String optional User-defined additional information about menu items Additional information is available within the app via Plus.Runtime.arguments

Tips: The source view is not suitable for the first configuration, but if the base needs to be reconfigured due to uniApp’s SDK update it can be copied directly and most of the time this part of the code will not be changed.