Worklight 5.0.0.3 Support for iOS 6

Product documentation


Abstract

For customers on the Worklight 5.0.0.3 platform who are looking to support devices running iOS 6 with their Worklight applications, there are a few steps that need to be taken.

Content

For each of the following scenarios, it is expected that you will have the Interim Fix for PM74703 installed.

The interim fix is only applicable to versions of Worklight Studio that have been installed from a P2 repository (i.e. not for an Installation Manager install.)


If you have the Consumer or Enterprise Editions, the interim fix can be download from Fix Central here.

Once you have downloaded the appropriate interim fix, start the Eclipse instance where you have the Worklight Studio installed.

Select Help->Install New Software.
Click on the Add button.
Click on the Archive button.
Select the fix zip file and press OK.
Give it a name and press OK.

Select the patch as indicated below and press Next.


(If you do not have the Dojo Toolkit installed, open the twisty and deselect the Dojo Toolkit patch.)

On the review screen press Finish.

(If you receive a warning about unsigned content press OK.)

Once the installation has finished press Restart Now and you will then be ready to move on to one of the scenarios below.

If you wish to verify that the patch was installed, you can select Help->About Eclipse SDK, then press Installation Details and you should see the patches on the Installed Software tab like:



To expand a scenario, simply click on the arrow next to the title below.





  • -
    If you have an existing Worklight project and are using Xcode 4.4 or earlier

    (Refer to the top of this document for instructions on obtaining and installing the interim fix.)

    While you won't be able to explicitly target your application for the iOS 6 platform and take advantage of new features, by using Xcode 4.4 or earlier you will be able to continue to compile for the armv6 architecture and your applications should run correctly on devices running iOS 6 if you install the interim fix and perform a few minor steps.

    If you have an existing Worklight project you will first need to create a new Worklight project inside of Worklight Studio, with a new iPhone environment. Then, for each existing project that you wish to function correctly under iOS 6 you will need to copy the Cordova.framework and WorklightSDK folders from the new project into your existing project as shown below:

    (in the following example, the new project is on top, and the existing project is on the bottom)



    You may then proceed with development as normal.





  • -
    If you have an existing Worklight project and are using Xcode 4.5 or later


    (Refer to the top of this document for instructions on obtaining and installing the interim fix.)

    In order to use Worklight 5.0.0.3 to build an existing project with Xcode 4.5, you will need to install the interim fix and perform a few minor steps.

    Inside of Xcode, the "build settings" in the Xcode 4.5 project need to be changed as follows:

    "Architecture" = Standard (armv7, armv7s) (instead of armv7, armv6)
    "Valid Architecture" = armv7 (for all 3 rows) (instead of armv6, armv7, i386)

    (if you are planning on running the simulator, then you must also select i386)

    See the following screen shots for more detail.





    Inside of Worklight Studio, you will also need to create a new Worklight project, with a new iPhone environment, and then copy the Cordova.framework and WorklightSDK folders from the new project into your existing project as shown below:

    (in the following example, the new project is on top, and the existing project is on the bottom)



    If your application accesses Contact information through the Cordova API, then you will need to uncomment some lines in your application delegate to give it permission to access the Contacts as follows:

    Select the <appName>.m under the native/Classes folder of the new project that you created in the previous step:


    then open it (it will open in Xcode) and copy the following lines from application:didFinishLaunchingWithOptions into the existing application (for example oldProjApp.m) and uncomment them:



    You may then proceed with development as normal.

    Note : If you have previously installed the application on the device to which you are reinstalling, even if you have uninstalled it, then you may need to modify the privacy settings so that your application is permitted to access the Contact information. You may do so by going to Settings > Privacy > Contacts on the device and changing the slider to ON or, if the setting does not exist, going to Settings > General > Reset > Reset Location and Privacy so that you will be prompted for permission the next time that you start the application. (Warning: Resetting the location in the simulator does not always seem to function properly and so the setting may not actually be removed on there.)




  • -
    If you are creating a new Worklight project and are using Xcode 4.4 or earlier


    (Refer to the top of this document for instructions on obtaining and installing the interim fix.)

    While you won't be able to explicitly target your application for the iOS 6 platform and take advantage of new features, by using Xcode 4.4 or earlier you will be able to continue to compile for the armv6 architecture and your applications should run correctly on devices running iOS 6 if you install the interim fix.





  • -
    If you are creating a new Worklight project and are using Xcode 4.5 or later



    If your application accesses Contact information through the Cordova API, then you will need to uncomment some lines in your application delegate inside of Worklight Studio to give it permission to access the Contacts as follows:

    Select the <appName>.m under the native/Classes folder of your project:


    then open it (it will open in Xcode) and uncomment the following lines in application:didFinishLaunchingWithOptions:






  • -
    If you are using the IBM Worklight Application Center with Xcode 4.5 or later (Consumer and Enterprise editions only)


    (Refer to the top of this document for instructions on obtaining and installing the interim fix.)

    In order to build the IBM Application Center with Xcode 4.5, you will need to install the interim fix and perform a few minor steps.

    Extract the AppCenter.js file from 5.0.0.3-WL-StudioProd-AppCenter-IF*.zip. (The zip file can be obtained from the same location that you pulled the P2 repository from if you do not have it already.)

    Open the IBMAppCenter project in Worklight Studio and copy the unzipped AppCenter.js file to the folder IBMAppCenter/apps/AppCenter/common/js, replacing the one that is there:



    Next, generate the iPhone environment for the AppCenter application and open the XCode project for the iPhone environment.

    Inside of Xcode, select IBMAppCenterAppCenterIphone in the Navigator area. In the project editor select the Project setting and go the Build Settings. For all listed configurations (for example: Debug, Distribution, Release), make sure that Valid Architectures contains only armv7 and that Architectures is set to Standard:



    Also, in the project editor, select the Targets setting and go to Build Settings. For all listed configurations (for example: Debug, Distribution, Release), make sure that Valid Architectures contains only armv7 and that Architectures is set to Standard:



    You may then proceed with development as normal.





  • -
    To uninstall the interim fix



    If you wish to uninstall that the patch, you can select Help->About Eclipse SDK, press Installation Details select the fixes on the Installed Software tab, and click Uninstall.






Rate this page:

(0 users)Average rating

Document information


More support for:

IBM Worklight
Application Development

Software version:

5.0

Operating system(s):

Apple iOS

Software edition:

Consumer, Enterprise

Reference #:

7036435

Modified date:

2013-01-06

Translate my page

Machine Translation

Content navigation