How to add an external plugin? (Adjust)

Error means that plugin is not in directory Xcode is looking for static libraries. You can add it in Xcode’s “Build Settings” Library Search Path in project properties, but easier, imo, is to open file CoronaNative.xcconfig, and edit line 7

From

LIBRARY_SEARCH_PATHS = $(inherited) “$(CORONA_ROOT)/Corona/ios/lib”
to

LIBRARY_SEARCH_PATHS = $(inherited) “$(CORONA_ROOT)/Corona/ios/lib” “$(PROJECT_DIR)”
And put your library next to your project.

Also, latest build has Self-Hosted plugins activated for everyone. So now it is really matter of hosting simple file to get it working in Simulator, without having to resort to native

Thanks a lot!! I tried as you said but I keep getting the same errors.

I guess I’m forgetting to do something that is obvious to you.

I also tried the simulator version but nothing. I tried to configure the buil file but it didn’t help.

I am working with version 2020.3577.

I had switched to native only to add this plugin otherwise my project was fine.

I don’t know if the problem is me or the plugin.

Could you kindly make me a small project that simply includes the adjust library and calls it to the main (okay without using native). At this point I’m really in front of a wall.

Hi @maximo97

Ugi in here from Adjust. Feel free to clone  corona_sdk repository and inside of the  plugin folder, you can find an app example which should be functional. Inside of  plugin/ios  folder you can open  App.xcodeproj  file and see how Xcode project of the app which uses our SDK looks like and see what you might be doing differently.

Cheers

Here I am. Thank you @vlads

Thanks to your passage it worked on native. I was stuck. I tried to do this without native but it doesn’t find the plugin and it gives me an error. Is there any other step I need to do to work. Thanks again.

And thanks also to @
uerceg

Hey. I you want to use plugin from the Corona Simulator you can add this to your build settings, and that’s it.

settings = {     plugins =     {         ["plugin.adjust"] =         {             publisherId = "com.adjust",             supportedPlatforms = {                 iphone={url="https://vlad-test.s3.amazonaws.com/plugin\_adjust-iphone.tgz"},                 ["iphone-sim"]={url="https://vlad-test.s3.amazonaws.com/plugin\_adjust-iphone-sim.tgz"},             }         },     } }

I created pull request to push this changes upstream. Also, if adjust could host those files, it would be awesome.

Thanks again!

But maybe there is an error in the link.I get this:

Ah, and thanks for the pull request

@vlads Thanks for the PR! Just one quick question on it - from what I see it should be completely related to iOS example app project settings, so no need to publish new plugin version because of the changes?

And also one question on the files you hosted on AWS - do you need them hosted somewhere specially or I simply put them to some folder in our GitHub repo? I guess it would be nice to also add instructions you wrote above on how to run the plugin in Corona Simulator to our README.

Sorry for misunderstanding. Try to paste that code, and Simulator would give you an error that plugin cannot be downloaded, that is expected. Press OK and try to build your app for iOS.

Uerceg, no pull request does not require new version. It only makes 2 new files, in BuiltPlugin, when build.sh is called. Those files can be used as self-hosted plugins in Corona Simulator builds. Basically no need for Native builds anymore

@vlads

Everything works fine. Thank you very much