What's New in Appmethod 1.16

From Appmethod Topics
Jump to: navigation, search

Go Up to Main Page


The Appmethod 1.16 release contains the following new and improved features.

Contents

FireMonkey Changes for 1.16

FireMonkey is our proprietary library of object-oriented programming (classes, methods, properties and so forth).

Native Presentation of TListView, TSwitch, TMemo, TMultiView, TCalendar and TEdit on iOS

On the iOS target platform, FireMonkey now supports both styled and native presentations for the TListView, TSwitch, TMemo, TMultiView, TCalendar and TEdit controls.

  • By default, when you add any of these components to the Form Designer, Appmethod uses the Styled presentation.
  • To use the native presentation on the iOS target platform, set the new ControlType property to Platform.

For more information, see TPresentedControl.ControlType and FireMonkey Native iOS Controls.

Improved Interoperability Between Platform and Styled Controls

The ControlType property is now available for several controls that do not yet have a native iOS presentation.

Desktop Web Browsers

FireMonkey now supports the use of the TWebBrowser component on desktop platforms (Windows and Mac OS X). Previously, TWebBrowser supported only the mobile platforms (Android and iOS). All the basic functions of the Web browser are available (such as navigate to URL, go back, go forward, and so on). For more information, see Mobile Tutorial: Using the Web Browser Component (iOS and Android).

Interactive Maps

On mobile platforms (Android and iOS), FireMonkey supports the TMapView component that adds interactive maps to your mobile applications. The basic features of this component are as follows:

  • Four Types of Maps: Normal, Satellite, Hybrid, and (for Android only) Terrain.
  • Gesture Control: Intuitive tilt, rotate, and zoom gesture controls.
  • Control the Map View: Ability to control the map properties such as the map center coordinates, the map orientation, and so on.
  • Custom markers: Ability to add markers to the maps.

IMPORTANT: Using TMapView in an Android app requires that you obtain a Google Maps API key. Without a valid API key, a run-time error occurs. For details on obtaining the Google Maps API key, see Configuring Android Applications to Use Google Maps.

For more information and examples, see Mobile Tutorial: Using a Map Component to Work with Maps (iOS and Android).

New Options for Media Library

FireMonkey now provides an option to save the pictures taken by a device camera to the device Photo Library.
If your application handles pictures by using either the FireMonkey Actions or the IFMXCameraService interface, you can use the TCustomTakePhotoAction.NeedSaveToAlbum property or a parameter of the TParamsPhotoQuery type to cause your application to automatically save the pictures to the device Photo Library.
In addition, FireMonkey provides the IFMXPhotoLibrary interface that allows you to save any bitmap image to the device Photo Library.

For more information and code examples, see:

Standard Actions for TMediaPlayer

FireMonkey now provides the following standard actions that you can use to control any instance of TMediaPlayer:

Form Positioner Preview

A Form Positioner is now available in FireMonkey projects. The Form Positioner allows you to position forms in relation to each other as you design your application. Located in the lower right corner of the Designer, the Form Positioner shows the position of your form as it will appear on the screen at run time.

InputQuery now Supports Masking Input Fields

InputQuery now lets you mark fields as masked, so that input data is visually masked on the screen. To mark a field as marked, prefix the field name in an InputQuery call with:

  • Object Pascal: "#1". For example, instead of the field name 'Password', use field name #1'Password'.
  • C++: "\1". For example, instead of the field name "Password", use field name "\1Password".

AppAnalytics in FireMonkey

FireMonkey now supports the AppAnalytics, which allows you to track usage data of your application. You only need to drop a TAppAnalytics component into your application and set some options of the component. After TAppAnalytics is active, the usage data is available in a few minutes in the AppAnalytics Web interface.

  • AppAnalytics is totally anonymous and does not collect or transmit any private or personally identifiable information.

Customizing Local Notifications

Custom Notification Sounds

You can set a custom notification sound by setting the value of the SoundName field. For more information, see Mobile Tutorial: Using Notifications (iOS and Android).

Repeat Notifications

Repeat a scheduled notification over the time by setting the value of the RepeatInterval property. For more information, see Mobile Tutorial: Using Notifications (iOS and Android).

The Android View Used at Runtime Depends on the Dimensions of the Target Device

The following two tables describe, respectively, the algorithm used to choose the matching Android view at runtime, and the range of Android device sizes that match each view:

Saving Images to the Device Photo Album

FireMonkey now has the IFMXPhotoLibrary interface to save images to the system photo album:

