Reputation: 21521
My team has developed an iOS library for drawing charts. This library is 100% implemented in Objective C and is compiled as a Dynamic Framework.
We want to create a proof of concept app to show how to consume this within NativeScript.
I have read, digested and understood How to use Native Libraries with NativeScript. All looks good :)
Then I discover that the iOS Dynamic Framework, which contains XIBs, cannot be loaded in NativeScript.
Is there any example of consuming a third party iOS Library which includes Xibs? Or is this simply not possible, and we must re-work the iOS library without the use of XIBs?
Upvotes: 0
Views: 158
Reputation: 31
Follow these steps:
Wrap your framework in NativeScript plugin.
Add the plugin to the app: tns plugin add ./path/to/plugin/folder
Consume the xib:
var frameworkBundle = NSBundle.bundleForClass(SomeClassFromTheFramework.class);
frameworkBundle.loadNibNamedOwnerOptions("MyXib", owner, null);
Let me know if you encounter any errors/issues?
Upvotes: 2