I struggle a little bit in creating a plugin that depends on other frameworks.
I use CocoaPods to manage the dependecy to the other framework. the Podfile is within the Plugin Directory (from the template for plugins).
It compiles and creates the *.a. Checking with otool -L, the *.a file does not include the other libraries.
Sorry if this question is so basic and maybe silly, but how do I add such frameworks to the plugin *.a file / plugin definition.
Thank you, But how does Solar2D knows from where to get the frameworks? For packaging a plug-in, the documentation says it has to be flat file which gets tar-balled. Sorry for bothering.
Well that documentation that you reference is sort of old. Here are the was to get your plugins to work:
You can put it up on Github and then create a collector. Never done this so can’t help you there.
You can put it up on the Solar2dplugin site. That structure looks like the picture attached. You then zip up the entire folder and upload it to solar2d site. @richard11 has more detailed instructions.
You can keep them on your local machine. This is what I do when I am beta testing my plugins. On a mac I put it in the folder path in the picture attached and tar the entire thing with this command. In the picture the data.tgz archive is the tar of what is around it. You can delete the stuff around it once you have the tar file.
adriangomez$ tar -czf data.tgz metadata.lua library.a blablaFramework
Just in case you don’t realize it. In the first example using the solar2dmarketplace @richard11 will provide a URL you just put in your build settings.
In the second example you just have to add something like this in your build settings. com.cabagomez which is the publisherId is the top folder. Then plugin.tapjoyinstall is the next folder. Then your iphone folder will have the .tgz file.
After playing around with the information received here, I ended up with the following set-up which worked at least for me. Maybe it is also of interest for others.
Due to the nature of those Frameworks, I had to develop a few UIViews/Controllers. The XIB-files are located within PlugIn directory together with the other code of my plugin
For testing with XCode, I added (linked) the XIB files also to the App in Xcode, so that they are available in compiled NIB version. I guess that could also be done during PlugIn Build.
After debugging and finalizing the code, I used the “build.sh”-script which is part of the project template. That creates a directory structure which differes a little bit from @agramonte.
I had to manually add the generated NIB files during the build of the App (not only the plugin) from the created App-package to the directory resources. (I pretty believe that this can be highly improved).
Next I created the tar file within the directory “iphone” or “iphone-sim”
(Terminal): tar -czf iphone.tgz metadata.lua libplugin_paybluecode.a resources