cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maxime Alexandre <>
Subject Re: <resource-file> "target" attribute ignored on iOS when installing a Cordova plugin
Date Thu, 26 Nov 2015 20:29:56 GMT
Sorry, to be more precise, it's <resource-file src="myfolder" /> so it will
include all the files inside the "myfolder". So i need to move the
"myfolder" into the root folder of my plugin because it's the "src", so it
could be found and copied with this exact same name in the "Ressources"
folder, so it will precisely create a "Ressources/myfolder" which is what I
need. Setting a "target" attribute should be a nicer solution so I
could do *<resource-file
src="src/**anyfolder/anyfile**" target="myfolder**" />.*


On Thu, Nov 26, 2015 at 8:51 PM, Maxime Alexandre <> wrote:

> Ok... well because there is a "*shell.cp('-R', srcFile,
> project.resources_dir);*" i managed to get my folder into XCode with the
> correct name.
> So i had to name the "src" folder with the name I want it to appear in the
> "Ressources" folder (which is not so obvious because it's not working like
> this on android), then added *<resource-file src="**myfolder/myfile**" />* in
> the plugin.xml file.
> Are you okay with adding a not in the documentation telling that the
> "target" attribute is not used for iOS?
> Thanks for your feeback.
> --
> Maxime
> On Thu, Nov 26, 2015 at 7:56 PM, Maxime Alexandre <
>> wrote:
>> Hello everyone,
>> I want to copy a resource file into a specific folder, not just into the
>> "Resources" folder (like "Resources/myfolder") but this is not working when
>> i define a *<resource-file src="myfile" target="myfolder/myfile" />*
>> into my plugin.xml.
>> I checked the source code and the target attribute is not used in the
>> *cordova-lib/src/plugman/platforms/ios.js* file :
>> destFile = path.resolve(project.resources_dir, path.basename(src));
>> whereas for *android.js* :
>> var target =;
>> ...
>> Is there a reason this is not implemented? At least the documentation
>> should say that the attribute "target" is ignored on iOS.
>> When i drag&drag my folder into the Resources folder in my XCode project,
>> this declares only the folder name (i.e. "myfolder") into the .pbxproj
>> file... so is there another way for me to add this resource folder into my
>> XCode project from plugin.xml or inside a hook or any other solution?
>> Thank you!
>> --
>> Maxime

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message