For further information about how to save images to the device photo album, visit MediaLibrary.IFMXPhotoLibrary and IFMXPhotoLibrary.AddImageToSavedPhotosAlbum.

TImageList Introduces Image Lists as Centralized Collections of Images

FireMonkey now provides image lists through a new component, FMX.ImgList.TImageList. Image lists provide full-featured tools for using centralized collections of small images by GUI elements (controls, menus, and others) in your FireMonkey applications.

Each image in a list is formed using several multi-resolution bitmaps to ensure that images are properly displayed on devices having different screen densities and resolutions. The Image List Editor enables you to prepare and modify FireMonkey image lists.

For more information, see Using TImageList Image Lists as Centralized Collections of Images.

New and Changed FireMonkey API

New OnFilter Event

FireMonkey provides the new OnFilter event to set custom filters in a search box.

For further information about the new OnFilter event, visit TCustomListView.OnFilter and TSearchBoxModel.OnFilter.

Setting a Custom Quality Capture Setting for your Camera

TVideoCaptureQuality has the new value CaptureSettings to set custom quality capture setting for your camera.

Run-Time Library (RTL) Changes for 1.16

New HTTP Client API

The RTL provides several new network units with members that let you create an HTTP client, send requests to HTTP servers and handle their responses.

Using an HTTP Client explains how to use the two new HTTP components, TNetHTTPClient and TNetHTTPRequest, to handle HTTP requests. See also the main HTTP client classes:

  • THTTPClient, that represents an HTTP client.
  • THTTPRequest, that represents a request from your client to a server.
  • THTTPResponse, that represents the server response to a request from your client.

Beacon Support

The RTL now supports the use of beacons. A beacon is a Bluetooth Low Energy device that includes some Manufacturer Specific Data in its advertising data, allowing any device that receives that information to identify the beacon device and calculate the distance to it without being paired or connected to it.

We support two available beacon formats:

  • iBeacon - the format defined by Apple
  • AltBeacon - an open format, known as Alternative beacon, that supports both Android and iOS

Using Beacons shows how to implement a beacon application.

New Classic Bluetooth Component

The System.Bluetooth.Components unit now provides a new component: TBluetooth. This new component lets you use Classic Bluetooth on your applications using a component-based approach.

See Using Classic Bluetooth to learn how to use this new component.

New Object Pascal Data Types FixedInt and FixedUInt

Two new platform independent 32-bit integer types are introduced in 1.16:

FixedInt and FixedUInt ensure portability, better integration, and interoperability with 32-bit and 64-bit platforms. These two new types ensure cross-language support between Object Pascal and C++ for your applications.

The size of FixedInt and FixedUInt is 32 bits across all 64-bit and 32-bit platforms (64-bit iOS, 64-bit Windows, 32-bit Windows, OSX32, 32-bit iOS, and Android). The following table shows the equivalent types between the different platforms.

Equivalent types in other platforms
Windows platforms
(32-bit and 64-bit Windows)
OSX32, Android platforms, and
iOS platforms (32-bit and 64-bit iOS)
FixedInt LongInt Integer

FixedUInt

LongWord Cardinal

For further information, see:

Changes in LongInt and LongWord Size for 64-bit iOS Platforms

LongInt and LongWord are now platform-dependent integer types.

On 64-bit iOS platforms, LongInt and LongWord are double the size that is supported on 32-bit platforms (32-bit Windows, OSX32, 32-bit iOS, and Android) and on 64-bit Windows platforms, as follows:

Size
32-bit platforms and 64-bit Windows platforms 64-bit iOS platforms
LongInt 32-bits (4 bytes) 64-bits (8 bytes)

LongWord

32-bits (4 bytes) 64-bits (8 bytes)

For more information, see Platform-Dependent Integer Types.

Object Pascal Changes for 1.16

DCCIOSARM64.EXE: New Compiler for 64-bit iOS Device

The DCCIOSARM64.EXE compiler is a new NEXTGEN compiler that supports development of 64-bit iOS apps.

Note that the App Store now requires that your 32-bit iOS apps must also support 64-bit iOS devices. For more information, see New Compiler Option to Build iOS Binaries that Support Both 32-bit and 64-bit iOS.

Universal iOS Apps: DCCIOSARM64 supports a new option on the Compiling page of Project Options: Generate iOS universal binary file (armv7 + arm64).
Setting this option to True generates a universal iOS app that runs on both 32-bit and 64-bit iOS devices. This option is only available when the target platform is iOS Device 64-bit.

