Hi,
in this thread I want to show you, how to add QuickActions/Shortcuts to your App. QuickActions require 3D touch support and iOS 9 (minimum).
1.) Download the QuickActions tool, to create a #PlistExtra string (note: you are not allowed, to have more than 4 actions)
2.) Paste the #PlistExtra string to the project attributes region
3.) Download the QuickActions module and add it to your project
4.) Add the following code:
Use the Objective-C code by Erel in post #3 instead.
5.) To know wheter a shortcut item was clicked, use the ShortcutItemClicked event:
If you are using a CustomIcon, put the icon file in to the Special folder.
If you don't have a iDevice, which supports 3D touch, but a local/virtual mac you can use this tool: https://github.com/PoomSmart/SBShortcutMenuSimulator for tests.
Feel free to ask questions
Jan
in this thread I want to show you, how to add QuickActions/Shortcuts to your App. QuickActions require 3D touch support and iOS 9 (minimum).
1.) Download the QuickActions tool, to create a #PlistExtra string (note: you are not allowed, to have more than 4 actions)
2.) Paste the #PlistExtra string to the project attributes region
4.) Add the following code:
B4X:
Private Sub Application_Start (Nav As NavigationController)
QuickActions.StartSettings
...
...
...
End Sub
Private Sub Application_Active
QuickActions.ActiveSettings
End Sub
Private Sub Application_Inactive
QuickActions.InactiveSettings
End Sub
5.) To know wheter a shortcut item was clicked, use the ShortcutItemClicked event:
B4X:
Sub Application_ShortcutItemClicked (ItemType As String)
Log($"QuickAction: ${ItemType}"$)
End Sub
If you are using a CustomIcon, put the icon file in to the Special folder.
If you don't have a iDevice, which supports 3D touch, but a local/virtual mac you can use this tool: https://github.com/PoomSmart/SBShortcutMenuSimulator for tests.
Feel free to ask questions
Jan
Attachments
Last edited: