[jira] [Commented] (CB-8032) Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory:
[ https://issues.apache.org/jira/browse/CB-8032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14590809#comment-14590809 ] ASF GitHub Bot commented on CB-8032: Github user asfgit closed the pull request at: https://github.com/apache/cordova-ios/pull/119 Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory: -- Key: CB-8032 URL: https://issues.apache.org/jira/browse/CB-8032 Project: Apache Cordova Issue Type: Sub-task Components: Plugin Camera, Plugin File Environment: iOS Reporter: Shazron Abdullah Assignee: Shazron Abdullah Right now in CDVFileSystem-makeEntryForPath:isDirectory:, in the NSDictionary that is returned, for the key nativeURL the format is fixed (file:// protocol for a local filesystem reference, and assets-library:/ for a assets library filesystem reference.) When calculating the nativeURL, allow this to be specified externally, check for a selector nativeURL and call that if available. This is for example declared in a Category in this plugin: https://github.com/apache/cordova-plugins/blob/5d8ef21dcbde1f99d60e1b52ae3a3800e4c185d9/local-webserver/src/ios/CDVLocalFileSystem%2BNativeURL.m ... which when linked will have the selector available for the File plugin to call. This code is part of the local webserver plugin - and it needs the File references to be proxied through a local webserver. For example if the FileEntry is to: file://my/package/folder/Documents/foo.txt .. the nativeURL would be, with this new category method, and the local webserver listening to http://localhost:8080: http://localhost:8080/local-filesystem/my/package/folder/Documents/foo.txt -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-8032) Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory:
[ https://issues.apache.org/jira/browse/CB-8032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14590803#comment-14590803 ] ASF GitHub Bot commented on CB-8032: Github user shazron commented on the pull request: https://github.com/apache/cordova-ios/pull/119#issuecomment-112975897 Auto-closing since 4.0.x method has a transformURL method in the CommandDelegate that plugins check Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory: -- Key: CB-8032 URL: https://issues.apache.org/jira/browse/CB-8032 Project: Apache Cordova Issue Type: Sub-task Components: Plugin Camera, Plugin File Environment: iOS Reporter: Shazron Abdullah Assignee: Shazron Abdullah Right now in CDVFileSystem-makeEntryForPath:isDirectory:, in the NSDictionary that is returned, for the key nativeURL the format is fixed (file:// protocol for a local filesystem reference, and assets-library:/ for a assets library filesystem reference.) When calculating the nativeURL, allow this to be specified externally, check for a selector nativeURL and call that if available. This is for example declared in a Category in this plugin: https://github.com/apache/cordova-plugins/blob/5d8ef21dcbde1f99d60e1b52ae3a3800e4c185d9/local-webserver/src/ios/CDVLocalFileSystem%2BNativeURL.m ... which when linked will have the selector available for the File plugin to call. This code is part of the local webserver plugin - and it needs the File references to be proxied through a local webserver. For example if the FileEntry is to: file://my/package/folder/Documents/foo.txt .. the nativeURL would be, with this new category method, and the local webserver listening to http://localhost:8080: http://localhost:8080/local-filesystem/my/package/folder/Documents/foo.txt -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-8032) Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory:
[ https://issues.apache.org/jira/browse/CB-8032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14351415#comment-14351415 ] ASF subversion and git services commented on CB-8032: - Commit 2ed379c7c99b88a639f5541f9df8d772b2b81bfe in cordova-plugin-file's branch refs/heads/master from [~shazron] [ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-file.git;h=2ed379c ] CB-8032 - File Plugin - Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory: (closes #96) Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory: -- Key: CB-8032 URL: https://issues.apache.org/jira/browse/CB-8032 Project: Apache Cordova Issue Type: Sub-task Components: Plugin Camera, Plugin File Environment: iOS Reporter: Shazron Abdullah Assignee: Shazron Abdullah Right now in CDVFileSystem-makeEntryForPath:isDirectory:, in the NSDictionary that is returned, for the key nativeURL the format is fixed (file:// protocol for a local filesystem reference, and assets-library:/ for a assets library filesystem reference.) When calculating the nativeURL, allow this to be specified externally, check for a selector nativeURL and call that if available. This is for example declared in a Category in this plugin: https://github.com/apache/cordova-plugins/blob/5d8ef21dcbde1f99d60e1b52ae3a3800e4c185d9/local-webserver/src/ios/CDVLocalFileSystem%2BNativeURL.m ... which when linked will have the selector available for the File plugin to call. This code is part of the local webserver plugin - and it needs the File references to be proxied through a local webserver. For example if the FileEntry is to: file://my/package/folder/Documents/foo.txt .. the nativeURL would be, with this new category method, and the local webserver listening to http://localhost:8080: http://localhost:8080/local-filesystem/my/package/folder/Documents/foo.txt -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-8032) Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory:
[ https://issues.apache.org/jira/browse/CB-8032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14351416#comment-14351416 ] ASF GitHub Bot commented on CB-8032: Github user asfgit closed the pull request at: https://github.com/apache/cordova-plugin-file/pull/96 Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory: -- Key: CB-8032 URL: https://issues.apache.org/jira/browse/CB-8032 Project: Apache Cordova Issue Type: Sub-task Components: Plugin Camera, Plugin File Environment: iOS Reporter: Shazron Abdullah Assignee: Shazron Abdullah Right now in CDVFileSystem-makeEntryForPath:isDirectory:, in the NSDictionary that is returned, for the key nativeURL the format is fixed (file:// protocol for a local filesystem reference, and assets-library:/ for a assets library filesystem reference.) When calculating the nativeURL, allow this to be specified externally, check for a selector nativeURL and call that if available. This is for example declared in a Category in this plugin: https://github.com/apache/cordova-plugins/blob/5d8ef21dcbde1f99d60e1b52ae3a3800e4c185d9/local-webserver/src/ios/CDVLocalFileSystem%2BNativeURL.m ... which when linked will have the selector available for the File plugin to call. This code is part of the local webserver plugin - and it needs the File references to be proxied through a local webserver. For example if the FileEntry is to: file://my/package/folder/Documents/foo.txt .. the nativeURL would be, with this new category method, and the local webserver listening to http://localhost:8080: http://localhost:8080/local-filesystem/my/package/folder/Documents/foo.txt -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-8032) Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory:
[ https://issues.apache.org/jira/browse/CB-8032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14272142#comment-14272142 ] ASF subversion and git services commented on CB-8032: - Commit 376bec2b96699c32ef6d646e1c5aec954d12d3c9 in cordova-plugin-camera's branch refs/heads/master from [~shazron] [ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-camera.git;h=376bec2 ] CB-8032 - Camera Plugin - Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory: (closes #57) Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory: -- Key: CB-8032 URL: https://issues.apache.org/jira/browse/CB-8032 Project: Apache Cordova Issue Type: Sub-task Components: Plugin Camera, Plugin Contacts, Plugin File, Plugin File Transfer, Plugin Media, Plugin Media Capture Environment: iOS Reporter: Shazron Abdullah Right now in CDVFileSystem-makeEntryForPath:isDirectory:, in the NSDictionary that is returned, for the key nativeURL the format is fixed (file:// protocol for a local filesystem reference, and assets-library:/ for a assets library filesystem reference.) When calculating the nativeURL, allow this to be specified externally, check for a selector nativeURL and call that if available. This is for example declared in a Category in this plugin: https://github.com/apache/cordova-plugins/blob/5d8ef21dcbde1f99d60e1b52ae3a3800e4c185d9/local-webserver/src/ios/CDVLocalFileSystem%2BNativeURL.m ... which when linked will have the selector available for the File plugin to call. This code is part of the local webserver plugin - and it needs the File references to be proxied through a local webserver. For example if the FileEntry is to: file://my/package/folder/Documents/foo.txt .. the nativeURL would be, with this new category method, and the local webserver listening to http://localhost:8080: http://localhost:8080/local-filesystem/my/package/folder/Documents/foo.txt -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-8032) Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory:
[ https://issues.apache.org/jira/browse/CB-8032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14272143#comment-14272143 ] ASF GitHub Bot commented on CB-8032: Github user asfgit closed the pull request at: https://github.com/apache/cordova-plugin-camera/pull/57 Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory: -- Key: CB-8032 URL: https://issues.apache.org/jira/browse/CB-8032 Project: Apache Cordova Issue Type: Sub-task Components: Plugin Camera, Plugin Contacts, Plugin File, Plugin File Transfer, Plugin Media, Plugin Media Capture Environment: iOS Reporter: Shazron Abdullah Right now in CDVFileSystem-makeEntryForPath:isDirectory:, in the NSDictionary that is returned, for the key nativeURL the format is fixed (file:// protocol for a local filesystem reference, and assets-library:/ for a assets library filesystem reference.) When calculating the nativeURL, allow this to be specified externally, check for a selector nativeURL and call that if available. This is for example declared in a Category in this plugin: https://github.com/apache/cordova-plugins/blob/5d8ef21dcbde1f99d60e1b52ae3a3800e4c185d9/local-webserver/src/ios/CDVLocalFileSystem%2BNativeURL.m ... which when linked will have the selector available for the File plugin to call. This code is part of the local webserver plugin - and it needs the File references to be proxied through a local webserver. For example if the FileEntry is to: file://my/package/folder/Documents/foo.txt .. the nativeURL would be, with this new category method, and the local webserver listening to http://localhost:8080: http://localhost:8080/local-filesystem/my/package/folder/Documents/foo.txt -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-8032) Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory:
[ https://issues.apache.org/jira/browse/CB-8032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14243118#comment-14243118 ] ASF subversion and git services commented on CB-8032: - Commit b52ca7396afc2b9e9c9245d1d5e36f169fd51658 in cordova-plugins's branch refs/heads/master from [~shazron] [ https://git-wip-us.apache.org/repos/asf?p=cordova-plugins.git;h=b52ca73 ] CB-8032 - assets-library url transform fix. Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory: -- Key: CB-8032 URL: https://issues.apache.org/jira/browse/CB-8032 Project: Apache Cordova Issue Type: Sub-task Components: Plugin Camera, Plugin Contacts, Plugin File, Plugin File Transfer, Plugin Media, Plugin Media Capture Environment: iOS Reporter: Shazron Abdullah Right now in CDVFileSystem-makeEntryForPath:isDirectory:, in the NSDictionary that is returned, for the key nativeURL the format is fixed (file:// protocol for a local filesystem reference, and assets-library:/ for a assets library filesystem reference.) When calculating the nativeURL, allow this to be specified externally, check for a selector nativeURL and call that if available. This is for example declared in a Category in this plugin: https://github.com/apache/cordova-plugins/blob/5d8ef21dcbde1f99d60e1b52ae3a3800e4c185d9/local-webserver/src/ios/CDVLocalFileSystem%2BNativeURL.m ... which when linked will have the selector available for the File plugin to call. This code is part of the local webserver plugin - and it needs the File references to be proxied through a local webserver. For example if the FileEntry is to: file://my/package/folder/Documents/foo.txt .. the nativeURL would be, with this new category method, and the local webserver listening to http://localhost:8080: http://localhost:8080/local-filesystem/my/package/folder/Documents/foo.txt -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-8032) Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory:
[ https://issues.apache.org/jira/browse/CB-8032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14243136#comment-14243136 ] ASF subversion and git services commented on CB-8032: - Commit 93b17a4c7f674269922f5511104dd60cddcd1461 in cordova-plugin-file's branch refs/heads/CB-8032 from [~shazron] [ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-file.git;h=93b17a4 ] CB-8032 - File Plugin - Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory: Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory: -- Key: CB-8032 URL: https://issues.apache.org/jira/browse/CB-8032 Project: Apache Cordova Issue Type: Sub-task Components: Plugin Camera, Plugin Contacts, Plugin File, Plugin File Transfer, Plugin Media, Plugin Media Capture Environment: iOS Reporter: Shazron Abdullah Right now in CDVFileSystem-makeEntryForPath:isDirectory:, in the NSDictionary that is returned, for the key nativeURL the format is fixed (file:// protocol for a local filesystem reference, and assets-library:/ for a assets library filesystem reference.) When calculating the nativeURL, allow this to be specified externally, check for a selector nativeURL and call that if available. This is for example declared in a Category in this plugin: https://github.com/apache/cordova-plugins/blob/5d8ef21dcbde1f99d60e1b52ae3a3800e4c185d9/local-webserver/src/ios/CDVLocalFileSystem%2BNativeURL.m ... which when linked will have the selector available for the File plugin to call. This code is part of the local webserver plugin - and it needs the File references to be proxied through a local webserver. For example if the FileEntry is to: file://my/package/folder/Documents/foo.txt .. the nativeURL would be, with this new category method, and the local webserver listening to http://localhost:8080: http://localhost:8080/local-filesystem/my/package/folder/Documents/foo.txt -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-8032) Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory:
[ https://issues.apache.org/jira/browse/CB-8032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14243162#comment-14243162 ] ASF GitHub Bot commented on CB-8032: GitHub user shazron opened a pull request: https://github.com/apache/cordova-plugin-file/pull/96 CB-8032 - File Plugin - Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory: - backwards compatible - if urlTransformer is not set, it will return the passed in NSURL You can merge this pull request into a Git repository by running: $ git pull https://github.com/shazron/cordova-plugin-file CB-8032- Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-plugin-file/pull/96.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 #96 commit 93b17a4c7f674269922f5511104dd60cddcd1461 Author: Shazron Abdullah shaz...@apache.org Date: 2014-12-11T21:03:34Z CB-8032 - File Plugin - Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory: Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory: -- Key: CB-8032 URL: https://issues.apache.org/jira/browse/CB-8032 Project: Apache Cordova Issue Type: Sub-task Components: Plugin Camera, Plugin Contacts, Plugin File, Plugin File Transfer, Plugin Media, Plugin Media Capture Environment: iOS Reporter: Shazron Abdullah Right now in CDVFileSystem-makeEntryForPath:isDirectory:, in the NSDictionary that is returned, for the key nativeURL the format is fixed (file:// protocol for a local filesystem reference, and assets-library:/ for a assets library filesystem reference.) When calculating the nativeURL, allow this to be specified externally, check for a selector nativeURL and call that if available. This is for example declared in a Category in this plugin: https://github.com/apache/cordova-plugins/blob/5d8ef21dcbde1f99d60e1b52ae3a3800e4c185d9/local-webserver/src/ios/CDVLocalFileSystem%2BNativeURL.m ... which when linked will have the selector available for the File plugin to call. This code is part of the local webserver plugin - and it needs the File references to be proxied through a local webserver. For example if the FileEntry is to: file://my/package/folder/Documents/foo.txt .. the nativeURL would be, with this new category method, and the local webserver listening to http://localhost:8080: http://localhost:8080/local-filesystem/my/package/folder/Documents/foo.txt -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-8032) Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory:
[ https://issues.apache.org/jira/browse/CB-8032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14243166#comment-14243166 ] Shazron Abdullah commented on CB-8032: -- File plugin pull request added above, tested. I'll use the same model for the other 5 plugins. Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory: -- Key: CB-8032 URL: https://issues.apache.org/jira/browse/CB-8032 Project: Apache Cordova Issue Type: Sub-task Components: Plugin Camera, Plugin Contacts, Plugin File, Plugin File Transfer, Plugin Media, Plugin Media Capture Environment: iOS Reporter: Shazron Abdullah Right now in CDVFileSystem-makeEntryForPath:isDirectory:, in the NSDictionary that is returned, for the key nativeURL the format is fixed (file:// protocol for a local filesystem reference, and assets-library:/ for a assets library filesystem reference.) When calculating the nativeURL, allow this to be specified externally, check for a selector nativeURL and call that if available. This is for example declared in a Category in this plugin: https://github.com/apache/cordova-plugins/blob/5d8ef21dcbde1f99d60e1b52ae3a3800e4c185d9/local-webserver/src/ios/CDVLocalFileSystem%2BNativeURL.m ... which when linked will have the selector available for the File plugin to call. This code is part of the local webserver plugin - and it needs the File references to be proxied through a local webserver. For example if the FileEntry is to: file://my/package/folder/Documents/foo.txt .. the nativeURL would be, with this new category method, and the local webserver listening to http://localhost:8080: http://localhost:8080/local-filesystem/my/package/folder/Documents/foo.txt -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-8032) Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory:
[ https://issues.apache.org/jira/browse/CB-8032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14243450#comment-14243450 ] Shazron Abdullah commented on CB-8032: -- Here's my research into the 6 plugins needing changes: h4. 1. cordova-plugin-camera *PENDING* - file URI returned needs to be transformed h4. 2. cordova-plugin-file *DONE* - in PR h4. 3. cordova-plugin-file-transfer *NO CHANGE* - connection:didFinishLoading:, handled by CDVFile h4. 4. cordova-plugin-media *NO CHANGE* - file urls are used internally only. h4. 5. cordova-plugin-media-capture *NO CHANGE* - full paths are sent back through the API, not urls. Users use the File API to get native urls? h4. 6. cordova-plugin-contacts *NO CHANGE* - the only paths returned are from extractPhotos, and even though the type is 'url' it's actually a file path. Users use the File API to get native urls? Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory: -- Key: CB-8032 URL: https://issues.apache.org/jira/browse/CB-8032 Project: Apache Cordova Issue Type: Sub-task Components: Plugin Camera, Plugin Contacts, Plugin File, Plugin File Transfer, Plugin Media, Plugin Media Capture Environment: iOS Reporter: Shazron Abdullah Right now in CDVFileSystem-makeEntryForPath:isDirectory:, in the NSDictionary that is returned, for the key nativeURL the format is fixed (file:// protocol for a local filesystem reference, and assets-library:/ for a assets library filesystem reference.) When calculating the nativeURL, allow this to be specified externally, check for a selector nativeURL and call that if available. This is for example declared in a Category in this plugin: https://github.com/apache/cordova-plugins/blob/5d8ef21dcbde1f99d60e1b52ae3a3800e4c185d9/local-webserver/src/ios/CDVLocalFileSystem%2BNativeURL.m ... which when linked will have the selector available for the File plugin to call. This code is part of the local webserver plugin - and it needs the File references to be proxied through a local webserver. For example if the FileEntry is to: file://my/package/folder/Documents/foo.txt .. the nativeURL would be, with this new category method, and the local webserver listening to http://localhost:8080: http://localhost:8080/local-filesystem/my/package/folder/Documents/foo.txt -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-8032) Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory:
[ https://issues.apache.org/jira/browse/CB-8032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14243493#comment-14243493 ] ASF GitHub Bot commented on CB-8032: GitHub user shazron opened a pull request: https://github.com/apache/cordova-plugin-camera/pull/57 CB-8032 - Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory: Depends on CB-7937. You can merge this pull request into a Git repository by running: $ git pull https://github.com/shazron/cordova-plugin-camera CB-8032 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-plugin-camera/pull/57.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 #57 commit dc2d7c580115df3ec2e5911924022b51e5e314ca Author: Shazron Abdullah shaz...@apache.org Date: 2014-11-05T20:19:42Z CB-7937 - Re-factor iOS Camera plugin so that it is testable commit 66e5dd7aeb443e4c4160a32806339320a1e18d51 Author: Shazron Abdullah shaz...@apache.org Date: 2014-12-12T00:42:02Z CB-8032 - Camera Plugin - Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory: Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory: -- Key: CB-8032 URL: https://issues.apache.org/jira/browse/CB-8032 Project: Apache Cordova Issue Type: Sub-task Components: Plugin Camera, Plugin Contacts, Plugin File, Plugin File Transfer, Plugin Media, Plugin Media Capture Environment: iOS Reporter: Shazron Abdullah Right now in CDVFileSystem-makeEntryForPath:isDirectory:, in the NSDictionary that is returned, for the key nativeURL the format is fixed (file:// protocol for a local filesystem reference, and assets-library:/ for a assets library filesystem reference.) When calculating the nativeURL, allow this to be specified externally, check for a selector nativeURL and call that if available. This is for example declared in a Category in this plugin: https://github.com/apache/cordova-plugins/blob/5d8ef21dcbde1f99d60e1b52ae3a3800e4c185d9/local-webserver/src/ios/CDVLocalFileSystem%2BNativeURL.m ... which when linked will have the selector available for the File plugin to call. This code is part of the local webserver plugin - and it needs the File references to be proxied through a local webserver. For example if the FileEntry is to: file://my/package/folder/Documents/foo.txt .. the nativeURL would be, with this new category method, and the local webserver listening to http://localhost:8080: http://localhost:8080/local-filesystem/my/package/folder/Documents/foo.txt -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-8032) Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory:
[ https://issues.apache.org/jira/browse/CB-8032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14240230#comment-14240230 ] ASF subversion and git services commented on CB-8032: - Commit 0838a073021a81b73a9b0dbb9215e06c010a5789 in cordova-ios's branch refs/heads/wkwebview from [~shazron] [ https://git-wip-us.apache.org/repos/asf?p=cordova-ios.git;h=0838a07 ] CB-8032 - Add new property in CDVCommandDelegate (urlTransformer), plus style fixups. Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory: -- Key: CB-8032 URL: https://issues.apache.org/jira/browse/CB-8032 Project: Apache Cordova Issue Type: Sub-task Components: Plugin Camera, Plugin Contacts, Plugin File, Plugin File Transfer, Plugin Media, Plugin Media Capture Environment: iOS Reporter: Shazron Abdullah Right now in CDVFileSystem-makeEntryForPath:isDirectory:, in the NSDictionary that is returned, for the key nativeURL the format is fixed (file:// protocol for a local filesystem reference, and assets-library:/ for a assets library filesystem reference.) When calculating the nativeURL, allow this to be specified externally, check for a selector nativeURL and call that if available. This is for example declared in a Category in this plugin: https://github.com/apache/cordova-plugins/blob/5d8ef21dcbde1f99d60e1b52ae3a3800e4c185d9/local-webserver/src/ios/CDVLocalFileSystem%2BNativeURL.m ... which when linked will have the selector available for the File plugin to call. This code is part of the local webserver plugin - and it needs the File references to be proxied through a local webserver. For example if the FileEntry is to: file://my/package/folder/Documents/foo.txt .. the nativeURL would be, with this new category method, and the local webserver listening to http://localhost:8080: http://localhost:8080/local-filesystem/my/package/folder/Documents/foo.txt -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-8032) Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory:
[ https://issues.apache.org/jira/browse/CB-8032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14240234#comment-14240234 ] ASF subversion and git services commented on CB-8032: - Commit bbd62028c0260d81d285c9babe04a46682971668 in cordova-plugins's branch refs/heads/master from [~shazron] [ https://git-wip-us.apache.org/repos/asf?p=cordova-plugins.git;h=bbd6202 ] CB-8032 - Set new CDVCommandDelegate.urlTransformer if available. Removed CDVFileSystem category methods. Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory: -- Key: CB-8032 URL: https://issues.apache.org/jira/browse/CB-8032 Project: Apache Cordova Issue Type: Sub-task Components: Plugin Camera, Plugin Contacts, Plugin File, Plugin File Transfer, Plugin Media, Plugin Media Capture Environment: iOS Reporter: Shazron Abdullah Right now in CDVFileSystem-makeEntryForPath:isDirectory:, in the NSDictionary that is returned, for the key nativeURL the format is fixed (file:// protocol for a local filesystem reference, and assets-library:/ for a assets library filesystem reference.) When calculating the nativeURL, allow this to be specified externally, check for a selector nativeURL and call that if available. This is for example declared in a Category in this plugin: https://github.com/apache/cordova-plugins/blob/5d8ef21dcbde1f99d60e1b52ae3a3800e4c185d9/local-webserver/src/ios/CDVLocalFileSystem%2BNativeURL.m ... which when linked will have the selector available for the File plugin to call. This code is part of the local webserver plugin - and it needs the File references to be proxied through a local webserver. For example if the FileEntry is to: file://my/package/folder/Documents/foo.txt .. the nativeURL would be, with this new category method, and the local webserver listening to http://localhost:8080: http://localhost:8080/local-filesystem/my/package/folder/Documents/foo.txt -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-8032) Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory:
[ https://issues.apache.org/jira/browse/CB-8032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14240296#comment-14240296 ] Shazron Abdullah commented on CB-8032: -- Made some commits (ios work in wkwebview feature branch). Now trying to test with the org.apache.cordova.file plugin. Problem is, CDVFileSystem has no reference to the CDVFile plugin itself, so I can't really grab the commandDelegate. I'll have to add a property (reflecting the urlTransformer property in CDVCommandDelegate) to CDVFileSystem, and set it in CDVFile when registering a file system. Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory: -- Key: CB-8032 URL: https://issues.apache.org/jira/browse/CB-8032 Project: Apache Cordova Issue Type: Sub-task Components: Plugin Camera, Plugin Contacts, Plugin File, Plugin File Transfer, Plugin Media, Plugin Media Capture Environment: iOS Reporter: Shazron Abdullah Right now in CDVFileSystem-makeEntryForPath:isDirectory:, in the NSDictionary that is returned, for the key nativeURL the format is fixed (file:// protocol for a local filesystem reference, and assets-library:/ for a assets library filesystem reference.) When calculating the nativeURL, allow this to be specified externally, check for a selector nativeURL and call that if available. This is for example declared in a Category in this plugin: https://github.com/apache/cordova-plugins/blob/5d8ef21dcbde1f99d60e1b52ae3a3800e4c185d9/local-webserver/src/ios/CDVLocalFileSystem%2BNativeURL.m ... which when linked will have the selector available for the File plugin to call. This code is part of the local webserver plugin - and it needs the File references to be proxied through a local webserver. For example if the FileEntry is to: file://my/package/folder/Documents/foo.txt .. the nativeURL would be, with this new category method, and the local webserver listening to http://localhost:8080: http://localhost:8080/local-filesystem/my/package/folder/Documents/foo.txt -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-8032) Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory:
[ https://issues.apache.org/jira/browse/CB-8032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14240403#comment-14240403 ] ASF subversion and git services commented on CB-8032: - Commit 1d4ba9778e6d15abe49fb8e0d6b66603372e7d7c in cordova-ios's branch refs/heads/wkwebview from [~shazron] [ https://git-wip-us.apache.org/repos/asf?p=cordova-ios.git;h=1d4ba97 ] CB-8032 - Added a typedef for block definition. Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory: -- Key: CB-8032 URL: https://issues.apache.org/jira/browse/CB-8032 Project: Apache Cordova Issue Type: Sub-task Components: Plugin Camera, Plugin Contacts, Plugin File, Plugin File Transfer, Plugin Media, Plugin Media Capture Environment: iOS Reporter: Shazron Abdullah Right now in CDVFileSystem-makeEntryForPath:isDirectory:, in the NSDictionary that is returned, for the key nativeURL the format is fixed (file:// protocol for a local filesystem reference, and assets-library:/ for a assets library filesystem reference.) When calculating the nativeURL, allow this to be specified externally, check for a selector nativeURL and call that if available. This is for example declared in a Category in this plugin: https://github.com/apache/cordova-plugins/blob/5d8ef21dcbde1f99d60e1b52ae3a3800e4c185d9/local-webserver/src/ios/CDVLocalFileSystem%2BNativeURL.m ... which when linked will have the selector available for the File plugin to call. This code is part of the local webserver plugin - and it needs the File references to be proxied through a local webserver. For example if the FileEntry is to: file://my/package/folder/Documents/foo.txt .. the nativeURL would be, with this new category method, and the local webserver listening to http://localhost:8080: http://localhost:8080/local-filesystem/my/package/folder/Documents/foo.txt -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-8032) Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory:
[ https://issues.apache.org/jira/browse/CB-8032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14240404#comment-14240404 ] ASF subversion and git services commented on CB-8032: - Commit 525df54fd983bfdfbff836f6bc48069652fff78f in cordova-plugins's branch refs/heads/master from [~shazron] [ https://git-wip-us.apache.org/repos/asf?p=cordova-plugins.git;h=525df54 ] CB-8032 - Used typedef for block definition. Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory: -- Key: CB-8032 URL: https://issues.apache.org/jira/browse/CB-8032 Project: Apache Cordova Issue Type: Sub-task Components: Plugin Camera, Plugin Contacts, Plugin File, Plugin File Transfer, Plugin Media, Plugin Media Capture Environment: iOS Reporter: Shazron Abdullah Right now in CDVFileSystem-makeEntryForPath:isDirectory:, in the NSDictionary that is returned, for the key nativeURL the format is fixed (file:// protocol for a local filesystem reference, and assets-library:/ for a assets library filesystem reference.) When calculating the nativeURL, allow this to be specified externally, check for a selector nativeURL and call that if available. This is for example declared in a Category in this plugin: https://github.com/apache/cordova-plugins/blob/5d8ef21dcbde1f99d60e1b52ae3a3800e4c185d9/local-webserver/src/ios/CDVLocalFileSystem%2BNativeURL.m ... which when linked will have the selector available for the File plugin to call. This code is part of the local webserver plugin - and it needs the File references to be proxied through a local webserver. For example if the FileEntry is to: file://my/package/folder/Documents/foo.txt .. the nativeURL would be, with this new category method, and the local webserver listening to http://localhost:8080: http://localhost:8080/local-filesystem/my/package/folder/Documents/foo.txt -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-8032) Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory:
[ https://issues.apache.org/jira/browse/CB-8032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14236433#comment-14236433 ] Shazron Abdullah commented on CB-8032: -- I think if the File API is used, it will send back and forth the cdvfile:// url, not any native representation. It will however impact performance like you said since this processing part will be a bottleneck. I'd like to move on with my approach for now (see https://issues.apache.org/jira/browse/CB-8032?focusedCommentId=14220041page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14220041) this has no impact on performance since it will only be called when needed, but at the expense of adding new functionality. Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory: -- Key: CB-8032 URL: https://issues.apache.org/jira/browse/CB-8032 Project: Apache Cordova Issue Type: Sub-task Components: Plugin Camera, Plugin Contacts, Plugin File, Plugin File Transfer, Plugin Media, Plugin Media Capture Environment: iOS Reporter: Shazron Abdullah Right now in CDVFileSystem-makeEntryForPath:isDirectory:, in the NSDictionary that is returned, for the key nativeURL the format is fixed (file:// protocol for a local filesystem reference, and assets-library:/ for a assets library filesystem reference.) When calculating the nativeURL, allow this to be specified externally, check for a selector nativeURL and call that if available. This is for example declared in a Category in this plugin: https://github.com/apache/cordova-plugins/blob/5d8ef21dcbde1f99d60e1b52ae3a3800e4c185d9/local-webserver/src/ios/CDVLocalFileSystem%2BNativeURL.m ... which when linked will have the selector available for the File plugin to call. This code is part of the local webserver plugin - and it needs the File references to be proxied through a local webserver. For example if the FileEntry is to: file://my/package/folder/Documents/foo.txt .. the nativeURL would be, with this new category method, and the local webserver listening to http://localhost:8080: http://localhost:8080/local-filesystem/my/package/folder/Documents/foo.txt -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-8032) Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory:
[ https://issues.apache.org/jira/browse/CB-8032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14236440#comment-14236440 ] Andrew Grieve commented on CB-8032: --- I think that's fine Shaz. Certainly we can expand upon your approach at a later time if it's necessary. Only ask (not sure if you've already done it or not actually), is that you make the www/ served via a subdirectory (e.g. localhost/www/index.html instead of localhost/index.html). That way any special directory we add to account for other routes (asset-library, file-system) won't conflict with files within www/ Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory: -- Key: CB-8032 URL: https://issues.apache.org/jira/browse/CB-8032 Project: Apache Cordova Issue Type: Sub-task Components: Plugin Camera, Plugin Contacts, Plugin File, Plugin File Transfer, Plugin Media, Plugin Media Capture Environment: iOS Reporter: Shazron Abdullah Right now in CDVFileSystem-makeEntryForPath:isDirectory:, in the NSDictionary that is returned, for the key nativeURL the format is fixed (file:// protocol for a local filesystem reference, and assets-library:/ for a assets library filesystem reference.) When calculating the nativeURL, allow this to be specified externally, check for a selector nativeURL and call that if available. This is for example declared in a Category in this plugin: https://github.com/apache/cordova-plugins/blob/5d8ef21dcbde1f99d60e1b52ae3a3800e4c185d9/local-webserver/src/ios/CDVLocalFileSystem%2BNativeURL.m ... which when linked will have the selector available for the File plugin to call. This code is part of the local webserver plugin - and it needs the File references to be proxied through a local webserver. For example if the FileEntry is to: file://my/package/folder/Documents/foo.txt .. the nativeURL would be, with this new category method, and the local webserver listening to http://localhost:8080: http://localhost:8080/local-filesystem/my/package/folder/Documents/foo.txt -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-8032) Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory:
[ https://issues.apache.org/jira/browse/CB-8032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14236457#comment-14236457 ] Shazron Abdullah commented on CB-8032: -- Andrew, yup, already done in preparation for this, in the local-webserver plugin :) https://github.com/apache/cordova-plugins/commits/master/local-webserver Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory: -- Key: CB-8032 URL: https://issues.apache.org/jira/browse/CB-8032 Project: Apache Cordova Issue Type: Sub-task Components: Plugin Camera, Plugin Contacts, Plugin File, Plugin File Transfer, Plugin Media, Plugin Media Capture Environment: iOS Reporter: Shazron Abdullah Right now in CDVFileSystem-makeEntryForPath:isDirectory:, in the NSDictionary that is returned, for the key nativeURL the format is fixed (file:// protocol for a local filesystem reference, and assets-library:/ for a assets library filesystem reference.) When calculating the nativeURL, allow this to be specified externally, check for a selector nativeURL and call that if available. This is for example declared in a Category in this plugin: https://github.com/apache/cordova-plugins/blob/5d8ef21dcbde1f99d60e1b52ae3a3800e4c185d9/local-webserver/src/ios/CDVLocalFileSystem%2BNativeURL.m ... which when linked will have the selector available for the File plugin to call. This code is part of the local webserver plugin - and it needs the File references to be proxied through a local webserver. For example if the FileEntry is to: file://my/package/folder/Documents/foo.txt .. the nativeURL would be, with this new category method, and the local webserver listening to http://localhost:8080: http://localhost:8080/local-filesystem/my/package/folder/Documents/foo.txt -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-8032) Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory:
[ https://issues.apache.org/jira/browse/CB-8032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14223616#comment-14223616 ] Andrew Grieve commented on CB-8032: --- Two things that make me a bit worried about this approach: 1 - Might impact performance. Probably fine though so long as it doesn't apply to NSData* types. 2 - It's a lossy transformation. E.g.: - File returns file://blah. - It then gets turned into http://localhost:8080/filesystem/blah. - JS then sends the URL back to the plugin. - The plugin now doesn't understand it because it's expecting a file:// If we apply the reverse transformation (back to file://), then plugins expecting http://localhost will end up with file://. I think all this is fine for experimentation, but I think if we're going to make the local server a supported path, then other plugins will need to know about it. Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory: -- Key: CB-8032 URL: https://issues.apache.org/jira/browse/CB-8032 Project: Apache Cordova Issue Type: Sub-task Components: Plugin Camera, Plugin Contacts, Plugin File, Plugin File Transfer, Plugin Media, Plugin Media Capture Environment: iOS Reporter: Shazron Abdullah Right now in CDVFileSystem-makeEntryForPath:isDirectory:, in the NSDictionary that is returned, for the key nativeURL the format is fixed (file:// protocol for a local filesystem reference, and assets-library:/ for a assets library filesystem reference.) When calculating the nativeURL, allow this to be specified externally, check for a selector nativeURL and call that if available. This is for example declared in a Category in this plugin: https://github.com/apache/cordova-plugins/blob/5d8ef21dcbde1f99d60e1b52ae3a3800e4c185d9/local-webserver/src/ios/CDVLocalFileSystem%2BNativeURL.m ... which when linked will have the selector available for the File plugin to call. This code is part of the local webserver plugin - and it needs the File references to be proxied through a local webserver. For example if the FileEntry is to: file://my/package/folder/Documents/foo.txt .. the nativeURL would be, with this new category method, and the local webserver listening to http://localhost:8080: http://localhost:8080/local-filesystem/my/package/folder/Documents/foo.txt -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-8032) Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory:
[ https://issues.apache.org/jira/browse/CB-8032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14221137#comment-14221137 ] Tony Homer commented on CB-8032: Instead of making the plugins fix their own urls, could the delegate be something that LocalWebServer plugin could use to provide a url fixer? LocalWebServer plugin (or another plugin that needs to fix responses in some way) would set itself as the delegate. commandDelegate would call the delegate method from sendPluginResult - it could either (1) send over the plugin result or (2) send over the js response. In the case of (1) the delegate would inspect the plugin result's message and if needed, make a copy of the plugin to fix the message and return the copy or the original. In the case of (2) the delegate would inspect the js response, fix it as needed, then return the response. Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory: -- Key: CB-8032 URL: https://issues.apache.org/jira/browse/CB-8032 Project: Apache Cordova Issue Type: Improvement Components: Plugin Camera, Plugin Contacts, Plugin File, Plugin File Transfer, Plugin Media, Plugin Media Capture Environment: iOS Reporter: Shazron Abdullah Right now in CDVFileSystem-makeEntryForPath:isDirectory:, in the NSDictionary that is returned, for the key nativeURL the format is fixed (file:// protocol for a local filesystem reference, and assets-library:/ for a assets library filesystem reference.) When calculating the nativeURL, allow this to be specified externally, check for a selector nativeURL and call that if available. This is for example declared in a Category in this plugin: https://github.com/apache/cordova-plugins/blob/5d8ef21dcbde1f99d60e1b52ae3a3800e4c185d9/local-webserver/src/ios/CDVLocalFileSystem%2BNativeURL.m ... which when linked will have the selector available for the File plugin to call. This code is part of the local webserver plugin - and it needs the File references to be proxied through a local webserver. For example if the FileEntry is to: file://my/package/folder/Documents/foo.txt .. the nativeURL would be, with this new category method, and the local webserver listening to http://localhost:8080: http://localhost:8080/local-filesystem/my/package/folder/Documents/foo.txt -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-8032) Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory:
[ https://issues.apache.org/jira/browse/CB-8032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14221194#comment-14221194 ] Tony Homer commented on CB-8032: I submitted a pull request to illustrate the above. Please let me know if this was the wrong way to pursue this discussion. I'm new to open source contribution, so if I'm doing it wrong I need to know! Also let me know if you just want me to drop this line of inquiry :) Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory: -- Key: CB-8032 URL: https://issues.apache.org/jira/browse/CB-8032 Project: Apache Cordova Issue Type: Improvement Components: Plugin Camera, Plugin Contacts, Plugin File, Plugin File Transfer, Plugin Media, Plugin Media Capture Environment: iOS Reporter: Shazron Abdullah Right now in CDVFileSystem-makeEntryForPath:isDirectory:, in the NSDictionary that is returned, for the key nativeURL the format is fixed (file:// protocol for a local filesystem reference, and assets-library:/ for a assets library filesystem reference.) When calculating the nativeURL, allow this to be specified externally, check for a selector nativeURL and call that if available. This is for example declared in a Category in this plugin: https://github.com/apache/cordova-plugins/blob/5d8ef21dcbde1f99d60e1b52ae3a3800e4c185d9/local-webserver/src/ios/CDVLocalFileSystem%2BNativeURL.m ... which when linked will have the selector available for the File plugin to call. This code is part of the local webserver plugin - and it needs the File references to be proxied through a local webserver. For example if the FileEntry is to: file://my/package/folder/Documents/foo.txt .. the nativeURL would be, with this new category method, and the local webserver listening to http://localhost:8080: http://localhost:8080/local-filesystem/my/package/folder/Documents/foo.txt -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-8032) Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory:
[ https://issues.apache.org/jira/browse/CB-8032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14221400#comment-14221400 ] Shazron Abdullah commented on CB-8032: -- I get what you are trying to do, it's like the NSURLProtocol method but the LocalWebServer is delegated instead to process all CDVPluginResult messages and transform any urls. It's an interesting concept, let's see what others think about it. Your solution seems the least intrusive, and most compatible for plugins. Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory: -- Key: CB-8032 URL: https://issues.apache.org/jira/browse/CB-8032 Project: Apache Cordova Issue Type: Improvement Components: Plugin Camera, Plugin Contacts, Plugin File, Plugin File Transfer, Plugin Media, Plugin Media Capture Environment: iOS Reporter: Shazron Abdullah Right now in CDVFileSystem-makeEntryForPath:isDirectory:, in the NSDictionary that is returned, for the key nativeURL the format is fixed (file:// protocol for a local filesystem reference, and assets-library:/ for a assets library filesystem reference.) When calculating the nativeURL, allow this to be specified externally, check for a selector nativeURL and call that if available. This is for example declared in a Category in this plugin: https://github.com/apache/cordova-plugins/blob/5d8ef21dcbde1f99d60e1b52ae3a3800e4c185d9/local-webserver/src/ios/CDVLocalFileSystem%2BNativeURL.m ... which when linked will have the selector available for the File plugin to call. This code is part of the local webserver plugin - and it needs the File references to be proxied through a local webserver. For example if the FileEntry is to: file://my/package/folder/Documents/foo.txt .. the nativeURL would be, with this new category method, and the local webserver listening to http://localhost:8080: http://localhost:8080/local-filesystem/my/package/folder/Documents/foo.txt -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-8032) Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory:
[ https://issues.apache.org/jira/browse/CB-8032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14220028#comment-14220028 ] ASF GitHub Bot commented on CB-8032: Github user shazron closed the pull request at: https://github.com/apache/cordova-plugin-file/pull/91 Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory: -- Key: CB-8032 URL: https://issues.apache.org/jira/browse/CB-8032 Project: Apache Cordova Issue Type: Improvement Components: Plugin File Environment: iOS Reporter: Shazron Abdullah Right now in CDVFileSystem-makeEntryForPath:isDirectory:, in the NSDictionary that is returned, for the key nativeURL the format is fixed (file:// protocol for a local filesystem reference, and assets-library:/ for a assets library filesystem reference.) When calculating the nativeURL, allow this to be specified externally, check for a selector nativeURL and call that if available. This is for example declared in a Category in this plugin: https://github.com/apache/cordova-plugins/blob/5d8ef21dcbde1f99d60e1b52ae3a3800e4c185d9/local-webserver/src/ios/CDVLocalFileSystem%2BNativeURL.m ... which when linked will have the selector available for the File plugin to call. This code is part of the local webserver plugin - and it needs the File references to be proxied through a local webserver. For example if the FileEntry is to: file://my/package/folder/Documents/foo.txt .. the nativeURL would be, with this new category method, and the local webserver listening to http://localhost:8080: http://localhost:8080/local-filesystem/my/package/folder/Documents/foo.txt -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-8032) Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory:
[ https://issues.apache.org/jira/browse/CB-8032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14220027#comment-14220027 ] ASF GitHub Bot commented on CB-8032: Github user shazron commented on the pull request: https://github.com/apache/cordova-plugin-file/pull/91#issuecomment-63882483 Closing. I no longer think this is a good approach. Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory: -- Key: CB-8032 URL: https://issues.apache.org/jira/browse/CB-8032 Project: Apache Cordova Issue Type: Improvement Components: Plugin File Environment: iOS Reporter: Shazron Abdullah Right now in CDVFileSystem-makeEntryForPath:isDirectory:, in the NSDictionary that is returned, for the key nativeURL the format is fixed (file:// protocol for a local filesystem reference, and assets-library:/ for a assets library filesystem reference.) When calculating the nativeURL, allow this to be specified externally, check for a selector nativeURL and call that if available. This is for example declared in a Category in this plugin: https://github.com/apache/cordova-plugins/blob/5d8ef21dcbde1f99d60e1b52ae3a3800e4c185d9/local-webserver/src/ios/CDVLocalFileSystem%2BNativeURL.m ... which when linked will have the selector available for the File plugin to call. This code is part of the local webserver plugin - and it needs the File references to be proxied through a local webserver. For example if the FileEntry is to: file://my/package/folder/Documents/foo.txt .. the nativeURL would be, with this new category method, and the local webserver listening to http://localhost:8080: http://localhost:8080/local-filesystem/my/package/folder/Documents/foo.txt -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-8032) Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory:
[ https://issues.apache.org/jira/browse/CB-8032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14220041#comment-14220041 ] Shazron Abdullah commented on CB-8032: -- Submitting a PR for review with a revised approach soon, for discussion. Also, from my research, there are additional core plugins that require URL transformations, for a total of 6: * cordova-plugin-camera * cordova-plugin-file * cordova-plugin-file-transfer * cordova-plugin-media * cordova-plugin-media-capture * cordova-plugin-contacts There are also potentially third-party plugins that require those URL transformations as well, and we need to come up with a general purpose solution. There is no way the LocalWebServer can know about all plugins so it can set a delegate on each. So the alternative is that for each plugin that returns a file URL needs to call a delegate to transform their URLs. This delegate has to be in a common location, either in CDVViewController or the commandDelegate. I'm leaning towards the commandDelegate. This approach however requires all plugins to be updated to support this new approach. It can be non-intrusive -- the plugin will check for the selector being available, and if it is call it to transform their URL (demonstrated in the closed PR above). Ideally we could use NSURLProtocol to intercept any requests and transform them (as suggested by Tony Homer), but NSURLProtocol does not work with WKWebView. Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory: -- Key: CB-8032 URL: https://issues.apache.org/jira/browse/CB-8032 Project: Apache Cordova Issue Type: Improvement Components: Plugin File Environment: iOS Reporter: Shazron Abdullah Right now in CDVFileSystem-makeEntryForPath:isDirectory:, in the NSDictionary that is returned, for the key nativeURL the format is fixed (file:// protocol for a local filesystem reference, and assets-library:/ for a assets library filesystem reference.) When calculating the nativeURL, allow this to be specified externally, check for a selector nativeURL and call that if available. This is for example declared in a Category in this plugin: https://github.com/apache/cordova-plugins/blob/5d8ef21dcbde1f99d60e1b52ae3a3800e4c185d9/local-webserver/src/ios/CDVLocalFileSystem%2BNativeURL.m ... which when linked will have the selector available for the File plugin to call. This code is part of the local webserver plugin - and it needs the File references to be proxied through a local webserver. For example if the FileEntry is to: file://my/package/folder/Documents/foo.txt .. the nativeURL would be, with this new category method, and the local webserver listening to http://localhost:8080: http://localhost:8080/local-filesystem/my/package/folder/Documents/foo.txt -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-8032) Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory:
[ https://issues.apache.org/jira/browse/CB-8032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14216291#comment-14216291 ] Ian Clelland commented on CB-8032: -- Is a category the best way to do this? I'm normally all for categories, but it seems like a code smell if we have to add explicit support for them in the base class. At the very least, it means that only one plugin like this can be added to any given project, so that there is no name collision. It also might be problematic if there are two webviews in an application, if *all* CDVFile objects are overridden. It may very well be that this is the best solution. I'm just wondering if there are other options that would also work: subclassing CDVLocalFileSystem, or providing a new filesystem class in addition to, or in place of the existing ones, or having CDVFileSystem plugin ask the webview it's registered with what to do, for instance. Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory: -- Key: CB-8032 URL: https://issues.apache.org/jira/browse/CB-8032 Project: Apache Cordova Issue Type: Improvement Components: Plugin File Environment: iOS Reporter: Shazron Abdullah Right now in CDVFileSystem-makeEntryForPath:isDirectory:, in the NSDictionary that is returned, for the key nativeURL the format is fixed (file:// protocol for a local filesystem reference, and assets-library:/ for a assets library filesystem reference.) When calculating the nativeURL, allow this to be specified externally, check for a selector nativeURL and call that if available. This is for example declared in a Category in this plugin: https://github.com/apache/cordova-plugins/blob/5d8ef21dcbde1f99d60e1b52ae3a3800e4c185d9/local-webserver/src/ios/CDVLocalFileSystem%2BNativeURL.m ... which when linked will have the selector available for the File plugin to call. This code is part of the local webserver plugin - and it needs the File references to be proxied through a local webserver. For example if the FileEntry is to: file://my/package/folder/Documents/foo.txt .. the nativeURL would be, with this new category method, and the local webserver listening to http://localhost:8080: http://localhost:8080/local-filesystem/my/package/folder/Documents/foo.txt -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-8032) Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory:
[ https://issues.apache.org/jira/browse/CB-8032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14216403#comment-14216403 ] Shazron Abdullah commented on CB-8032: -- It's definitely not the best way to do this. Initially my goal was not to tightly couple it with CDVFileSystem, but I think we may have to to avoid the two webviews in an application scenario. I'm thinking of adding a delegate to CDVFileSystem -- not sure what to call it yet -- but one of the methods in the delegate would be nativeURL: The plugin can set this delegate by grabbing the current File plugin, enumerate all filesystems, and the CDVFileSystem class can call it at the appropriate time. Add nativeURL external method support for CDVFileSystem-makeEntryForPath:isDirectory: -- Key: CB-8032 URL: https://issues.apache.org/jira/browse/CB-8032 Project: Apache Cordova Issue Type: Improvement Components: Plugin File Environment: iOS Reporter: Shazron Abdullah Right now in CDVFileSystem-makeEntryForPath:isDirectory:, in the NSDictionary that is returned, for the key nativeURL the format is fixed (file:// protocol for a local filesystem reference, and assets-library:/ for a assets library filesystem reference.) When calculating the nativeURL, allow this to be specified externally, check for a selector nativeURL and call that if available. This is for example declared in a Category in this plugin: https://github.com/apache/cordova-plugins/blob/5d8ef21dcbde1f99d60e1b52ae3a3800e4c185d9/local-webserver/src/ios/CDVLocalFileSystem%2BNativeURL.m ... which when linked will have the selector available for the File plugin to call. This code is part of the local webserver plugin - and it needs the File references to be proxied through a local webserver. For example if the FileEntry is to: file://my/package/folder/Documents/foo.txt .. the nativeURL would be, with this new category method, and the local webserver listening to http://localhost:8080: http://localhost:8080/local-filesystem/my/package/folder/Documents/foo.txt -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org