Paul Ryan
Paul Ryan

Reputation: 332

how to add .bundle file to a nativescript plugin

I have some thirdparty code I want to add to my nativescript (iOS) project. The code consists of a .framework file and a .bundle file which contains a .momd file. I was thinking of adding this via a custom plugin, the docs are pretty clear on how to add the .framework file, but am not sure how I add and reference the bundle and underlying .momd file. Does anyone have any experience of this that they can share please?

Upvotes: 0

Views: 156

Answers (2)

Paul Ryan
Paul Ryan

Reputation: 332

In case anyone else needs to do this. I ended up using cocoapods xcodeproj gem to inject my file into my workspace file. A gist of the working code is here.

Upvotes: 0

BinaryNate
BinaryNate

Reputation: 81

I spent a lot of time poring over the iOS interop documentation while working on my nativescript-midi plugin, but I don't recall seeing anything specifically on adding bundles or .momd files. If possible, I suggest you create a new "container" iOS framework project in which you can import your desired framework, bundle, and .momd file, and then import that combined framework project into your plugin via a Podfile. That's essentially the approach I took to import a C library in my project (the cocoa-midi-message-parser repo referenced by the Podfile in my plugin).

Upvotes: 1

Related Questions