Wrap 3rd party library in NativeScript plugin - can't find variable

plugins
ios

#1

I have a 3rd party library for iOS provided in the following format:
SDK
-Framework1.framework
–Headers
—Framework1.h
—Frameworkdefaults.h
–Modules
—module.modulemap
–Info.plist
–Framework1 (the executable)

-Framework2.framework
–Headers
—Framework2.h
—Framework2defaults.h
–Modules
—module.modulemap
–Info.plist
–Framework2 (the executable)

-Resources
–Resource1
— lots of .png files
–Resource2
— lots of .png files
–Resource3
— lots of .png files

Framework1 depends on Framework2, so I need to include both frameworks into my plugin.

Using the seed project, I’ve tried several different ways to successfully get my plugin working. The most successful has been to:

  1. copy both framework folders directly to platforms/ios folder
  2. change build.xcconfig, adding OTHER_LDFLAGS = $(inherited) -framework “Framework1” -framework “Framework2”

The result of this is that when my typescript first calls an instance of anything from my framework, I get the following error:
Can’t find variable: myFrameworkVariable


#2

It’s very generic, you are accessing undefined variable myFrameworkVariable. Do you have a repo for this plugin?