Details
-
Type:
New Feature
-
Status: Closed
-
Priority:
High
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: Release 6.2.0
-
Component/s: iOS
-
Labels:None
Description
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:
- 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.
- 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. - 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<ios>
<min-ios-ver>8.0</min-ios-ver>
<!-- more stuff -->
</ios>
Attachments
Issue Links
- is triggering
-
TIMOB-25227 iOS: Building app with module that contains a framework fails on 6.2.0
-
- Closed
-
- relates to
-
TIDOC-2999 Document automatic framework integration and dynamic framework support
-
- Closed
-