Also see Conditional compilation (Object Pascal).

Two New Data Types: FixedInt and FixedUInt

For details, see New Object Pascal Data Types FixedInt and FixedUInt.

C++ Changes for 1.16

BCCIOSARM64.EXE: New Clang-based Compiler for 64-bit iOS Device

We have added a new compiler that produces 64-bit iOS applications: BCCIOSARM64.EXE, the C++ Compiler for the 64-bit iOS Device.

Note that the App Store now requires that your 32-bit iOS apps must also support 64-bit iOS devices. Appmethod offers an option to create a universal 32-bit/64-bit iOS app. For more information, see New Compiler Option to Build iOS Binaries that Support Both 32-bit and 64-bit iOS.

BCCIOSARM64 supports the new __arm64__ predefined macro. To write code that is specific to the 64-bit iOS target platform, you can use:

#if defined (__arm64__)
 ...
#endif

To write code that is specific to x64 (iOS and Windows), you can use:

#if defined(__clang__) && (__POINTER_WIDTH__ == 64)
...
#endif

For more information, see Predefined Macros.

Fully Qualified Names Are Now Required When Including Run-time Packages

When building a FireMonkey C++ application, the IDE performs package analysis -- that is, the IDE calculates the packages required/used by the application from the included headers. Before 1.16, the IDE used the base name when matching headers to packages. For example, upon seeing that an application includes SysUtils.hpp, the IDE would infer that the application is using the rtl package.

Using the base name, however, has drawbacks. An application including a header named assert.h might trigger the IDE to link to the DUnitXRuntime package (because it contains a unit named DUnitX.Assert).

Qualified Name Matching Only

Starting with 1.16, the IDE now considers a package to be required only when there is a #include statement for the qualified/full name of a unit in that package. That is, upon seeing #include <XMLDoc.hpp>, the IDE does not conclude that the Xml package is required. The IDE only includes the xmlrtl package if you specify the fully qualified name: #include <Xml.XMLDoc.hpp>.

This Change Affects New Projects Only

This change does not affect existing projects, as their Package requirements have already been calculated and saved in the project file (<project_name>.cbproj). The change applies to new projects, or when an existing project starts to use a package it had never used before.

New Macros Defined

To help you monitor your use of fully qualified package names, the following two new macros are defined:

  • WARN_LEGACY_HEADER_USAGE - Generates a warning when a non-qualified header is included
  • ERROR_LEGACY_HEADER_USAGE - Generates an error when a non-qualied header is included

If you add #define WARN_LEGACY_HEADER_USAGE and then you enter #include <SysUtils.hpp>, the following warning appears after your next build:

 Include <System.SysUtils.hpp> instead

If you add #define ERROR_LEGACY_HEADER_USAGE and then you enter #include <SysUtils.hpp>, the following error message appears after your next build:

 Fatal F1003 $BDS\include\windows\rtl\SysUtils.hpp 8: Error directive: Include 'System.SysUtils.hpp' instead
  *** 1 errors in Compile ***

DynamicArrays: Construction and Initialization Are Now More User-Friendly

Previously, you would have to set up the length of a DynamicArray and then add the elements, like this:

  DynamicArray<int> test;
  test.Length = 3;
  test[0] = 1;
  test[1] = 2;
  test[2] = 3;

Now you can simultaneously initialize and construct a dynamic array when you are using any of the Clang-based C++ Compilers:

  DynamicArray<int> test = {0, 1, 2};

For BCC32, you can initialize and construct the array as follows:

 DynamicArray<int> test(0, 1, 2);

The new syntax was implemented using C++11 std::initializer_list.

New Forms

For All Our C++ Compilers

Using a plain C++ array:

    // template <size_t SIZE> System::DynamicArray(T(&array)[SIZE]);
    int values[] = { 1, 2, 3, 4, 5 };
    System::DynamicArray<int> h(values);
For Clang-based C++ Compilers

C++11 initializer list:

    // System::DynamicArray(std::initializer_list<T> il);
    System::DynamicArray<char> ArrayOfChars('a', 'b', 'c');
    System::DynamicArray<int> ArrayOfInts(0,  1,  2,  3,  4,  5,  6,  7,  8,  9,
                                        10, 11, 12, 13, 14, 15, 16, 17, 18);

C++11 variadic templated constructor:

    // template <class... Types> System::DynamicArray(const T &t, Types && ...values);
    System::DynamicArray<char> c('a'); // t='a', ...values=<>
    System::DynamicArray<char> d('a', 'b', 'c'); // t='a', ...values=<'b', 'c'>
