Unity NOT Copying all plugins files into xCode on Build

Hi Guys!
Im having some problems with a proyect im building (Its an old proyect here at work, and have some old plugins)

But my Main problem, is that i have OpenSSL
wich have two folders inside it

  • Include
  • Lib

When i build to xCode, i have always the same issue, i have to manually copy the files from include, to the xcode folder.
(i have several other plugins, like analytics, purchases, etc) and all of them are getting his files coppied to xcode proj folder.

Any hints on what this could be?

This causes that when i try to compile on xcode, i get a compiler error
#import <openssl/pkcs7.h> openssl/pkcs7.h file not found.

Thanks in Advance!

I believe you need to write your own Editor post-processor script to copy those.

Are you using Unity 5?

In Unity 5 you can specify target platforms for plugin files in the inspector.

Yes, I’m using unity 5, and the target platform is setted on the plugin,
Anyways, i’ve solved by copying all the files manually with a post processor script, hope it helps if anyone heads this same issue
(BTW, i found this on Unity Forum, but i cant recall the user, or the post where i found it)

    internal static void CopyAndReplaceDirectory(string srcPath, string dstPath)
    {
        //Debug.LogError("Destination Path: " + dstPath);
        //Debug.LogError("Destination Path Exists? : " + Directory.Exists(dstPath));

        if (Directory.Exists(dstPath))
            Directory.Delete(dstPath,true);

        Directory.CreateDirectory(dstPath);

        foreach (var file in Directory.GetFiles(srcPath))
            File.Copy(file, Path.Combine(dstPath, Path.GetFileName(file)));

        foreach (var dir in Directory.GetDirectories(srcPath))
            CopyAndReplaceDirectory(dir, Path.Combine(dstPath, Path.GetFileName(dir)));
    }

Using Unity 2019 - We place our .h and .mm files in Assets/Plugin/iOS and it automatically copies these files into Xcode. However, .storyboard files do not get copied.

We are not using any Post Processing script as of now. Any thoughts as to why the storyboard files do not get copied when building for iOS from Unity?

I think there are many types of files which don’t get copied into Xcode projects. With my almost 10 years of Unity+iOS expertise I would say, there is nothing wrong with post-processing your Xcode project. And Unity provides a library for doing such stuff. I’m not sure if it has all the features though, as we are using a heavily customized post-processing library based on Unity’s legacy one.