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
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