For BCC32

Since BCC32 does not support C++11 Uniform Initialization, we have added constructor overloads for 2 to up to 19 parameters:

    // System::DynamicArray(const T &t0,  const T &t1,  const T &t2);
    System::DynamicArray<char> f('a', 'b', 'c');
    // System::DynamicArray(const T &t0,  const T &t1,  const T &t2,  const T &t3,
    //                      const T &t4,  const T &t5,  const T &t6,  const T &t7,
    //                      const T &t8,  const T &t9,  const T &t10, const T &t11,
    //                      const T &t12, const T &t13, const T &t14, const T &t15,
    //                      const T &t16, const T &t17, const T &t18);
    System::DynamicArray<int> g( 0,  1,  2,  3,  4,  5,  6,  7,  8,  9,
                                10, 11, 12, 13, 14, 15, 16, 17, 18);

For more information, see Structured Types.

Boost Libraries Now Available Outside Installer

The Boost Libraries are no longer part of the product installer. You can easily obtain Boost by selecting Tools > GetIt to open the GetIt main window, and then choosing to install Boost from GetIt.

For other ways of installing (or uninstalling) Boost, see Boost Libraries.

IDE Changes for 1.16

iOS Device - 64 bit Platform

The new iOS Device - 64 bit platform has been added in 1.16:

Multi-Device Preview

With the new Multi-Device Preview, you can preview how your application looks on different devices. The Multi-Device Preview displays a preview of the design area on several devices at the same time. You can select the devices to preview.

MDPreviewWindow1.png

To open the Multi-Device Preview window, choose View > Multi-Device Preview.

For further information about this feature, see Multi-Device Preview.

Device Manager

The Device Manager shows a grid with the available device presets. The device presets are the list of available devices to use at design time for example in the Multi-Device Preview Window.

To open the Device Manager, choose Tools > Options > Environment Options > Form Designer > Device Manager.

DeviceManager.png

The Device Manager allows you to add, edit, and delete a device preset using the Device Settings Window.

The device presets can also be used as views of your multi-device project if the view has been registered by installing the package of such view.

The Device Manager manages the DevicePresets.xml file.

Note: In 1.16, the MobileDevices.xml file has been renamed to DevicePresets.xml.

Run Your Apps on Any iOS Simulator

The Target node of the iOS Simulator platform node of the Project Manager now shows the complete list of simulators supported by the Xcode installation on your Mac. The Project Manager also shows the iOS version of each simulator, and you can run your applications on a given device model running any one of the supported iOS versions.

Add Featured Files Opens Automatically When Necessary

When you add to the Project Manager a file that may require you to add some featured files to the deployment configuration of your project, Appmethod now opens a filtered view of the Add Featured Files dialog box, so that you can include the required features files in the deployment configuration of your project. See Add Featured Files Filtered List for more information.

Disabling Built-in Appmethod Java Libraries for Android Using the Project Manager

In 1.16, the Project Manager lists the built-in Appmethod Java libraries for Android, and you can disable any one of those libraries. To make your application lighter, you might choose to disable Java libraries that your application does not require. For more information, see Using the Built-in Appmethod Java Libraries for Android.

XE8DisableJavaLibrary.png

In XE7, you could easily add custom Java libraries to your Android applications using the Project Manager. However, to remove unnecessary Java libraries that Appmethod includes in Android applications by default, you had to manually create and deploy a custom classes.dex file.

Mercurial Version Control System Integrated in the IDE

Appmethod supports now a new version control system integrated in the IDE, for managing and tracking changes in your projects: Mercurial distributed version control system.

The History Manager now presents integrated Mercurial version control log information from your local repository. You can find more information of the tracked changes of your project in the Contents, Information and Differences tab.

You can use Mercurial to:

  • Clone a copy of your remote Mercurial repository and start working with it.
  • Commit your changes to your local repository.
  • Show remote repository log data for your project.

In 1.16, some Git features have been added in the IDE:

  • Authenticate in your remote private repository.
  • Push your changes to the remote Git repository and pull changes, updating your working copy with the latest remote changes.

For more information about the version control systems integrated in the IDE, see:

Settings Migration Tool

The new Settings Migration Tool provided with Appmethod allows you to import and export configuration settings between RAD Studio and Appmethod, as well as between different versions of both products.

The migration tool supports any version of Appmethod.

