How to add iOS Plugin's .bundle??

In Unity 4, just locate files(source , resource) to ’ Assets/Plugins/iOS '.

It was very easy…

How can I do with unreal engine?

modify build script?? locate resource file to valid path? ex) Plugins/My Plugin/Content ?..

I try below,

plugin’s build.cs

if (Target.Platform == UnrealTargetPlatform.IOS) {
....
PublicAdditionalLibraries.Add( LIBRARY PATH );  //it's Okay. working.
AdditionalBundleResources.Add(new UEBuildBundleResource( BUNDLE PATH ) );
....
}

but it seems failed. resource file (.bundle) didn’t found from binary(.app).

What should i do? ( I just want add .bundle not .framework.)

(For native iOS Library’s resource)


2/21

I add .bundle resource manually ( temporary way )

  1. Run iOS From UE Editor ( making Intermediate/ProjectFilesIOS/ … )
  2. Open ( PROJECT FOLDER )/Intermediate/ProjectFilesIOS/PROJECT .xcodeproj
  3. project Setting - target - Build Phases - add New Copy Bundle Resources Phase

  1. click + in Copy bundle Resources
  2. select .bundle file.
  3. Build / Run

Is there another way that adding .bundle resource automatic from UE Editor???

You should look at using PublicAdditionalFrameworks.

The best example is in the IOS TapJoy plugin:

Add the TapJoy framework 
PublicAdditionalFrameworks.Add(  
    new UEBuildFramework(  
        "TapJoy",	
        "../../ThirdPartyFrameworks/Tapjoy.embeddedframework.zip",
        "Resources/TapjoyResources.bundle"
    ) 
);  

https://github.com/EpicGames/UnrealEngine/blob/release/Engine/Plugins/Runtime/Advertising/IOSTapJoy/Source/IOSTapJoy/IOSTapJoy.Build.cs#L46

I couldn’t get this to work as the source in my game module couldn’t find the header files from the framework when compiling.

I’d love to know how you get on with this method.

Edit: Your framework zip file should be the same name as your framework file. i.e. XXX.framework or XXX.embeddedframework should be compressed into XXX.framework.zip or XXX.embeddedframework.zip.

You also need to work out the relative path to your plugin or project file.

The easiest way to do that is add a string property to get the path to your Build.cs file:

private string ModulePath
{
    get { return Path.GetDirectoryName( RulesCompiler.GetModuleFilename( this.GetType().Name ) ); }
}

Make sure you add using System.IO; to the top of your Build.cs.

You can then use Path.Combine( ModulePath, ) to find the files in the correct location.

If you’re doing this from your game module then I’d recommend a ThirdParty directory at the same level as your Source folder.

It’s just add .framewrok. A wrong answer.
As I write question, I asked “how to Copy Bundle Resources? For native iOS Library’s resource”.

well… I found the way using UnrealEditor. I’ll write this to additional answer.

Project Setting - Package - Additional Non-Asset Directiories To Copy
then add folder.

This function is incomplete…
becuase…

UE 4 Copy my resource file to folder(3 step cookeddata/Project Name/content ).

I expect copying file to .app file’s root not folder. Just File not include folders (even “Test Folder” in that picture…)

iOS Third party libraries can’t find resource files until modify resource path…