I can do plugins that works with apple frameworks, but as soon as I want to include an external framework I don’t know how to convert those frameworks to static libraries to be able to include them with the plugin. Does anybody know how that is done? Or another method of doing what I want.
And yes locally I can just add those frameworks to the native project, but what if I want to provide my plugins to the marketplace.
Some examples: This is the Admob plugin. Notice that GoogleMobileAds is included in the project as a static library. if you look in the plugin folder libGoogleMobileAds.a exists. To be clear: I don’t have any desire to create another Admob plugin it just an example of the pattern that I am looking to replicate.
local metadata = { plugin = { format = "staticLibrary", -- This is the name without the 'lib' prefix. -- In this case, the static library is called: libSTATIC\_LIB\_NAME.a staticLibs = { "AdMobPlugin", "GoogleMobileAds" }, frameworks = { "CoreTelephony" }, frameworksOptional = { "AdSupport" }, } }
Other plugins that follow a similar pattern (that I have checked):
Applovin
Facebook
Flurry (but I think their libraries are available as static).
Absolutely Rob. You know me and these forums, I am not the best at it. Didn’t know if it was too obvious.
On MacOS click on the Example.framework.
Rename the file on the top level of the framework folder with the letter .a. So for example: if Example.framework would have a file at the top level called Example. Rename that Example.a.
Then in the plugin project drop Example.a, all the headers file located in the .framework folder and any resources bundle.
What I didn’t realize is that the .frameworks are just a neat bundle to keep all the pieces together: the static library, the headers, and any resource bundle.
Absolutely Rob. You know me and these forums, I am not the best at it. Didn’t know if it was too obvious.
On MacOS click on the Example.framework.
Rename the file on the top level of the framework folder with the letter .a. So for example: if Example.framework would have a file at the top level called Example. Rename that Example.a.
Then in the plugin project drop Example.a, all the headers file located in the .framework folder and any resources bundle.
What I didn’t realize is that the .frameworks are just a neat bundle to keep all the pieces together: the static library, the headers, and any resource bundle.