PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
New WINDEV Mobile 26 feature!
  • Overview
  • Creating a project for iOS 14 widget with WINDEV Mobile
  • Developing an application for iOS widget with WINDEV Mobile
  • Overview
  • iOS application
  • iOS 14 widget
  • Testing the iOS 14 widget application
  • Overview
  • WLanguage functions specific to iOS 14 widgets
  • Functions for managing widgets
  • Functions available for widgets
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview
An iOS widget is an application intended to be displayed as a Widget on an iOS device (iPhone, iPad, etc.).
An iOS widget is always associated with an iOS application with which it can exchange data.
An iOS widget is developed in several steps:
This help page only presents the creation of an iOS widget project and its development. It is generated and compiled in the same way as a standard iOS application.
Creating a project for iOS 14 widget with WINDEV Mobile
To create an iOS 14 widget project with WINDEV Mobile:
  1. Create a project for iOS (see Developing an application for iPhone/iPad for more details).
  2. Create an iOS 14 widget configuration:
    • Start the configuration creation wizard: on the "Project" pane, in the "Project configuration" group, expand "New configuration" and select "New configuration (via wizard)".
      For more details, see Project configuration.
    • In the "General information" step of the wizard, select "iOS widget".
    • In the "Associated iOS application" step of the wizard, select the iOS configuration of the project associated with the iOS widget configuration.
Developing an application for iOS widget with WINDEV Mobile

Overview

The development of an iOS 14 widget and its associated iOS application is similar to the development of a standard application.

iOS application

Create the different elements of your iOS application. The method for developing the project is identical to the method for developing a WINDEV Mobile project. However, there are some aspects specific to iOS development. For more details, see Specific features of iOS applications.

iOS 14 widget

To develop the iOS 14 widget, you will need to:
  • create Widget windows. These windows contain all the features required by your widget.
    Remarks:
    • Only two types of controls are available in iOS 14 widget windows: Image and Static controls.
    • iOS 14 widget windows have a number of specific features. See iOS widget windows for more details.
  • use WLanguage functions, properties and types. If a function is not available, a compilation error is displayed. The icon appears in the help page if the function is available for iOS 14 widgets.
  • define the procedure to be executed when the user clicks the widget, using WidgetProcedure. This function must be used in the project initialization code.
In iOS 14 widget mode, scroll gestures and keyboard input are not supported.
Caution: iOS limits the memory available for widgets. This limitation depends on the device, iOS version, other applications, ... It is recommended to limit memory usage in your iOS 14 widget configurations as much as possible:
  • Limit the number of controls.
  • Prefer internal windows to plans,
  • Check the size of images (especially for the style of controls).
If the widget exceeds the limit, it will be killed by iOS with the following error: EXC_RESOURCE RESOURCE_TYPE_MEMORY (limit=xxx MB, unused=xxx)

Testing the iOS 14 widget application

You can directly test iOS 14 widget windows in the WINDEV Mobile simulator. The characteristics of Widget windows are taken into account.
Remarks:
  • WMDev tests are not available.
  • When testing from Xcode, a widget mode is forced by default. If necessary, you change the configuration in Xcode (refer to the Xcode documentation).

Overview

When the development is completed, you can generate the Xcode project to compile the iOS widget application and its associated iOS application on MAC:
  1. Click in the quick access buttons.
  2. Choose (if necessary) the first window displayed on the different platforms (iPhone, iPad and iOS widget).
  3. The generation wizard starts. See Generating the application for more details on Xcode project generation.
Remark: The wizard shows a specific step ("Widget signature (iOS widget)"). This step allows you to sign the iOS widget. The bundle ID of the widget is the bundle ID of the iOS app, plus ".widget" at the end. Both bundle IDs should be added to the Provisioning Profile.
WLanguage functions specific to iOS 14 widgets

Functions for managing widgets

The following functions are used to manage specific features of iOS 14 widgets:
Versions 18 and later
InWidgetMode
New in version 18
InWidgetMode
InWidgetMode
Indicates whether the code is run in Android Widget mode.
Versions 18 and later
WidgetDisplay
New in version 18
WidgetDisplay
WidgetDisplay
Refreshes a widget window.
Versions 26 and later
WidgetProcedure
New in version 26
WidgetProcedure
WidgetProcedure
Specifies the procedure that will be called when the user clicks an iOS 14 widget.

Functions available for widgets

Most of the functions available for iOS applications are also available in iOS 14 widget mode. To easily identify these functions, the icon appears in the bar of function platforms.
Minimum version required
  • Version 26
Comments
Click [Add] to post a comment