IBM Support

Xcode linker options requirement to use FIPS 140-2 with IBM Worklight

Troubleshooting


Problem

When the FIPS 140-2 optional feature is included in a Worklight Studio project with an Apple iPhone or iPad environment, you must change the Xcode linker options before you archive the product (for example, when you create an IPA file).

Symptom

If you do not change the linker options, the archive build fails with an error that is similar to the following text:


    4196 duplicate symbols for architecture armv7
    Linker command failed with exit code 1 (use -v to see invocation)

Resolving The Problem

Change the linker options in Xcode by completing the following steps:

  1. Select the Build Settings for your project.

  2. Search for -all_load. You should find two occurrences under "Other Linker Flags": one is for Distribution and another one is for Release.

  3. Double-click the Distribution value to open the editing window.
    1. Click + on the lower left corner of the window and add the following option:
      -force_load $(BUILT_PRODUCTS_DIR)/libCordova.a

    2. Click the + on the lower left corner of the window and add the following option:
      -force_load $(SRCROOT)/WorklightSDK/libWorklightStaticLibProject.a

    3. Click the + on the lower left corner of the window and add the following option: 
      -force_load $(SRCROOT)/FipsHttp/libfipshttp.a

    4. Select the -all_load line and remove it by clicking - on the lower left corner of the window.

    5. Click outside of the editing window to save the changes and close this window.

  4. Repeat these steps for the Release value.

After making these changes, the archive build should succeed.

[{"Product":{"code":"SSZH4A","label":"IBM Worklight"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Security","Platform":[{"code":"PF014","label":"iOS"}],"Version":"6.1","Edition":"Consumer;Enterprise","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
19 August 2022

UID

swg21657759