[ 
https://issues.apache.org/jira/browse/CB-12009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15979533#comment-15979533
 ] 

ASF GitHub Bot commented on CB-12009:
-------------------------------------

GitHub user shazron opened a pull request:

    https://github.com/apache/cordova-ios/pull/310

    CB-12009 - <resource-file> target attribute ignored on iOS when installing 
a Cordova plugin

    ### Platforms affected
    
    self
    
    ### What does this PR do?
    
    Fix bug where <resource-file> `target` attribute in plugin.xml was being 
ignored.
    
    ### What testing has been done on this change?
    
    npm test, local adding of plugin with target attribute
    
    ### Checklist
    - [X] [Reported an issue](http://cordova.apache.org/contribute/issues.html) 
in the JIRA database
    - [X] Commit message follows the format: "CB-3232: (android) Fix bug with 
resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform 
affected.
    - [X] Added automated test coverage as appropriate for this change.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/shazron/cordova-ios CB-12009

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-ios/pull/310.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #310
    
----
commit a6d21d7b3693f8c573fa5b16f0424ee57473abb0
Author: Shazron Abdullah <[email protected]>
Date:   2017-04-21T22:47:53Z

    CB-12009 - <resource-file> target attribute ignored on iOS when installing 
a Cordova plugin

----


> <resource-file> target attribute ignored on iOS when installing a Cordova 
> plugin
> --------------------------------------------------------------------------------
>
>                 Key: CB-12009
>                 URL: https://issues.apache.org/jira/browse/CB-12009
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 6.3.0, 6.3.1
>            Reporter: Mark Veenstra
>            Priority: Critical
>             Fix For: [email protected]
>
>
> In the Cordova plugin.xml documentation it is stated that the 
> {{<resource-file>}} tag can have an attribute {{target}}. See next link: 
> https://cordova.apache.org/docs/en/latest/plugin_ref/spec.html#resource-file
> But when I try to use this target attribute it is just ignored and all 
> {{<resource-file>}} configurations are added to the {{Resources}} directory 
> on iOS.
> It seems to me that the {{cordova-lib}} code just ignores this {{target}} 
> attribute, see next link: 
> https://github.com/apache/cordova-lib/blob/master/cordova-lib/src/plugman/platforms/ios.js#L165
> The code grabbed from that link:
> {{destFile = path.resolve(project.resources_dir, path.basename(src));}}
> Here you can see the destFile is hardcoded for the resources_dir.
> We are trying to add push notification sounds to the iOS {{Resources}} 
> directory as well as adding it to either the bundle root or 
> {{Library/Sounds}}. Because we have seen that since iOS 10 we need to put the 
> sounds files elsewhere then the {{Resources}} directory to get it work. See: 
> https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/TheNotificationPayload.html#//apple_ref/doc/uid/TP40008194-CH107-SW1



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to