Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-20557

iOS: Allow modules to use third party dynamic libraries


    • Type: New Feature
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Release 6.2.0
    • Component/s: iOS
    • Labels:


      Traditionally, any library built for iOS was always a static library. This changed with Swift, and any library build with Swift is now a dynamic library instead. These dynamic libraries are just a binary, but they come in the a *.framework package.
      We currently do not support dynamic frameworks Titanium.

      There are a couple of things that need to happen for us to support these types of frameworks:

      1. Edit your module.xcconfig to look like this

        FRAMEWORK_SEARCH_PATHS="$(SRCROOT)/../../modules/iphone/{mod.id}/{mod.ver}/platform" "/Library/Application\ Support/Titanium/modules/iphone/{mod.id}/{mod.ver}/platform" "~/Library/Application\ Support/Titanium/modules/iphone/{mod.id}/{mod.ver}/platform"
        LD_RUNPATH_SEARCH_PATHS= $(inherited) "@executable_path/Frameworks" $(FRAMEWORK_SEARCH_PATHS)

        Note: The new LD_RUNPATH_SEARCH_PATHS allows the app to find the framework. And this is the most important step for running the app on simulator.

      2. Add a temporary plugin and eventually modify the CLI
        I have attached a Titanium plugin to this ticket. To use, place it in the plugins folder at the root of your project. The only change needed is line 46 of the plugins/ti.dynamiclib/hooks/ti.dynamiclib.js
        Note: This plugin is a workaround for the moment. Eventually, we'll need to copy the framework to the device and sign it. This is something that needs to happen in the CLI.
      3. Modify your tiapp.xml
        And the very last thing, this is possible only with iOS 8 and greater. So make sure you have this in your tiapp.xml

          <!-- more stuff -->


          Issue Links



              • Assignee:
                jvennemann Jan Vennemann
                penrique Pedro Enrique (Inactive)
                Hans Knöchel
                Eric Wieber (Inactive)
              • Watchers:
                20 Start watching this issue


                • Created:

                  Backbone Issue Sync

                  • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                    Git Integration