ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing for iOS (iPhone / iPad)
  • Overview
  • How to use the Dynamic Island in your iOS applications?
  • Behavior and requirements
  • Viewing the Dynamic Island in edit and test mode
  • Programming
  • Generating the iOS application
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview
One major feature of the latest iPhone is the Dynamic Island, which transforms the black notch into a widget.
Expanded dynamic island, with an available action
Expanded dynamic island, with an available action
Starting with version 28, WINDEV Mobile supports this new feature..
Simply define the UI of the Widgets with Swift UI, then use WLanguage to automatically generate the widgets in the project and specify the callback procedure that will be called when the user interacts with the widget.
How to use the Dynamic Island in your iOS applications?

Behavior and requirements

  • Knowledge of Swift is required to handle the information displayed on the Dynamic Island. The "iOS Dynamic Island" example contains files that can be reused and edited.
  • Dynamic Island only works on actual devices. It cannot be run on an emulator or simulator.
  • Dynamic Island is only available for iPhone 14 Pro.
  • The iOS application determines when the Dynamic Island is displayed and populated. This data will only be visible when the application is in the background.

Viewing the Dynamic Island in edit and test mode

To view the Dynamic Island in edit and test mode (Go), simply select "iPhone 14" or a later configuration:
  1. Select the iOS configuration of your project.
  2. On the "Project" tab, in the "Project configuration" group, click "Current configuration".
  3. In the window that appears, click "Platform description".
  4. In "Platform description", add "iPhone14" and delete "Generic iPhone" if necessary.
  5. Confirm the 2 windows.
  6. The window editor now shows a Dynamic Island-like notch..

Programming

To implement the Dynamic Island feature:
  1. Create the different Swift files required to handle the interface and the data displayed by the Dynamic Island.
    In the iOS Dynamic Island example, the corresponding files are:
    • InterventionActivityAttributes, which defines the attributes to be updated.
    • InterventionActivityWidget, which defines the appearance of the Widget depending on the display mode (collapsed, expanded, collapsed with other applications displayed at the same time).
  2. In the WINDEV Mobile project, create a set of procedures containing the various Swift language procedures for displaying the Dynamic Island.
    In the iOS Dynamic Island example, the "DynamicIsland" set contains the following procedures that can be reused:
    • updateInvervention: Updates data in the Dynamic Island.
    • startIntervention: Displays data in the Dynamic Island.
    • listIntervention: Lists interventions.
    • stopIntervention: Stops displaying data in the Dynamic Island.
  3. In the WINDEV Mobile project, use a procedure to define what happens when the user performs an action in the Dynamic Island..
    In the iOS Dynamic Island example, a deep link is used. In the project initialization code, iOSApplicationOpenURLProcedure allows you to specify the procedure to be called when the application needs to open a resource identified by a URL. In this example, a specific window is opened.

Generating the iOS application

The iOS application generation wizard includes specific Dynamic Island options.
In "Configuration", select "Include the native files needed to generate Live Activities for the Dynamic Island. Requires Xcode 14.1 or later." to indicate that the application should include the required files.
Specify the names of the required structures and files in the next step of the wizard.
Caution: If this option is checked, it is necessary to use Xcode 14.1 or later.
Minimum version required
  • Version 28
Comments
Click [Add] to post a comment

Last update: 06/26/2023

Send a report | Local help