With the Settings Migration Tool you can:

You can find migrationtool.exe in the following path: C:\Program Files (x86)\Embarcadero\Studio\16.0\bin.

Visit the Settings Migration Tool page for more details.

New iOS Code Signing Application Options

You can now select the signing data that Appmethod uses to code sign your iOS applications.

On the Provisioning page, for the any of the iOS Device build types (Debug, Ad hoc, Application Store), you can select:

If you leave any of these values as Auto, Appmethod selects a suitable provisioning profile and developer certificate that match the CFBundleIdentifier and the target device. For more details, see Completing the Provisioning Page.

New Option to Build iOS Binaries that Support Both 32-bit and 64-bit iOS

All new iOS apps submitted to the App Store must include 64-bit support starting February 1st, 2015. That is, applications that target devices running 32-bit iOS must support 64-bit iOS as well.

The IDE provides a new compiler option for the 64-bit iOS target platform, Generate iOS universal binary file (armv7 + arm64).
When you enable this option and deploy your application, the IDE generates a fat binary that supports both 32-bit and 64-bit iOS.

You can find this option in:

  • Project > Options > Object Pascal Compiler > Compiling > Other options (Object Pascal)
  • Project > Options > C++ Compiler > Advanced > Other options (C++)

'Receive Push Notification' Entitlement No Longer Needed for iOS Applications

To enable receiving Push Notification messages in iOS applications, you do not need to set any additional Entitlement project option.
Appmethod code signs the iOS app by using a Provisioning Profile that allows Push Notification services in the device where the app is installed.

For more information, see Push Notifications.


Customer Experience Program

The IDE integrates a new option to join the Customer Experience Program. You can join this program and help Embarcadero to improve Appmethod.

The Customer Experience Program collects information about the usage of the IDE during your session (how often you launch Appmethod, how do you navigate in the IDE, etc). This information is totally anonymous, since the program does not collect or transmit any private or personally identifiable information.

You can find this option in:

For more details, see the Customer Experience Program page.

Database and Connectivity Changes for 1.16

FireDAC Changes

Enterprise Mobility Services

EMS Management Console Application

The EMS Management Console Application is a sample application delivered with Appmethod that you can use to manage the EMS data stored in your EMS Server and to send EMS push notification messages to your registered devices. You can customize this application as needed, using the sample source code delivered in Appmethod.

With the EMS Management Console Application you can:

For more information on how to use the EMS Management Console Application and where to find the source code, see EMS Management Console Application.

64-bit iOS Device Database Compatibility

The 64-bit iOS Device platform has been added in 1.16. The compatibility of this new platform with the Database Management System (DBMS) is the same as the compatibility offered with the 32-bit iOS Device platform:

Debugger Changes for 1.16

Debugging of iOS64 apps is not supported (F9 is not enabled when iOS Device 64-bit is the target platform).
Instead, you should set iOS Device 32-bit as the target platform, complete your debugging, and then rebuild your app for the iOS Device 64-bit target platform.

Bitmap Style Designer Changes for 1.16

  • The Bitmap Style Designer has been updated to offer new style templates for the current supported versions of iOS and Android.
  • The New Style button presents a selection of style templates, including iOS, Android, Windows, Mac OS X, Metropolis UI, and various blank styles.
  • You can create objects for different resolutions using the new Style Menu commands such as Add New Objects for 1.5x Resolution Graphic and Add New Objects for 2.0x Resolution Graphic.
  • You can now add object templates using the new Add Object Template toolbar button. Using the default object structure, you only need to make adjustments to the presets, and assign properties as you want.
  • You can automatically create other appropriate resolutions of your objects by using the new Automatically Adjust Object for All Graphic Resolutions context menu command.
  • You can test your custom objects (and test them at different resolutions) using the new Test object style context menu commands.

Changes in the Online Help

New Offline Help System (CHM Help Replaces H2)

The offline (compiled) help files delivered with Appmethod are now in Microsoft Compiled HTML Help format, also known as CHM. For more information, see Help on Help - CHM. Previously, the offline help was delivered in H2 format and was viewed using Microsoft DExplore.

The Microsoft Compiled HTML Help viewer can only show offline help. To access the online (docwiki) help, you must either open the online help yourself, or click Current Wiki Page on the footer of any page of the offline help. You can no longer choose whether you want the offline help viewer to show the offline help or the online help.

You can create your own CMH help files and link them with Appmethod; for further information, see Providing Help for Your Component.

Topics