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

Mark Veenstra edited comment on CB-12009 at 4/13/17 6:45 AM:
-------------------------------------------------------------

Hmm the documentation link I gave is down indeed.
But the link you just gave seems to tell the same.
We have tested the sounds in the {Library/Sounds} and in the {Resources} 
folder, but these don't seem to work (maybe because of the issue you just 
pointed out). We did notice that when we add the sounds to the library root and 
build an IPA / run from XCode the sounds don't work on first start of the app, 
but after you kill it and start it again the push notification custom sounds do 
work, but only when the sounds are in the app bundle roout (one directory 
higher than {Resources})


was (Author: markdark):
Hmm the documentation link I gave is down indeed.
But the link you just gave seems to tell the same.
We have tested the sounds in the `Library/Sounds` and in the `Resources` 
folder, but these don't seem to work (maybe because of the issue you just 
pointed out). We did notice that when we add the sounds to the library root and 
build an IPA / run from XCode the sounds don't work on first start of the app, 
but after you kill it and start it again the push notification custom sounds do 
work, but only when the sounds are in the app bundle roout (one directory 
higher than Resources)

> <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: cordova-ios@4.4.1
>
>
> 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: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to