Supporting multiple S60 platform releases

You can develop your application to support multiple S60 platform releases. The guidelines below relate to planning, source code writing and compiling, as well as packaging the application for distribution.

  • When planning you have the following aspects to be taken into consideration:

  • When writing a source code and compiling you have the following options:

    • One binary per variant, i.e. each platform, UI, and device features combination has its own binary. For example, you can have a separate variant.h for each variant and use #include "Variant.h" with macro definitions. Copying the appropriate Variant.h is defined as follows:

      VariantX\variant.h
      VariantY\variant.h
      copy VariantX\variant.h myInclude\variant.h
      

      The macro definitions are as follows:

          #ifdef TOUCH
          do touch UI related operations
          #else
          do non-touch UI related operations
          #endif
    • Single binary with run time variation by using PenEnabled() method). For more information, see checking for touch support at runtime

  • When packaging the application for distribution you have the following options:

You should also:

  • Test your application on all target devices that are important to your application

  • Make sure of binary compatibility if your application is meant to run on two or more platforms

  • Separate the application's business logic from the UI

Note: S60 provides a number of code variation macros that you can use. For example, in S60 5th Edition, the following macros are defined:

  • __SYMBIAN32__

  • __S60_50__

  • __S60_3X__

  • __SERIES60_3X__

Code variation macros

The S60 SDK contains a set of predefined code variation macros. These macros are defined in <SDK_INSTALL_PATH>\epoc32\tools\e32plat.pm. For example, in the S60 5th Edition SDK v1.0 the following set is defined: my @EpocMacros=('__SYMBIAN32__','__S60_50__','__S60_3X__','__SERIES60_3X__');

The list of all S60 SDK macros is shown below.

  • Generic macros:

    • __SYMBIAN32__: Can be used to separate Symbian OS specific code from the rest of the code in a cross platform project

    • __S60_3X__ and __SERIES60_3X__: Can be used to encapsulate code that is generic for S60 3rd Edition and later (including S60 5th Edition). The two forms are equivalent but __S60_3X__ was introduced in S60 3rd Edition FP2 so it will not be recognized by previous SDKs.

  • Platform specific macros:

    • __SERIES60_30__: A macro defined in S60 3rd Edition SDK; can be used to encapsulate code specific to this SDK only

    • __SERIES60_31__: A macro defined in S60 3rd Edition FP1 SDK; can be used to encapsulate code specific to this SDK only

    • __S60_32__: A macro defined in S60 3rd Edition FP1 SDK; can be used to encapsulate code specific to this SDK only

    • __S60_50__: Can be used to encapsulate code that should be built only for the S60 5th Edition SDK. For example, code that uses the Hierarchical List API supported by this platform release onwards, or code that uses Touch UI features

    • __NOKIA_N97__: Defined for the Nokia N97 SDK; can be used to encapsulate code specific to this SDK/device only, for example the use of OOM Monitor API