[jira] [Commented] (CB-8521) 'cordova plugin save' should save all installed plugins and their version/git-url/folder-location into config.xml
[ https://issues.apache.org/jira/browse/CB-8521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14358281#comment-14358281 ] ASF GitHub Bot commented on CB-8521: Github user vladimir-kotikov commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/178#discussion_r26284597 --- Diff: cordova-lib/src/cordova/plugin.js --- @@ -234,7 +239,6 @@ module.exports = function plugin(command, targets, opts) { if (!targets || !targets.length) { return Q.reject(new CordovaError('No plugin specified. Please specify a plugin to remove. See `'+cordova_util.binname+' plugin list`.')); } - --- End diff -- Unnecessary change 'cordova plugin save' should save all installed plugins and their version/git-url/folder-location into config.xml - Key: CB-8521 URL: https://issues.apache.org/jira/browse/CB-8521 Project: Apache Cordova Issue Type: New Feature Reporter: Omar Mefire Assignee: Omar Mefire In addition to using 'cordova plugin add org.apache.cordova.device --save' to both add and save a plugin to config.xml, It would be useful to have a way to 'mass save' already installed plugins to config.xml. -- 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-8521) 'cordova plugin save' should save all installed plugins and their version/git-url/folder-location into config.xml
[ https://issues.apache.org/jira/browse/CB-8521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14358285#comment-14358285 ] ASF GitHub Bot commented on CB-8521: Github user vladimir-kotikov commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/178#discussion_r26284609 --- Diff: cordova-lib/src/plugman/fetch.js --- @@ -144,7 +144,10 @@ function fetchPlugin(plugin_src, plugins_dir, options) { }); }).then(function(result){ checkID(options.expected_id, result.pinfo); -metadata.save_fetch_metadata(plugins_dir, result.pinfo.id, { source: result.fetchJsonSource }); +var data = { source: result.fetchJsonSource }; +data.is_top_level = options.is_top_level; --- End diff -- IMHO it's better to use an object literal here instead of assigning properties. ```javascript var data = { source: result.fetchJsonSource, is_top_level: options.is_top_level, variables: options.variables || {} }; ``` 'cordova plugin save' should save all installed plugins and their version/git-url/folder-location into config.xml - Key: CB-8521 URL: https://issues.apache.org/jira/browse/CB-8521 Project: Apache Cordova Issue Type: New Feature Reporter: Omar Mefire Assignee: Omar Mefire In addition to using 'cordova plugin add org.apache.cordova.device --save' to both add and save a plugin to config.xml, It would be useful to have a way to 'mass save' already installed plugins to config.xml. -- 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-8521) 'cordova plugin save' should save all installed plugins and their version/git-url/folder-location into config.xml
[ https://issues.apache.org/jira/browse/CB-8521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14358287#comment-14358287 ] ASF GitHub Bot commented on CB-8521: Github user vladimir-kotikov commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/178#discussion_r26284638 --- Diff: cordova-lib/src/plugman/util/metadata.js --- @@ -59,3 +59,10 @@ exports.save_fetch_metadata = function(pluginsDir, pluginId, data) { fs.writeFileSync(fetchJsonPath, JSON.stringify(metadataJson, null, 4), 'utf-8'); }; +exports.remove_plugin = function(pluginsDir, pluginId){ --- End diff -- IMHO it's better to rename this similar to other methods in this file (`remove_fetch_metadata` for example) 'cordova plugin save' should save all installed plugins and their version/git-url/folder-location into config.xml - Key: CB-8521 URL: https://issues.apache.org/jira/browse/CB-8521 Project: Apache Cordova Issue Type: New Feature Reporter: Omar Mefire Assignee: Omar Mefire In addition to using 'cordova plugin add org.apache.cordova.device --save' to both add and save a plugin to config.xml, It would be useful to have a way to 'mass save' already installed plugins to config.xml. -- 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-8636) ConfigParser.getFeature() returns invalid variables
[ https://issues.apache.org/jira/browse/CB-8636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14355685#comment-14355685 ] ASF GitHub Bot commented on CB-8636: Github user nikhilkh commented on the pull request: https://github.com/apache/cordova-lib/pull/181#issuecomment-78145771 Please close this PR if #182 supersedes this. ConfigParser.getFeature() returns invalid variables --- Key: CB-8636 URL: https://issues.apache.org/jira/browse/CB-8636 Project: Apache Cordova Issue Type: Bug Reporter: Omar Mefire Assignee: Omar Mefire Priority: Minor Calling ConfigParser.getFeature() returns not only the variables defined in config.xml, but also the id, version, installPath and url elements. -- 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-8595) Merge platform specific code into one place
[ https://issues.apache.org/jira/browse/CB-8595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14356917#comment-14356917 ] ASF GitHub Bot commented on CB-8595: Github user kamrik commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/183#discussion_r26215186 --- Diff: cordova-lib/src/platforms/platforms.js --- @@ -0,0 +1,102 @@ +/** +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +License); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +*/ + +var platforms = require('./platformsConfig.json'); + +// Remove this block soon. The parser property is no longer used in +// cordova-lib but some downstream tools still use it. +var addModuleProperty = require('../cordova/util').addModuleProperty; +Object.keys(platforms).forEach(function(key) { +var obj = platforms[key]; +if (obj.parser_file) { +addModuleProperty(module, 'parser', obj.parser_file, false, obj); +} +}); + + +// Avoid loading the same platform projects more than once (identified by path) +var cachedProjects = {}; + +var PARSER_PUBLIC_METHODS = [ +'config_xml', +'cordovajs_path', +'update_from_config', +'update_overrides', +'update_project', +'update_www', +'www_dir', +]; + +var HANDLER_PUBLIC_METHODS = [ +'package_name', +'parseProjectFile', +'purgeProjectFileCache', +]; + + +// A single class that exposes functionality from platform specific files from +// both places cordova/metadata and plugman/platforms. Hopefully, to be soon +// replaced by real unified platform specific classes. +function PlatformProjectAdapter(platform, platformRootDir) { +var self = this; +self.root = platformRootDir; +self.platform = platform; +var ParserConstructor = require(platforms[platform].parser_file); +self.parser = new ParserConstructor(platformRootDir); +self.handler = require(platforms[platform].handler_file); + +// Expos all public methods from the parser and handler, properly bound. +PARSER_PUBLIC_METHODS.forEach(function(method) { +if (self.parser[method]) { --- End diff -- Added the if because windows parser doesn't have update_overrides() but apparently update_overrides() is only used internally inside the parsers so I'll remove it from PARSER_PUBLIC_METHODS and remove the if so it will throw if no method is found. Merge platform specific code into one place --- Key: CB-8595 URL: https://issues.apache.org/jira/browse/CB-8595 Project: Apache Cordova Issue Type: Improvement Reporter: Mark Koudritsky Assignee: Mark Koudritsky Currently we have two separate places for platform specific code src/cordova/metadata src/plugman/platforms This is confusing. Once consolidated the platform specific code will be much easier to move to the platform repos where it belongs. -- 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-8595) Merge platform specific code into one place
[ https://issues.apache.org/jira/browse/CB-8595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14356976#comment-14356976 ] ASF GitHub Bot commented on CB-8595: Github user kamrik commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/183#discussion_r26218471 --- Diff: cordova-lib/src/plugman/uninstall.js --- @@ -293,58 +293,25 @@ function runUninstallPlatform(actions, platform, project_dir, plugin_dir, plugin function handleUninstall(actions, platform, pluginInfo, project_dir, www_dir, plugins_dir, is_top_level, options) { var plugin_id = pluginInfo.id; var plugin_dir = pluginInfo.dir; -var platform_modules = require('./platforms'); -var handler = platform_modules[platform]; -www_dir = www_dir || handler.www_dir(project_dir); +var handler = platform_modules.getPlatformProject(platform, project_dir); +www_dir = www_dir || handler.www_dir(); events.emit('log', 'Uninstalling ' + plugin_id + ' from ' + platform); +var pluginItems = pluginInfo.getFilesAndFrameworks(platform); var assets = pluginInfo.getAssets(platform); --- End diff -- Assets are not copied during installation, only during prepare (because www dir is blown on prepare). It wouldn't harm to copy them here as well, just some duplication, but they are also currently dealt with by directly calling common.asset.install(), not from the handlers with a slightly different function signature, so I left it as is for now. Merge platform specific code into one place --- Key: CB-8595 URL: https://issues.apache.org/jira/browse/CB-8595 Project: Apache Cordova Issue Type: Improvement Reporter: Mark Koudritsky Assignee: Mark Koudritsky Currently we have two separate places for platform specific code src/cordova/metadata src/plugman/platforms This is confusing. Once consolidated the platform specific code will be much easier to move to the platform repos where it belongs. -- 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-8595) Merge platform specific code into one place
[ https://issues.apache.org/jira/browse/CB-8595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14356894#comment-14356894 ] ASF GitHub Bot commented on CB-8595: Github user mmocny commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/183#discussion_r26214063 --- Diff: cordova-lib/src/platforms/platforms.js --- @@ -0,0 +1,102 @@ +/** +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +License); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +*/ + +var platforms = require('./platformsConfig.json'); + +// Remove this block soon. The parser property is no longer used in +// cordova-lib but some downstream tools still use it. +var addModuleProperty = require('../cordova/util').addModuleProperty; +Object.keys(platforms).forEach(function(key) { +var obj = platforms[key]; +if (obj.parser_file) { +addModuleProperty(module, 'parser', obj.parser_file, false, obj); +} +}); + + +// Avoid loading the same platform projects more than once (identified by path) +var cachedProjects = {}; + +var PARSER_PUBLIC_METHODS = [ +'config_xml', +'cordovajs_path', +'update_from_config', +'update_overrides', +'update_project', +'update_www', +'www_dir', +]; + +var HANDLER_PUBLIC_METHODS = [ +'package_name', +'parseProjectFile', +'purgeProjectFileCache', +]; + + +// A single class that exposes functionality from platform specific files from +// both places cordova/metadata and plugman/platforms. Hopefully, to be soon +// replaced by real unified platform specific classes. +function PlatformProjectAdapter(platform, platformRootDir) { +var self = this; +self.root = platformRootDir; +self.platform = platform; +var ParserConstructor = require(platforms[platform].parser_file); +self.parser = new ParserConstructor(platformRootDir); +self.handler = require(platforms[platform].handler_file); + +// Expos all public methods from the parser and handler, properly bound. +PARSER_PUBLIC_METHODS.forEach(function(method) { +if (self.parser[method]) { +self[method] = self.parser[method].bind(self.parser); +} +}); + +HANDLER_PUBLIC_METHODS.forEach(function(method) { +if (self.handler[method]) { --- End diff -- ditto. Merge platform specific code into one place --- Key: CB-8595 URL: https://issues.apache.org/jira/browse/CB-8595 Project: Apache Cordova Issue Type: Improvement Reporter: Mark Koudritsky Assignee: Mark Koudritsky Currently we have two separate places for platform specific code src/cordova/metadata src/plugman/platforms This is confusing. Once consolidated the platform specific code will be much easier to move to the platform repos where it belongs. -- 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-8596) cordova-lib API for retrieval of platforms and plugins from config.xml
[ https://issues.apache.org/jira/browse/CB-8596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14355389#comment-14355389 ] ASF GitHub Bot commented on CB-8596: Github user nikhilkh commented on the pull request: https://github.com/apache/cordova-lib/pull/177#issuecomment-78115338 I noticed that the plugin metadata that is exposed is the id and version number. What if the source is a git URL - how is that exposed? cordova-lib API for retrieval of platforms and plugins from config.xml --- Key: CB-8596 URL: https://issues.apache.org/jira/browse/CB-8596 Project: Apache Cordova Issue Type: New Feature Reporter: Omar Mefire Assignee: Omar Mefire IDE's and other apps using cordova's APIs need a way to access project's metadata (platforms and plugins within config.xml) without going directly through the ConfigParser. They should be abstracted away from the storage details. This modification is made even more important with the upcoming move to npm that is going to necessitate moving platforms and plugins infos to package.json. -- 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-8641) (Windows Phone 8.1) Some file-transfer plugin tests occasionally fail in mobilespec
[ https://issues.apache.org/jira/browse/CB-8641?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14355464#comment-14355464 ] ASF GitHub Bot commented on CB-8641: Github user nikhilkh commented on a diff in the pull request: https://github.com/apache/cordova-plugin-file-transfer/pull/69#discussion_r26153526 --- Diff: tests/tests.js --- @@ -305,7 +306,17 @@ exports.defineAutoTests = function () { // - 'http://example.com' // - 'apache.org', with subdomains=true // - 'cordova-filetransfer.jitsu.com' -describe('download', function() { +describe('download', function () { +var originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL; + +beforeEach(function () { +// Download tests need a larger time interval to run successfully +jasmine.DEFAULT_TIMEOUT_INTERVAL = 1; --- End diff -- We've switched to moving Jasmine 2.2 which provides a nice syntax for modifying default timeout duration: http://jasmine.github.io/2.2/introduction.html#section-51 (Windows Phone 8.1) Some file-transfer plugin tests occasionally fail in mobilespec --- Key: CB-8641 URL: https://issues.apache.org/jira/browse/CB-8641 Project: Apache Cordova Issue Type: Bug Components: Plugin File Transfer Reporter: Alexander Sorokin Priority: Minor Some file-transfer plugin tests occasionally fail in mobilespec: File-transfer.spec.10 download should be stopped by abort() right away File-transfer.spec.21 upload should be stopped by abort() right away The issue seems to be caused by insufficient timeout and could be fixed by increasing it. -- 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-8521) 'cordova plugin save' should save all installed plugins and their version/git-url/folder-location into config.xml
[ https://issues.apache.org/jira/browse/CB-8521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14358283#comment-14358283 ] ASF GitHub Bot commented on CB-8521: Github user vladimir-kotikov commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/178#discussion_r26284601 --- Diff: cordova-lib/src/cordova/plugin.js --- @@ -278,9 +283,16 @@ module.exports = function plugin(command, targets, opts) { events.emit('results', 'config.xml entry for ' +target+ ' is removed'); } } +}) +.then(function(){ +// Remove plugin from fetch.json +events.emit('verbose', 'Removing plugin ' + target + ' from fetch.json'); +var pluginsDir = path.join(projectRoot, 'plugins'); +metadata.remove_plugin(pluginsDir, target); }); }, Q()); -}).then(function() { +}) +.then(function() { --- End diff -- Unnecessary change 'cordova plugin save' should save all installed plugins and their version/git-url/folder-location into config.xml - Key: CB-8521 URL: https://issues.apache.org/jira/browse/CB-8521 Project: Apache Cordova Issue Type: New Feature Reporter: Omar Mefire Assignee: Omar Mefire In addition to using 'cordova plugin add org.apache.cordova.device --save' to both add and save a plugin to config.xml, It would be useful to have a way to 'mass save' already installed plugins to config.xml. -- 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-8521) 'cordova plugin save' should save all installed plugins and their version/git-url/folder-location into config.xml
[ https://issues.apache.org/jira/browse/CB-8521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14358282#comment-14358282 ] ASF GitHub Bot commented on CB-8521: Github user vladimir-kotikov commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/178#discussion_r26284598 --- Diff: cordova-lib/src/cordova/plugin.js --- @@ -267,7 +271,8 @@ module.exports = function plugin(command, targets, opts) { .then(function() { // TODO: Should only uninstallPlugin when no platforms have it. return plugman.raw.uninstall.uninstallPlugin(target, path.join(projectRoot, 'plugins')); -}).then(function(){ +}) +.then(function(){ --- End diff -- Unnecessary change 'cordova plugin save' should save all installed plugins and their version/git-url/folder-location into config.xml - Key: CB-8521 URL: https://issues.apache.org/jira/browse/CB-8521 Project: Apache Cordova Issue Type: New Feature Reporter: Omar Mefire Assignee: Omar Mefire In addition to using 'cordova plugin add org.apache.cordova.device --save' to both add and save a plugin to config.xml, It would be useful to have a way to 'mass save' already installed plugins to config.xml. -- 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-8521) 'cordova plugin save' should save all installed plugins and their version/git-url/folder-location into config.xml
[ https://issues.apache.org/jira/browse/CB-8521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14358284#comment-14358284 ] ASF GitHub Bot commented on CB-8521: Github user vladimir-kotikov commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/178#discussion_r26284603 --- Diff: cordova-lib/src/cordova/plugin.js --- @@ -295,14 +307,87 @@ module.exports = function plugin(command, targets, opts) { }).then(function() { return hooksRunner.fire('after_plugin_search'); }); +case 'save': +// save the versions/folders/git-urls of currently installed plugins into config.xml +return save(projectRoot, opts); default: return list(projectRoot, hooksRunner); } }; +function save(projectRoot, opts){ +var xml = cordova_util.projectConfig(projectRoot); +var cfg = new ConfigParser(xml); + +// First, remove all pre-existing plugins from config.xml +cfg.getPluginIdList().forEach(function(plugin){ +cfg.removePlugin(plugin); +}); + +// It might be the case that fetch.json file is not yet existent. +// for example: when we have never ran the command 'cordova plugin add foo' on the project +// in that case, there's nothing to do except bubble up the error +function onFileNotFoundException(err){ +return Q.reject(err.message); +} + +// Then, save top-level plugins and their sources +return Q().then(function(){ --- End diff -- Since that there is no async code in this function, IMHO it'll be better to avoid wrapping it into a promise and just return fullfilled/rejected promise. 'cordova plugin save' should save all installed plugins and their version/git-url/folder-location into config.xml - Key: CB-8521 URL: https://issues.apache.org/jira/browse/CB-8521 Project: Apache Cordova Issue Type: New Feature Reporter: Omar Mefire Assignee: Omar Mefire In addition to using 'cordova plugin add org.apache.cordova.device --save' to both add and save a plugin to config.xml, It would be useful to have a way to 'mass save' already installed plugins to config.xml. -- 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-8595) Merge platform specific code into one place
[ https://issues.apache.org/jira/browse/CB-8595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14357068#comment-14357068 ] ASF GitHub Bot commented on CB-8595: Github user mmocny commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/183#discussion_r26224327 --- Diff: cordova-lib/src/platforms/platforms.js --- @@ -0,0 +1,102 @@ +/** +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +License); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +*/ + +var platforms = require('./platformsConfig.json'); + +// Remove this block soon. The parser property is no longer used in +// cordova-lib but some downstream tools still use it. +var addModuleProperty = require('../cordova/util').addModuleProperty; +Object.keys(platforms).forEach(function(key) { +var obj = platforms[key]; +if (obj.parser_file) { +addModuleProperty(module, 'parser', obj.parser_file, false, obj); +} +}); + + +// Avoid loading the same platform projects more than once (identified by path) +var cachedProjects = {}; + +var PARSER_PUBLIC_METHODS = [ +'config_xml', +'cordovajs_path', +'update_from_config', +'update_overrides', +'update_project', +'update_www', +'www_dir', +]; + +var HANDLER_PUBLIC_METHODS = [ +'package_name', +'parseProjectFile', +'purgeProjectFileCache', +]; + + +// A single class that exposes functionality from platform specific files from +// both places cordova/metadata and plugman/platforms. Hopefully, to be soon +// replaced by real unified platform specific classes. +function PlatformProjectAdapter(platform, platformRootDir) { +var self = this; +self.root = platformRootDir; +self.platform = platform; +var ParserConstructor = require(platforms[platform].parser_file); +self.parser = new ParserConstructor(platformRootDir); +self.handler = require(platforms[platform].handler_file); + +// Expos all public methods from the parser and handler, properly bound. +PARSER_PUBLIC_METHODS.forEach(function(method) { +if (self.parser[method]) { +self[method] = self.parser[method].bind(self.parser); +} +}); + +HANDLER_PUBLIC_METHODS.forEach(function(method) { +if (self.handler[method]) { +self[method] = self.handler[method].bind(self.handler); +} +}); + +self.getInstaller = function(type) { +return self.handler[type].install; +}; + +self.getUninstaller = function(type) { +return self.handler[type].uninstall; +}; +} + +// getPlatformProject() should be the only method of instantiating the +// PlatformProject classes for now. +function getPlatformProject(platform, platformRootDir) { +var cached = cachedProjects[platformRootDir]; +if (cached cached.platform == platform) { --- End diff -- Okay, Fair enough. On Wed, Mar 11, 2015 at 10:57 AM Mark Koudritsky notificati...@github.com wrote: In cordova-lib/src/platforms/platforms.js https://github.com/apache/cordova-lib/pull/183#discussion_r26218885: +}); + +self.getInstaller = function(type) { +return self.handler[type].install; +}; + +self.getUninstaller = function(type) { +return self.handler[type].uninstall; +}; +} + +// getPlatformProject() should be the only method of instantiating the +// PlatformProject classes for now. +function getPlatformProject(platform, platformRootDir) { +var cached = cachedProjects[platformRootDir]; +if (cached cached.platform == platform) { The tests sometimes reuse the same dir for several platforms. Added the platform check after spending a couple of hours figuring this out. Not sure if
[jira] [Created] (CB-8654) File transfer plugin on WP8 caches web credentials?
Vladimir Kotikov created CB-8654: Summary: File transfer plugin on WP8 caches web credentials? Key: CB-8654 URL: https://issues.apache.org/jira/browse/CB-8654 Project: Apache Cordova Issue Type: Improvement Components: Plugin File Transfer Reporter: Vladimir Kotikov Assignee: Vladimir Kotikov Priority: Minor On WP8 File Transfer plugin caches download requests. The results of this can be confusing sometimes, for example downloading file from secured resource second time succeeds, even credentials for request does not specified, or already changed at server side (proof: http://stackoverflow.com/questions/20804452/httpwebrequest-credentials-stored-cached-automatically ) There is already workaround, available to end-user – just pass if-Modified-Since header with current time to download method. Probably this should be noted in plugin README as a platform-specific quirk. -- 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] [Resolved] (CB-8275) Issue updating index.html at runtime
[ https://issues.apache.org/jira/browse/CB-8275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jesse MacFadyen resolved CB-8275. - Resolution: Won't Fix Windows 8.1 does not allow script injection like this for security reasons. You will need to write your application in such a way that you are not injecting 'script' tags. Issue updating index.html at runtime -- Key: CB-8275 URL: https://issues.apache.org/jira/browse/CB-8275 Project: Apache Cordova Issue Type: Bug Components: WP8 Affects Versions: 3.5.0 Environment: Visual Studio Community 2013 with Tools for Apache Cordova CTP3.0 Reporter: Francesco Negri Assignee: Jesse MacFadyen Priority: Critical Labels: cordova, javascript, visualstudio, wp8 We'd like to report some issues we are facing developing a Cordova app with Visual Studio Community 2013 adding new code lines in index.html file at runtime in Windows Phone 8.1. It seems that only HTML tags are correctly read and executed, instead JS (included in a script tag or directly in the element tag e.g. using onclick event) is not executed. We ran the same project on both the Android emulator and physical device and it worked perfectly. Does anybody know wether it's a compatibility issue or something else? Thank you for your attention and help. The code is: INDEX.HTML: !DOCTYPE html html head meta charset=utf-8 / titleTester/title link href=css/index.css rel=stylesheet / /head body input type=button id=test value=Prova x Emulatore wp / !-- Cordova reference, this is added to your app when it's built. -- script src=cordova.js/script script src=scripts/platformOverrides.js/script script src=scripts/jquery-2.1.1.min.js/script script id=last_script src=scripts/index.js/script /body /html INDEX.JS: (function () { use strict; document.addEventListener( 'deviceready', onDeviceReady.bind( this ), false ); var logOb; function onDeviceReady() { navigator.notification.alert('ciao'); // Handle the Cordova pause and resume events document.addEventListener( 'pause', onPause.bind( this ), false ); document.addEventListener('resume', onResume.bind(this), false); document.getElementById('test').addEventListener('click', function () { var el1 = 'input type=button id=Prova value=Ciao/', el2 = 'script type=text/javascriptdocument.getElementById(\'Prova\').addEventListener(\'click\', function(){navigator.notification.alert(\'Ciao sono il bottone\')}, false);/script'; $('#test').after(el1); $('#last_script').after(el2); }, false); // TODO: Cordova has been loaded. Perform any initialization that requires Cordova here. }; function onResume() { }; function onPause() { }; } )(); The TrialCode Team. -- 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-6667) window.requestFileSystem - callbacks are not fired in a particular circumstance
[ https://issues.apache.org/jira/browse/CB-6667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14358342#comment-14358342 ] Kelvin Dart commented on CB-6667: - Hi Kenneth, I am also having a very similar issue again. My colleague has reported it here: https://issues.apache.org/jira/browse/CB-8619. Does it sound similar to your issue? window.requestFileSystem - callbacks are not fired in a particular circumstance --- Key: CB-6667 URL: https://issues.apache.org/jira/browse/CB-6667 Project: Apache Cordova Issue Type: Bug Components: Plugin File Affects Versions: 3.4.0 Environment: Mac OS X 10.9.2 Android SDK (latest) - API v19 Eclipse 4.2.2 Reporter: Kelvin Dart Priority: Critical Labels: Android4.4.x, Cordova, androidmanifest.xml, window Excuse the essay, but I have a very odd issue that I have singled down to Cordova which happens in a very specific circumstance on Android. I have provided a project of the stock Cordova Android project which can be found here: http://www.filedropper.com/windowfstest - with a minor modification for the issue I am having. I have uploaded a compiled APK to install to your device here: http://www.filedropper.com/windowfstest140509-1404 Steps to replicate are: 1) Download and install that APK onto your device (I was using the Samsung Galaxy S4 with Android 4.4.2 running, no root, and stock TouchWiz ROM, I *hope* this occurs on other Android devices but have not had an opportunity to verify). 2) Start the application and observe an alert appears stating 'dr', then afterwards another alert appears, 'got FS' - if you check the code, you'll see this is normal from my app.initialize(). 3) Once those two alerts have appeared, press the Android 'home' button, to quit to the main Android home screen. 4) Go into another app or two and just use your phone normally. What we are trying to achieve here is for the Android memory management system to 'end'/kill the WindowFSTest app in the backend. 5) Go into Apps WindowFSTest (i.e. the app in question) and hopefully it will have restarted - the app has to have restarted for the bug to occur, and observe a few things here: a) Verify the app has restarted, this can be verified by the 'dr' popup occuring when Cordova loads. b) Once you are confident the app has been restarted, observe the initial 'dr' popup, but *not* the 'got FS' popup - this is the bug, the window.requestFileSystem does not fire the callbacks for some reason - and I do not know why. N.b. there are a few things to note here which is why the bug is tricky to replicate AND I imagine will be even more difficult to debug at a lower level ;-) 1) The Android system has to kill the app in the backend once you've pressed the 'home' button - there's no way of determining when this has happened, just use the phone like ordinary for half a minute or so - normally it kills it after a short period. 2) The way to restart the app is via Apps WindowFSTest (not via the task manager). 3) ***IMPORTANT*** the above two steps seem to occur only when you run it from a compiled APK, not directly from source/debug APK - so it's not as easy to debug since you cannot put line breaks in the Java file(s). Although not perfect, one way to fix this is to use: android:launchMode=singleTop In AndroidManifest.xml - since it ensures the app is 'resumed' instead of restarted. I can provide a video upon request illustrating the issue. -- 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-7754) [Geolocation] Support Background Location tracking
[ https://issues.apache.org/jira/browse/CB-7754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14358371#comment-14358371 ] ASF GitHub Bot commented on CB-7754: Github user sandstrom commented on the pull request: https://github.com/apache/cordova-plugin-geolocation/pull/28#issuecomment-78448058 Any existing value for `NSLocationAlwaysUsageDescription ` in the plist gets overwritten with an empty string. This makes it harder to provide a custom description (which is the purpose of the string, btw). Don't know if the plugin facility allows, but if it could handle this 'softly', e.g. only add the key to the plist unless it already exists, that would solve it. [Geolocation] Support Background Location tracking -- Key: CB-7754 URL: https://issues.apache.org/jira/browse/CB-7754 Project: Apache Cordova Issue Type: New Feature Components: Plugin Geolocation Environment: iOS Reporter: Shazron Abdullah Assignee: Shazron Abdullah Priority: Minor Add NSLocationAlwaysUsageDescription in Info.plist The reason why we don't add this by default is, not all devs need this capability, and including it by default might scare off their users. The previous plugin implementation (before iOS 8) only required foreground access, so that's why the current plugin only supports foreground access. The way to add this functionality is to add a sub-plugin in the same plugin, which only installs the required Info.plist key. -- 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] [Created] (CB-8655) The Container Android Dependencies references non existing Library 'C:\abc\platforms\android\CordovaLib\bin\mainactivity-cordovalib.jar'
Rakshith created CB-8655: Summary: The Container Android Dependencies references non existing Library 'C:\abc\platforms\android\CordovaLib\bin\mainactivity-cordovalib.jar' Key: CB-8655 URL: https://issues.apache.org/jira/browse/CB-8655 Project: Apache Cordova Issue Type: Bug Reporter: Rakshith -- 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-8641) (Windows Phone 8.1) Some file-transfer plugin tests occasionally fail in mobilespec
[ https://issues.apache.org/jira/browse/CB-8641?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14358589#comment-14358589 ] ASF GitHub Bot commented on CB-8641: Github user alsorokin closed the pull request at: https://github.com/apache/cordova-plugin-file-transfer/pull/69 (Windows Phone 8.1) Some file-transfer plugin tests occasionally fail in mobilespec --- Key: CB-8641 URL: https://issues.apache.org/jira/browse/CB-8641 Project: Apache Cordova Issue Type: Bug Components: Plugin File Transfer Reporter: Alexander Sorokin Priority: Minor Some file-transfer plugin tests occasionally fail in mobilespec: File-transfer.spec.10 download should be stopped by abort() right away File-transfer.spec.21 upload should be stopped by abort() right away The issue seems to be caused by insufficient timeout and could be fixed by increasing it. -- 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-7698) CLI: no validation for globally required plugin variables
[ https://issues.apache.org/jira/browse/CB-7698?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14359977#comment-14359977 ] ASF GitHub Bot commented on CB-7698: Github user nikhilkh commented on the pull request: https://github.com/apache/cordova-lib/pull/184#issuecomment-78815446 @vladimir-kotikov Can you please help review? CLI: no validation for globally required plugin variables - Key: CB-7698 URL: https://issues.apache.org/jira/browse/CB-7698 Project: Apache Cordova Issue Type: Bug Components: CLI Reporter: Bryan Higgins Assignee: Bryan Higgins Priority: Minor CLI should check that any globally required variables (preference at root level in plugin.xml) have been provided before calling plugman.install on the platforms. Otherwise the plugin is added to the project but plugman fails to install to any platforms. From the docs: plugman checks that these required preferences are passed in. If not, it should warn the user how to pass the variable in and exit with a non-zero code. http://cordova.apache.org/docs/en/3.6.0/plugin_ref_spec.md.html#Plugin%20Specification -- 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] [Created] (CB-8660) [cordova-plugin-whitelist, cordova-plugin-legacy-whitelist]Fix package.json error
Edna Morales created CB-8660: Summary: [cordova-plugin-whitelist, cordova-plugin-legacy-whitelist]Fix package.json error Key: CB-8660 URL: https://issues.apache.org/jira/browse/CB-8660 Project: Apache Cordova Issue Type: Bug Components: Plugins Affects Versions: Master Reporter: Edna Morales Assignee: Edna Morales Priority: Minor Fix For: Master Extra commas in the package.json file for cordova-plugin-whitelist and cordova-plugin-legacy-whitelist are causing parsing errors -- 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] [Created] (CB-8661) executeScript doesn't return the a result on Windows platform
John Little created CB-8661: --- Summary: executeScript doesn't return the a result on Windows platform Key: CB-8661 URL: https://issues.apache.org/jira/browse/CB-8661 Project: Apache Cordova Issue Type: Bug Components: Plugin InAppBrowser, Windows Environment: Windows 8 Latest version of Cordova 4.3.0 Latest version of Plugin InAppBrowser 0.6.0 Reporter: John Little executeScript is supposed to provide a variable to the function called when the script is completed as per this clip from the documentation :- If the injected script is of type code, the callback executes with a single parameter, which is the return value of the script, wrapped in an Array. For multi-line scripts, this is the return value of the last statement, or the last expression evaluated. When running as a Windows app the array is empty. Looking in the Windows InAppBrowserProxy.js file, line 230 looks like this op.oncomplete = function () { hasCallback win([]); }; So clearly no data is being passed ([]) is an empty array. According to the documentation from Microsoft :- https://msdn.microsoft.com/en-us/library/windows.ui.xaml.controls.webview.invokescriptasync.aspx The invokeScriptAsync function can return a string. So if I modify line 230 to look like this op.oncomplete = function (e) { hasCallback win([e.target.result]); }; I get a string returned to my callback function. You could also modify the similar line in the injectScriptFile function, as it also calls invokeScriptAsync. I need the return value because the only way to comunicate between the page in the IAB and the app is to poll some sessionStorage and wait for the page to set some data. -- 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] [Created] (CB-8659) iOS Plugins: Cordova-iOS 4.0.0 compatibility
Ian Clelland created CB-8659: Summary: iOS Plugins: Cordova-iOS 4.0.0 compatibility Key: CB-8659 URL: https://issues.apache.org/jira/browse/CB-8659 Project: Apache Cordova Issue Type: Bug Components: iOS, Plugin Battery Status, Plugin Camera, Plugin Contacts, Plugin Device Orientation, Plugin Dialogs, Plugin File, Plugin Geolocation, Plugin Globalization, Plugin InAppBrowser, Plugin Media, Plugin Media Capture Affects Versions: 4.0.0 Reporter: Ian Clelland Assignee: Ian Clelland iOS Plugins need to stop using initWithWebView: They also depend on several deprecated categories: - NSArray+Comparisons.h - NSDictionary+Extensions.h These need to be fixed in a backwards-compatible way before 4.0.0 is released. -- 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] [Created] (CB-8662) Latest release of Cordova breaks http via proxy
John Little created CB-8662: --- Summary: Latest release of Cordova breaks http via proxy Key: CB-8662 URL: https://issues.apache.org/jira/browse/CB-8662 Project: Apache Cordova Issue Type: Bug Components: CLI Environment: Windows Node.js 0.12.0 npm 2.5.1 Cordova 4.3.0 Reporter: John Little I work behind a squid firewall and need the HTTP_PROXY settings in the npm config to work. After upgrading cordova to version 4.3.0 any package add's or upgrades using cordova would fail with the following error :- TypeError: Request path contains unescaped characters. After a bit of searching I found this thread which sounded like my problem :- https://github.com/npm/npm/issues/4569 I followed the instructions and downloaded the latest tunnel-agent and copied the files over the ones in my nodejs install directory. It seems that the new cordova package provides an updated request module which is not compatible with the tunnel-agent. After this manual upgrade every thing works ok. -- 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] [Resolved] (CB-8660) [cordova-plugin-whitelist, cordova-plugin-legacy-whitelist]Fix package.json error
[ https://issues.apache.org/jira/browse/CB-8660?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Edna Morales resolved CB-8660. -- Resolution: Fixed [cordova-plugin-whitelist, cordova-plugin-legacy-whitelist]Fix package.json error - Key: CB-8660 URL: https://issues.apache.org/jira/browse/CB-8660 Project: Apache Cordova Issue Type: Bug Components: Plugins Affects Versions: Master Reporter: Edna Morales Assignee: Edna Morales Priority: Minor Fix For: Master Extra commas in the package.json file for cordova-plugin-whitelist and cordova-plugin-legacy-whitelist are causing parsing errors -- 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] [Resolved] (CB-8642) resolveLocalFileSystemURL copyFrom fail for content: URLs
[ https://issues.apache.org/jira/browse/CB-8642?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrew Grieve resolved CB-8642. --- Resolution: Fixed Fixed in 1.3.4-dev resolveLocalFileSystemURL copyFrom fail for content: URLs --- Key: CB-8642 URL: https://issues.apache.org/jira/browse/CB-8642 Project: Apache Cordova Issue Type: Bug Components: Android, Plugin File Reporter: Andrew Grieve Assignee: Andrew Grieve Priority: Minor Trying to do: {code} resolveLocalFileSystemURL('content://foo', function(entry) { entry.copyTo(dest, 'foo', win, fail); }); {code} And getting a whole lotta fail. -- 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] [Resolved] (CB-6428) Unable to read android_asset directory through File API
[ https://issues.apache.org/jira/browse/CB-6428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrew Grieve resolved CB-6428. --- Resolution: Fixed Assignee: Andrew Grieve (was: Ian Clelland) Fixed in 1.3.4-dev Unable to read android_asset directory through File API --- Key: CB-6428 URL: https://issues.apache.org/jira/browse/CB-6428 Project: Apache Cordova Issue Type: Bug Components: Plugin File Affects Versions: 3.3.0 Environment: Android 4.4.2 / Samsung Galaxy S4 Reporter: Matt Grande Assignee: Andrew Grieve Labels: android, file Attempting to read the 'android_asset' folder through the File API results in Error Code 5 (FileError.ENCODING_ERR). I've tried accessing via resolveLocalFileSystemURL, and by creating a directory reader and calling readEntries(). window.resolveLocalFileSystemURL('file:///android_asset/www/my_asset_folder', success, fail); var sourceDir = new DirectoryEntry( { fullPath: 'file:///android_asset/www/my_asset_folder' } ); var reader = sourceDir.createReader(); reader.readEntries(success, fail); (I have also tried with the URLs being '/android_asset/www/my_asset_folder'; same result) -- 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-8660) [cordova-plugin-whitelist, cordova-plugin-legacy-whitelist]Fix package.json error
[ https://issues.apache.org/jira/browse/CB-8660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14359052#comment-14359052 ] Edna Morales commented on CB-8660: -- https://github.com/apache/cordova-plugin-whitelist/pull/1 https://github.com/apache/cordova-plugin-legacy-whitelist/pull/1 [cordova-plugin-whitelist, cordova-plugin-legacy-whitelist]Fix package.json error - Key: CB-8660 URL: https://issues.apache.org/jira/browse/CB-8660 Project: Apache Cordova Issue Type: Bug Components: Plugins Affects Versions: Master Reporter: Edna Morales Assignee: Edna Morales Priority: Minor Fix For: Master Extra commas in the package.json file for cordova-plugin-whitelist and cordova-plugin-legacy-whitelist are causing parsing errors -- 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-8463) StatusBarPlugin Issue scrollView not found when using WKWebView
[ https://issues.apache.org/jira/browse/CB-8463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14359456#comment-14359456 ] Shazron Abdullah commented on CB-8463: -- Ouch - that's embarrassing :) Probably pre-3.0 code that we never bothered to update to pluginInitialize when 3.x rolled around. What do you mean by two-stage initialization? Are you suggesting we still keep support for initWithWebView somehow? I would think that moving to a major version that would give us latitude to break this dependency especially since it was never publicly documented. I'm not opposed to it, and it's not a hard technical problem -- we could start a discussion on the ML regarding this for sure. Inspecting how the initialization works, the initWithWebView(Engine) is called first, then pluginInitialize not soon after, so there won't be timing issues related to this (hopefully). For initWithWebViewEngine, I'm going to remove it from the public API and put it in a private header instead, so there won't be this problem in the future. StatusBarPlugin Issue scrollView not found when using WKWebView --- Key: CB-8463 URL: https://issues.apache.org/jira/browse/CB-8463 Project: Apache Cordova Issue Type: Sub-task Components: Plugin Statusbar Environment: iOS 8 Reporter: Holly Schinsky Assignee: Shazron Abdullah When using the WKWebView Plugin and the StatusBarPlugin together, the following error is received from the *CDVStatusBar.m* class: {code} CDVStatusBar.m:128:18: error: property 'scrollView' not found on object of type 'UIView *' self.webView.scrollView.scrollsToTop = NO; {code} -- 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] [Comment Edited] (CB-7606) handleOpenURL handler firing more than necessary
[ https://issues.apache.org/jira/browse/CB-7606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14359246#comment-14359246 ] Shazron Abdullah edited comment on CB-7606 at 3/12/15 8:49 PM: --- I re-tested it using cordova-cli 4.3.0 which contains cordova-ios 3.8.0, and it is working with a cold start, and warm start. Here is my updated test case. {code} cordova create CB7606 cb7606.test CB7606 cd CB7606 cordova platform add ios open -a Xcode platforms/ios {code} Add your URL handler in Resources/Info.plist (Open as - Source Code, add within the dict at the end): {code} keyCFBundleURLTypes/key array dict keyCFBundleURLName/key stringmyscheme/string keyCFBundleURLSchemes/key array stringmyscheme/string /array /dict /array {code} Add this at the top of the Staging/www/js/index.js file in Xcode Project Navigator: {code} function handleOpenURL(url) { setTimeout(function() { alert(url); }, 500); } {code} *First we test warm start:* 1. Launch the app on device using Xcode 2. Press the Home button to put the app in the background 3. In Mobile Safari, enter the url myscheme://warm in the Location bar 4. Select the Go button on the keyboard 5. Wait until the app launches, and the alert should show *Next we test cold start:* 1. Double press the Home button to show the app switcher (detach from Xcode first) 2. Kill the CB7606 app by flipping the card upwards (might not be there if you detached from Xcode, if its not there that's good) 3. In Mobile Safari, enter the url myscheme://cold in the Location bar 4. Select the Go button on the keyboard 5. Wait until the app launches, and the alert should show was (Author: shazron): I re-tested it using cordova-cli 4.3.0 which contains cordova-ios 3.8.0, and it is working with a cold start, and warm start. Here is my updated test case. {code} cordova create CB7606 cb7606.test CB7606 cd CB7606 cordova platform add ios open -a Xcode platforms/ios {code} Add your URL handler in Resources/Info.plist (Open as - Source Code, add within the dict at the end): {code} keyCFBundleURLTypes/key array dict keyCFBundleURLName/key stringmyscheme/string keyCFBundleURLSchemes/key array stringmyscheme/string /array /dict /array {code} Add this at the top of the Staging/www/js/index.js file in Xcode Project Navigator: {code} function handleOpenURL(url) { setTimeout(function() { alert(url); }, 500); } {code} *First we test warm start:* 1. Launch the app on device using Xcode 2. Press the Home button to put the app in the background 3. In Mobile Safari, enter the url myscheme://warm in the Location bar 4. Select the Go button on the keyboard 5. Wait until the app launches, and the alert should show *Next we test cold start:* 1. Double press the Home button to show the app switcher 2. Kill the CB7606 app by flipping the card upwards 3. In Mobile Safari, enter the url myscheme://cold in the Location bar 4. Select the Go button on the keyboard 5. Wait until the app launches, and the alert should show handleOpenURL handler firing more than necessary Key: CB-7606 URL: https://issues.apache.org/jira/browse/CB-7606 Project: Apache Cordova Issue Type: Bug Components: iOS Affects Versions: 3.5.0 Reporter: Paul Kane Assignee: Shazron Abdullah Fix For: 3.8.0 I'm not an Obj-C or Cordova programmer so bear with me. Let's say my app is running. Then I hop over to my mail app and click on a link (myapp://blahBlahBlah) that should open up my app. This works fine, the app opens, my own URL handler (in javascript) takes over, etc. However in Obj-C the view controller is -- incorrectly, I believe -- storing that scheme data (blahBlahBlah) in self.openURL (so that it can be picked up later in processOpenURL function, called during webView initialization). This isn't normally a problem, except when you move to a new page (window.href = /new_page), the webView initialization runs again and picks up the old (already-acted-upon) openURL variable. (it's then set to nil, so that it doesn't get acted upon a third time, fourth time, etc...). I might have some details wrong, but it should be fairly easy to walk through with a project-wide search for openurl. Just seems like a slightly wrong logic-flow, which unfortunately is interfering with my app. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CB-8664) Make CDVPlugin initializer private
[ https://issues.apache.org/jira/browse/CB-8664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14359480#comment-14359480 ] Shazron Abdullah commented on CB-8664: -- https://git1-us-west.apache.org/repos/asf?p=cordova-ios.git;a=commit;h=205a6629 Make CDVPlugin initializer private -- Key: CB-8664 URL: https://issues.apache.org/jira/browse/CB-8664 Project: Apache Cordova Issue Type: Sub-task Affects Versions: 4.0.0 Reporter: Shazron Abdullah Assignee: Shazron Abdullah Fix For: 4.0.0 Put in a CDVPlugin+Private.h file -- 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] [Created] (CB-8664) Make CDVPlugin initializer private
Shazron Abdullah created CB-8664: Summary: Make CDVPlugin initializer private Key: CB-8664 URL: https://issues.apache.org/jira/browse/CB-8664 Project: Apache Cordova Issue Type: Bug Affects Versions: 4.0.0 Reporter: Shazron Abdullah Assignee: Shazron Abdullah Fix For: 4.0.0 Put in a CDVPlugin+Private.h file -- 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-7754) [Geolocation] Support Background Location tracking
[ https://issues.apache.org/jira/browse/CB-7754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14359223#comment-14359223 ] Shazron Abdullah commented on CB-7754: -- sandstrom - I agree, this would be more of a bug/feature request for the CLI component. [Geolocation] Support Background Location tracking -- Key: CB-7754 URL: https://issues.apache.org/jira/browse/CB-7754 Project: Apache Cordova Issue Type: New Feature Components: Plugin Geolocation Environment: iOS Reporter: Shazron Abdullah Assignee: Shazron Abdullah Priority: Minor Add NSLocationAlwaysUsageDescription in Info.plist The reason why we don't add this by default is, not all devs need this capability, and including it by default might scare off their users. The previous plugin implementation (before iOS 8) only required foreground access, so that's why the current plugin only supports foreground access. The way to add this functionality is to add a sub-plugin in the same plugin, which only installs the required Info.plist key. -- 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] [Comment Edited] (CB-7606) handleOpenURL handler firing more than necessary
[ https://issues.apache.org/jira/browse/CB-7606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14359246#comment-14359246 ] Shazron Abdullah edited comment on CB-7606 at 3/12/15 7:49 PM: --- I re-tested it using cordova-cli 4.3.0 which contains cordova-ios 3.8.0, and it is working with a cold start, and warm start. Here is my updated test case. {code} cordova create CB7606 cb7606.test CB7606 cd CB7606 cordova platform add ios open -a Xcode platforms/ios {code} Add your URL handler in Resources/Info.plist (Open as - Source Code, add within the dict at the end): {code} keyCFBundleURLTypes/key array dict keyCFBundleURLName/key stringmyscheme/string keyCFBundleURLSchemes/key array stringmyscheme/string /array /dict /array {code} Add this at the top of the Staging/www/js/index.js file in Xcode Project Navigator: {code} function handleOpenURL(url) { setTimeout(function() { alert(url); }, 500); } {code} *First we test warm start:* 1. Launch the app on device using Xcode 2. Press the Home button to put the app in the background 3. In Mobile Safari, enter the url myscheme://warm in the Location bar 4. Select the Go button on the keyboard 5. Wait until the app launches, and the alert should show *Next we test cold start:* 1. Double press the Home button to show the app switcher 2. Kill the CB7606 app by flipping the card upwards 3. In Mobile Safari, enter the url myscheme://cold in the Location bar 4. Select the Go button on the keyboard 5. Wait until the app launches, and the alert should show was (Author: shazron): I re-tested it using cordova-cli 4.3.0 which contains cordova-ios 3.8.0, and it is working with a cold start, and warm start. Here is my updated test case. {code} cordova create CB7606 cb7606.test CB7606 cd CB7606 cordova platform add ios open -a Xcode platforms/ios {code} Add your URL handler in Resources/Info.plist (Open as - Source Code, add within the dict at the end): {code} keyCFBundleURLTypes/key array dict keyCFBundleURLName/key stringmyscheme/string keyCFBundleURLSchemes/key array stringmyscheme/string /array /dict /array {code} Add this at the top of the Staging/www/js/index.js file in Xcode Project Navigator: {code} function handleOpenURL(url) { setTimeout(function() { alert(url); }, 500); } {code} *First we test warm start:* 1. Launch the app on device using Xcode 2. Press the Home button to put the app in the background 3. In Mobile Safari, enter the url myscheme://warm in the Location bar 4. Select the Go button on the keyboard 5. Wait until the app launches, and the alert should show *Next we test cold start:* 1. Double press the Home button to show the app switcher 2. Kill the CB7606 app by flipping the card upwards 3. In Mobile Safari, enter the url myscheme://warm in the Location bar 4. Select the Go button on the keyboard 5. Wait until the app launches, and the alert should show handleOpenURL handler firing more than necessary Key: CB-7606 URL: https://issues.apache.org/jira/browse/CB-7606 Project: Apache Cordova Issue Type: Bug Components: iOS Affects Versions: 3.5.0 Reporter: Paul Kane Assignee: Shazron Abdullah Fix For: 3.8.0 I'm not an Obj-C or Cordova programmer so bear with me. Let's say my app is running. Then I hop over to my mail app and click on a link (myapp://blahBlahBlah) that should open up my app. This works fine, the app opens, my own URL handler (in javascript) takes over, etc. However in Obj-C the view controller is -- incorrectly, I believe -- storing that scheme data (blahBlahBlah) in self.openURL (so that it can be picked up later in processOpenURL function, called during webView initialization). This isn't normally a problem, except when you move to a new page (window.href = /new_page), the webView initialization runs again and picks up the old (already-acted-upon) openURL variable. (it's then set to nil, so that it doesn't get acted upon a third time, fourth time, etc...). I might have some details wrong, but it should be fairly easy to walk through with a project-wide search for openurl. Just seems like a slightly wrong logic-flow, which unfortunately is interfering with my app. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands,
[jira] [Created] (CB-8663) Android file plugin should not run MediaScanner for files in private storage
Andrew Grieve created CB-8663: - Summary: Android file plugin should not run MediaScanner for files in private storage Key: CB-8663 URL: https://issues.apache.org/jira/browse/CB-8663 Project: Apache Cordova Issue Type: Bug Components: Android, Plugin File Reporter: Andrew Grieve Assignee: Andrew Grieve Priority: Minor Not sure whether it's harmful or not, but it causes a logcat message for each file being scanned, and so raises an eyebrow. -- 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-7606) handleOpenURL handler firing more than necessary
[ https://issues.apache.org/jira/browse/CB-7606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14359246#comment-14359246 ] Shazron Abdullah commented on CB-7606: -- I re-tested it using cordova-cli 4.3.0 which contains cordova-ios 3.8.0, and it is working with a cold start, and warm start. Here is my updated test case. {code} cordova create CB7606 cb7606.test CB7606 cd CB7606 cordova platform add ios open -a Xcode platforms/ios {code} Add your URL handler in Resources/Info.plist (Open as - Source Code, add within the dict at the end): {code} keyCFBundleURLTypes/key array dict keyCFBundleURLName/key stringmyscheme/string keyCFBundleURLSchemes/key array stringmyscheme/string /array /dict /array {code} Add this at the top of the Staging/www/js/index.js file in Xcode Project Navigator: {code} function handleOpenURL(url) { setTimeout(function() { alert(url); }, 500); } {code} *First we test warm start:* 1. Launch the app on device using Xcode 2. Press the Home button to put the app in the background 3. In Mobile Safari, enter the url myscheme://warm in the Location bar 4. Select the Go button on the keyboard 5. Wait until the app launches, and the alert should show *Next we test cold start:* 1. Double press the Home button to show the app switcher 2. Kill the CB7606 app by flipping the card upwards 3. In Mobile Safari, enter the url myscheme://warm in the Location bar 4. Select the Go button on the keyboard 5. Wait until the app launches, and the alert should show handleOpenURL handler firing more than necessary Key: CB-7606 URL: https://issues.apache.org/jira/browse/CB-7606 Project: Apache Cordova Issue Type: Bug Components: iOS Affects Versions: 3.5.0 Reporter: Paul Kane Assignee: Shazron Abdullah Fix For: 3.8.0 I'm not an Obj-C or Cordova programmer so bear with me. Let's say my app is running. Then I hop over to my mail app and click on a link (myapp://blahBlahBlah) that should open up my app. This works fine, the app opens, my own URL handler (in javascript) takes over, etc. However in Obj-C the view controller is -- incorrectly, I believe -- storing that scheme data (blahBlahBlah) in self.openURL (so that it can be picked up later in processOpenURL function, called during webView initialization). This isn't normally a problem, except when you move to a new page (window.href = /new_page), the webView initialization runs again and picks up the old (already-acted-upon) openURL variable. (it's then set to nil, so that it doesn't get acted upon a third time, fourth time, etc...). I might have some details wrong, but it should be fairly easy to walk through with a project-wide search for openurl. Just seems like a slightly wrong logic-flow, which unfortunately is interfering with my app. -- 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] [Updated] (CB-8659) iOS Plugins: Cordova-iOS 4.0.0 compatibility
[ https://issues.apache.org/jira/browse/CB-8659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shazron Abdullah updated CB-8659: - Fix Version/s: 4.0.0 iOS Plugins: Cordova-iOS 4.0.0 compatibility Key: CB-8659 URL: https://issues.apache.org/jira/browse/CB-8659 Project: Apache Cordova Issue Type: Bug Components: iOS, Plugin Battery Status, Plugin Camera, Plugin Contacts, Plugin Device Orientation, Plugin Dialogs, Plugin File, Plugin Geolocation, Plugin Globalization, Plugin InAppBrowser, Plugin Media, Plugin Media Capture Affects Versions: 4.0.0 Reporter: Ian Clelland Assignee: Ian Clelland Fix For: 4.0.0 iOS Plugins need to stop using initWithWebView: They also depend on several deprecated categories: - NSArray+Comparisons.h - NSDictionary+Extensions.h These need to be fixed in a backwards-compatible way before 4.0.0 is released. -- 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-8463) StatusBarPlugin Issue scrollView not found when using WKWebView
[ https://issues.apache.org/jira/browse/CB-8463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14358614#comment-14358614 ] Ian Clelland commented on CB-8463: -- I didn't see that line in the docs -- thanks for pointing it out. Unfortunately, we're breaking our own rule several times :) It's not just battery-status -- apparently that was just XCode showing me one error at a time. Several of our core plugins use it: * battery-status * contacts * device-orientation * file * geolocation * globalization * inappbrowser * media-capture * network-information Two-stage initialization is probably the best way to do it in iOS, as long as it's backwards-compatible. (We ran into a very similar situation with Android, and had to do lots of reflection to get around it, because there wasn't another backwards-compatible solution) We'll just have to make sure we get those out some time before we push 4.0.0 :) StatusBarPlugin Issue scrollView not found when using WKWebView --- Key: CB-8463 URL: https://issues.apache.org/jira/browse/CB-8463 Project: Apache Cordova Issue Type: Sub-task Components: Plugin Statusbar Environment: iOS 8 Reporter: Holly Schinsky Assignee: Shazron Abdullah When using the WKWebView Plugin and the StatusBarPlugin together, the following error is received from the *CDVStatusBar.m* class: {code} CDVStatusBar.m:128:18: error: property 'scrollView' not found on object of type 'UIView *' self.webView.scrollView.scrollsToTop = NO; {code} -- 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-8556) handleOpenURL functionality to be removed to a plugin
[ https://issues.apache.org/jira/browse/CB-8556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14359650#comment-14359650 ] Shazron Abdullah commented on CB-8556: -- Tested on CDVUIWebViewEngine using steps in CB-7606 - works as expected. handleOpenURL functionality to be removed to a plugin - Key: CB-8556 URL: https://issues.apache.org/jira/browse/CB-8556 Project: Apache Cordova Issue Type: Bug Components: iOS Affects Versions: 4.0.0 Reporter: Shazron Abdullah Fix For: 4.0.0 It's already pluginized due to CB-7606 In 4.0.0, remove the plugin from core and put it in cordova-plugins. Possibility of release as a core plugin, not sure. This will include functionality to configure the callback function that is called, which is currently a global handleOpenURL function. Remove/edit the note here as well: https://github.com/apache/cordova-ios/blob/b3c26fcd598da7c84f020f5a6b9309fe638cbb5d/guides/Cordova%20Custom%20URL%20Scheme%20Handling.md -- 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-8556) handleOpenURL functionality to be removed to a plugin
[ https://issues.apache.org/jira/browse/CB-8556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14359666#comment-14359666 ] Shazron Abdullah commented on CB-8556: -- This is failing on CDVWKWebViewEngine because CDVPageDidLoadNotification is not posted once the page is loaded. {code} [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPageDidLoadNotification object:self.webView]]; {code} handleOpenURL functionality to be removed to a plugin - Key: CB-8556 URL: https://issues.apache.org/jira/browse/CB-8556 Project: Apache Cordova Issue Type: Bug Components: iOS Affects Versions: 4.0.0 Reporter: Shazron Abdullah Fix For: 4.0.0 It's already pluginized due to CB-7606 In 4.0.0, remove the plugin from core and put it in cordova-plugins. Possibility of release as a core plugin, not sure. This will include functionality to configure the callback function that is called, which is currently a global handleOpenURL function. Remove/edit the note here as well: https://github.com/apache/cordova-ios/blob/b3c26fcd598da7c84f020f5a6b9309fe638cbb5d/guides/Cordova%20Custom%20URL%20Scheme%20Handling.md -- 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] [Resolved] (CB-8663) Android file plugin should not run MediaScanner for files in private storage
[ https://issues.apache.org/jira/browse/CB-8663?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrew Grieve resolved CB-8663. --- Resolution: Fixed Fixed in 1.3.4-dev Android file plugin should not run MediaScanner for files in private storage Key: CB-8663 URL: https://issues.apache.org/jira/browse/CB-8663 Project: Apache Cordova Issue Type: Bug Components: Android, Plugin File Reporter: Andrew Grieve Assignee: Andrew Grieve Priority: Minor Not sure whether it's harmful or not, but it causes a logcat message for each file being scanned, and so raises an eyebrow. -- 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] [Comment Edited] (CB-8556) handleOpenURL functionality to be removed to a plugin
[ https://issues.apache.org/jira/browse/CB-8556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14359666#comment-14359666 ] Shazron Abdullah edited comment on CB-8556 at 3/13/15 12:15 AM: This is failing on CDVWKWebViewEngine because CDVPageDidLoadNotification is not posted once the page is loaded. {code} [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPageDidLoadNotification object:self.webView]]; {code} CDVWKWebViewEngine needs to have a navigationDelegate that implements: {code} - (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation {code} ... which then will post CDVPageDidLoadNotification was (Author: shazron): This is failing on CDVWKWebViewEngine because CDVPageDidLoadNotification is not posted once the page is loaded. {code} [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPageDidLoadNotification object:self.webView]]; {code} handleOpenURL functionality to be removed to a plugin - Key: CB-8556 URL: https://issues.apache.org/jira/browse/CB-8556 Project: Apache Cordova Issue Type: Bug Components: iOS Affects Versions: 4.0.0 Reporter: Shazron Abdullah Fix For: 4.0.0 It's already pluginized due to CB-7606 In 4.0.0, remove the plugin from core and put it in cordova-plugins. Possibility of release as a core plugin, not sure. This will include functionality to configure the callback function that is called, which is currently a global handleOpenURL function. Remove/edit the note here as well: https://github.com/apache/cordova-ios/blob/b3c26fcd598da7c84f020f5a6b9309fe638cbb5d/guides/Cordova%20Custom%20URL%20Scheme%20Handling.md -- 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] [Created] (CB-8665) Add WKNavigationDelegate to CDVWKWebViewEngine plugin
Shazron Abdullah created CB-8665: Summary: Add WKNavigationDelegate to CDVWKWebViewEngine plugin Key: CB-8665 URL: https://issues.apache.org/jira/browse/CB-8665 Project: Apache Cordova Issue Type: Task Components: iOS Affects Versions: 4.0.0 Reporter: Shazron Abdullah Fix For: 4.0.0 CDVWKWebViewEngine needs to have a navigationDelegate that implements: {code} - (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation {code} ... which then will post CDVPageDidLoadNotification: {code} [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPageDidLoadNotification object:self.webView]]; {code} -- 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] [Created] (CB-8666) Update CDVWKWebViewEngine plugin to use 4.0.x branch code
Shazron Abdullah created CB-8666: Summary: Update CDVWKWebViewEngine plugin to use 4.0.x branch code Key: CB-8666 URL: https://issues.apache.org/jira/browse/CB-8666 Project: Apache Cordova Issue Type: Task Components: iOS Affects Versions: 4.0.0 Reporter: Shazron Abdullah Fix For: 4.0.0 Currently using 4.0.x branch code does not compile: 1. Missing initWithWebView selector in CDVPlugin (File plugin) Update the README to reflect usage of 4.0.x -- 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-8659) iOS Plugins: Cordova-iOS 4.0.0 compatibility
[ https://issues.apache.org/jira/browse/CB-8659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14359681#comment-14359681 ] Shazron Abdullah commented on CB-8659: -- Ian, I'd like to update the CDVFile plugin to move all the code in initWithWebView into pluginInitialize so I can resolve this issue: CB-8666 iOS Plugins: Cordova-iOS 4.0.0 compatibility Key: CB-8659 URL: https://issues.apache.org/jira/browse/CB-8659 Project: Apache Cordova Issue Type: Bug Components: iOS, Plugin Battery Status, Plugin Camera, Plugin Contacts, Plugin Device Orientation, Plugin Dialogs, Plugin File, Plugin Geolocation, Plugin Globalization, Plugin InAppBrowser, Plugin Media, Plugin Media Capture Affects Versions: 4.0.0 Reporter: Ian Clelland Assignee: Ian Clelland Fix For: 4.0.0 iOS Plugins need to stop using initWithWebView: They also depend on several deprecated categories: - NSArray+Comparisons.h - NSDictionary+Extensions.h These need to be fixed in a backwards-compatible way before 4.0.0 is released. -- 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] [Updated] (CB-8666) Update CDVWKWebViewEngine plugin to use 4.0.x branch code
[ https://issues.apache.org/jira/browse/CB-8666?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shazron Abdullah updated CB-8666: - Description: Currently using 4.0.x branch code does not compile: 1. Missing initWithWebView selector in CDVPlugin (File plugin) 2. Missing NSDictionary+CordovaPreferences.h header Update the README to reflect usage of 4.0.x was: Currently using 4.0.x branch code does not compile: 1. Missing initWithWebView selector in CDVPlugin (File plugin) Update the README to reflect usage of 4.0.x Update CDVWKWebViewEngine plugin to use 4.0.x branch code - Key: CB-8666 URL: https://issues.apache.org/jira/browse/CB-8666 Project: Apache Cordova Issue Type: Task Components: iOS Affects Versions: 4.0.0 Reporter: Shazron Abdullah Fix For: 4.0.0 Currently using 4.0.x branch code does not compile: 1. Missing initWithWebView selector in CDVPlugin (File plugin) 2. Missing NSDictionary+CordovaPreferences.h header Update the README to reflect usage of 4.0.x -- 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-8556) handleOpenURL functionality to be removed to a plugin
[ https://issues.apache.org/jira/browse/CB-8556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14359688#comment-14359688 ] Shazron Abdullah commented on CB-8556: -- http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/2eea1392 handleOpenURL functionality to be removed to a plugin - Key: CB-8556 URL: https://issues.apache.org/jira/browse/CB-8556 Project: Apache Cordova Issue Type: Bug Components: iOS Affects Versions: 4.0.0 Reporter: Shazron Abdullah Fix For: 4.0.0 It's already pluginized due to CB-7606 In 4.0.0, remove the plugin from core and put it in cordova-plugins. Possibility of release as a core plugin, not sure. This will include functionality to configure the callback function that is called, which is currently a global handleOpenURL function. Remove/edit the note here as well: https://github.com/apache/cordova-ios/blob/b3c26fcd598da7c84f020f5a6b9309fe638cbb5d/guides/Cordova%20Custom%20URL%20Scheme%20Handling.md -- 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] [Updated] (CB-8666) Update CDVWKWebViewEngine plugin to use 4.0.x branch code
[ https://issues.apache.org/jira/browse/CB-8666?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shazron Abdullah updated CB-8666: - Description: Currently using 4.0.x branch code does not compile: 1. Missing initWithWebView selector in CDVPlugin (File plugin) 2. Missing NSDictionary+CordovaPreferences.h header (make Public) Update the README to reflect usage of 4.0.x was: Currently using 4.0.x branch code does not compile: 1. Missing initWithWebView selector in CDVPlugin (File plugin) 2. Missing NSDictionary+CordovaPreferences.h header Update the README to reflect usage of 4.0.x Update CDVWKWebViewEngine plugin to use 4.0.x branch code - Key: CB-8666 URL: https://issues.apache.org/jira/browse/CB-8666 Project: Apache Cordova Issue Type: Task Components: iOS Affects Versions: 4.0.0 Reporter: Shazron Abdullah Fix For: 4.0.0 Currently using 4.0.x branch code does not compile: 1. Missing initWithWebView selector in CDVPlugin (File plugin) 2. Missing NSDictionary+CordovaPreferences.h header (make Public) Update the README to reflect usage of 4.0.x -- 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] [Created] (CB-8667) Issues with callback results where status == NO_RESULT | 0
Jesse MacFadyen created CB-8667: --- Summary: Issues with callback results where status == NO_RESULT | 0 Key: CB-8667 URL: https://issues.apache.org/jira/browse/CB-8667 Project: Apache Cordova Issue Type: Bug Reporter: Jesse MacFadyen Due to the enumeration of cordova.callbackStatus (NO_RESULT = 0 and OK = 1), the logic used for defaulting to cordova.callbackStatus.OK will always default to cordova.callbackStatus.OK when the callbackStatus is set to cordova.callbackStatus.NO_RESULT. -- 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] [Assigned] (CB-8667) Issues with callback results where status == NO_RESULT | 0
[ https://issues.apache.org/jira/browse/CB-8667?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jesse MacFadyen reassigned CB-8667: --- Assignee: Jesse MacFadyen Issues with callback results where status == NO_RESULT | 0 -- Key: CB-8667 URL: https://issues.apache.org/jira/browse/CB-8667 Project: Apache Cordova Issue Type: Bug Reporter: Jesse MacFadyen Assignee: Jesse MacFadyen Due to the enumeration of cordova.callbackStatus (NO_RESULT = 0 and OK = 1), the logic used for defaulting to cordova.callbackStatus.OK will always default to cordova.callbackStatus.OK when the callbackStatus is set to cordova.callbackStatus.NO_RESULT. -- 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] [Updated] (CB-8667) Issues with callback results where status == NO_RESULT | 0
[ https://issues.apache.org/jira/browse/CB-8667?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jesse MacFadyen updated CB-8667: Component/s: Windows Issues with callback results where status == NO_RESULT | 0 -- Key: CB-8667 URL: https://issues.apache.org/jira/browse/CB-8667 Project: Apache Cordova Issue Type: Bug Components: Windows Reporter: Jesse MacFadyen Assignee: Jesse MacFadyen Due to the enumeration of cordova.callbackStatus (NO_RESULT = 0 and OK = 1), the logic used for defaulting to cordova.callbackStatus.OK will always default to cordova.callbackStatus.OK when the callbackStatus is set to cordova.callbackStatus.NO_RESULT. -- 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] [Resolved] (CB-8664) Make CDVPlugin initializer private
[ https://issues.apache.org/jira/browse/CB-8664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shazron Abdullah resolved CB-8664. -- Resolution: Fixed Make CDVPlugin initializer private -- Key: CB-8664 URL: https://issues.apache.org/jira/browse/CB-8664 Project: Apache Cordova Issue Type: Sub-task Affects Versions: 4.0.0 Reporter: Shazron Abdullah Assignee: Shazron Abdullah Fix For: 4.0.0 Put in a CDVPlugin+Private.h file -- 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] [Updated] (CB-8664) Make CDVPlugin initializer private
[ https://issues.apache.org/jira/browse/CB-8664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shazron Abdullah updated CB-8664: - Issue Type: Sub-task (was: Bug) Parent: CB-7991 Make CDVPlugin initializer private -- Key: CB-8664 URL: https://issues.apache.org/jira/browse/CB-8664 Project: Apache Cordova Issue Type: Sub-task Affects Versions: 4.0.0 Reporter: Shazron Abdullah Assignee: Shazron Abdullah Fix For: 4.0.0 Put in a CDVPlugin+Private.h file -- 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-8595) Merge platform specific code into one place
[ https://issues.apache.org/jira/browse/CB-8595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14359488#comment-14359488 ] ASF GitHub Bot commented on CB-8595: Github user kamrik commented on the pull request: https://github.com/apache/cordova-lib/pull/183#issuecomment-78635997 Addressed the comments and merged as a single squashed commit. Thanks for reviewing. Merge platform specific code into one place --- Key: CB-8595 URL: https://issues.apache.org/jira/browse/CB-8595 Project: Apache Cordova Issue Type: Improvement Reporter: Mark Koudritsky Assignee: Mark Koudritsky Currently we have two separate places for platform specific code src/cordova/metadata src/plugman/platforms This is confusing. Once consolidated the platform specific code will be much easier to move to the platform repos where it belongs. -- 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] [Updated] (CB-8464) Remove non-ARC code in AppDelegate
[ https://issues.apache.org/jira/browse/CB-8464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shazron Abdullah updated CB-8464: - Affects Version/s: 4.0.0 Remove non-ARC code in AppDelegate -- Key: CB-8464 URL: https://issues.apache.org/jira/browse/CB-8464 Project: Apache Cordova Issue Type: Bug Components: iOS Affects Versions: 4.0.0 Reporter: Shazron Abdullah Fix For: 4.0.0 https://github.com/apache/cordova-ios/blob/master/bin/templates/project/__PROJECT_NAME__/Classes/AppDelegate.m All new projects have ARC enabled by default. -- 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] [Updated] (CB-8473) Remove AppDelegate code from template
[ https://issues.apache.org/jira/browse/CB-8473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shazron Abdullah updated CB-8473: - Affects Version/s: 4.0.0 Remove AppDelegate code from template - Key: CB-8473 URL: https://issues.apache.org/jira/browse/CB-8473 Project: Apache Cordova Issue Type: Task Components: iOS Affects Versions: 4.0.0 Reporter: Shazron Abdullah Fix For: 4.0.0 1. Move the AppDelegate code into the CordovaLib project (e.g. CordovaAppDelegate) 2. Make the template AppDelegate class inherit from CordovaAppDelegate, and just be empty -- 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-7522) Wrong file path leads to error code 1000 due to NullPointerException on Android
[ https://issues.apache.org/jira/browse/CB-7522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14359523#comment-14359523 ] Jonathon Lamon commented on CB-7522: Ran into this issue on upgrading from Cordova 3.3. I disagree that this is not a bug. The implementation of fullPathForFilesystemPath does not make sense to ever return null. It is called if the full path starts with /. Then if the full path matches the rootURI, it removes the rootURI from the path, creating a relative URI, but if it does not, we end up with a null pointer exception. On IOS and Desktop platforms, using a path beginning with a / does not cause issues and the path is returned as absolute relative to to the sdcard/app documents. IMO, 1 of the following should occur 1. If the path provided begins with the rootURI, then only go down the path of removing it. 2. if the absolutePath provided does not begin with the rootUri, simply return the absolutePath, instead of null. 3. continue to return null, but if URLforFilesystemPath returns null, treat it as a relative path instead and call URLforFullPath. I have personally modified LcalFilesystem to do option 2, which mimics the behavior from cordova 3.3. Wrong file path leads to error code 1000 due to NullPointerException on Android --- Key: CB-7522 URL: https://issues.apache.org/jira/browse/CB-7522 Project: Apache Cordova Issue Type: Bug Components: Plugin File Affects Versions: 3.5.0 Environment: Android Reporter: Leon Priority: Minor Hi, I am using Cordova version 3.5.0-0.2.6 and version 1.3.0 of the File plugin on Ubuntu. Yesterday I got error code 1000 (corresponds to UNKNOWN_ERR as defined in android/FileUtils.java) when I tried the following JavaScript code on Samsung S2 (GT-I9100) with Android 4.1.2: {code:title=my.js|borderStyle=solid} var sFileLocation = '/Android/data/package name/assets/'; sFileLocation += filesToRemove[nFile]; fileSystem.root.getFile( sFileLocation, null, function(entry) { entry.remove( function() { console.log(file removed); }, onError); }, onGetFileError); {code} My investigation showed that the error code 1000 was caused by Java NullPointerException from implentation of the method fullPathForFilesystemPath in class *LocalFilesystem* because of the following code: {code:title=LocalFilesystem.java|borderStyle=solid} private String fullPathForFilesystemPath(String absolutePath) { if (absolutePath != null absolutePath.startsWith(this.fsRoot)) { return absolutePath.substring(this.fsRoot.length()); } return null; } {code} The specified path at JavaScript snippet starts with / but its prefix does not match the root of dir so in Android the Java method fullPathForFilesystemPath returns *null* and leads to error *1000* at the JavaScript. The +JavaScript snippet works fine+ if the path is specified using any of the following formats: *Android/data/package name/assets/* or */storage/sdcard0/Android/data/package name/assets/*. It is not exactly a bug but it is very inconvenient and not developer friendly. I did not find anything about this behaviour at the docuemntation of the plugin. It will be much better if error code such FileError.ENCODING_ERR (5) or even FileError.NOT_FOUND_ERR (1) is returned. May we modify the Java code and to update the documentation to make it more friendly for developers? Best regards, Leon -- 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] [Updated] (CB-8643) Drop iOS 6 support, minimum iOS 7
[ https://issues.apache.org/jira/browse/CB-8643?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shazron Abdullah updated CB-8643: - Fix Version/s: 4.0.0 Drop iOS 6 support, minimum iOS 7 - Key: CB-8643 URL: https://issues.apache.org/jira/browse/CB-8643 Project: Apache Cordova Issue Type: Bug Components: iOS Affects Versions: 4.0.0 Reporter: Shazron Abdullah Fix For: 4.0.0 0. https://developer.apple.com/support/appstore/ 75% of devices are using iOS 8. 22% of devices are using iOS 7. 3% of devices are using iOS 6 or earlier. Other stats with similar results: 1. https://mixpanel.com/trends/#report/ios_8/from_date:-29,report_unit:day,to_date:-1 2. http://stats.unity3d.com/mobile/os-ios.html 3. http://david-smith.org/iosversionstats/ -- 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] [Updated] (CB-7826) Add CDVPlugin support for getting items from plugin resource bundles
[ https://issues.apache.org/jira/browse/CB-7826?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shazron Abdullah updated CB-7826: - Affects Version/s: 4.0.0 Add CDVPlugin support for getting items from plugin resource bundles Key: CB-7826 URL: https://issues.apache.org/jira/browse/CB-7826 Project: Apache Cordova Issue Type: Bug Components: iOS Affects Versions: 4.0.0 Reporter: Shazron Abdullah Fix For: 4.0.0 Example: https://github.com/apache/cordova-plugin-media-capture/blob/f7d70e2e8f8354743286011f70dcd79a3292a82e/src/ios/CDVCapture.m#L34 Each plugin can have a PluginName.bundle with images, localization strings, etc and we provide an interface in CDVPlugin to grab them. Advantages: 1. Only one line in plugin.xml as a resource tag, versus N lines for N files 2. Namespacing of resources built in, no fear of resource name collision with other plugins, or the project template -- 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] [Updated] (CB-7519) Use simctl (part of Xcode 6) instead of ios-sim
[ https://issues.apache.org/jira/browse/CB-7519?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shazron Abdullah updated CB-7519: - Affects Version/s: 4.0.0 Use simctl (part of Xcode 6) instead of ios-sim --- Key: CB-7519 URL: https://issues.apache.org/jira/browse/CB-7519 Project: Apache Cordova Issue Type: Improvement Components: iOS Affects Versions: 4.0.0 Environment: Xcode 6 GM Reporter: Shazron Abdullah Fix For: 4.0.0 See: http://ericasadun.com/2014/06/18/ios-8-building-custom-simulators/ Location: `xcode-select --print-path`/usr/bin/simctl or xcrun simctl Run without args to see the help -- 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] [Updated] (CB-8474) Remove local/remote push notification delegates from CordovaAppDelegate
[ https://issues.apache.org/jira/browse/CB-8474?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shazron Abdullah updated CB-8474: - Affects Version/s: 4.0.0 Remove local/remote push notification delegates from CordovaAppDelegate --- Key: CB-8474 URL: https://issues.apache.org/jira/browse/CB-8474 Project: Apache Cordova Issue Type: Task Components: iOS Affects Versions: 4.0.0 Reporter: Shazron Abdullah Fix For: 4.0.0 They should be in a plugin, in the cordova-plugins repo, that swizzles the appropriate delegates (see CB-8475) See dependent and is depended on linked issues. -- 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-7179) [InAppBrowser][iOS 8] Update to support WKWebView
[ https://issues.apache.org/jira/browse/CB-7179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14359571#comment-14359571 ] Shazron Abdullah commented on CB-7179: -- We can punt this to later -- InAppBrowser can use UIWebView for now. [InAppBrowser][iOS 8] Update to support WKWebView - Key: CB-7179 URL: https://issues.apache.org/jira/browse/CB-7179 Project: Apache Cordova Issue Type: Sub-task Components: Plugin InAppBrowser Environment: iOS 8 Reporter: Shazron Abdullah support dual use with UIWebView -- 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-8595) Merge platform specific code into one place
[ https://issues.apache.org/jira/browse/CB-8595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14359482#comment-14359482 ] ASF GitHub Bot commented on CB-8595: Github user asfgit closed the pull request at: https://github.com/apache/cordova-lib/pull/183 Merge platform specific code into one place --- Key: CB-8595 URL: https://issues.apache.org/jira/browse/CB-8595 Project: Apache Cordova Issue Type: Improvement Reporter: Mark Koudritsky Assignee: Mark Koudritsky Currently we have two separate places for platform specific code src/cordova/metadata src/plugman/platforms This is confusing. Once consolidated the platform specific code will be much easier to move to the platform repos where it belongs. -- 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] [Updated] (CB-7991) WKWebView integration
[ https://issues.apache.org/jira/browse/CB-7991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shazron Abdullah updated CB-7991: - Affects Version/s: 4.0.0 WKWebView integration - Key: CB-7991 URL: https://issues.apache.org/jira/browse/CB-7991 Project: Apache Cordova Issue Type: Task Components: iOS Affects Versions: 4.0.0 Environment: iOS Reporter: Shazron Abdullah Assignee: Shazron Abdullah Fix For: 4.0.0 -- 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] [Updated] (CB-8556) handleOpenURL functionality to be removed to a plugin
[ https://issues.apache.org/jira/browse/CB-8556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shazron Abdullah updated CB-8556: - Affects Version/s: 4.0.0 handleOpenURL functionality to be removed to a plugin - Key: CB-8556 URL: https://issues.apache.org/jira/browse/CB-8556 Project: Apache Cordova Issue Type: Bug Components: iOS Affects Versions: 4.0.0 Reporter: Shazron Abdullah Fix For: 4.0.0 It's already pluginized due to CB-7606 In 4.0.0, remove the plugin from core and put it in cordova-plugins. Possibility of release as a core plugin, not sure. This will include functionality to configure the callback function that is called, which is currently a global handleOpenURL function. Remove/edit the note here as well: https://github.com/apache/cordova-ios/blob/b3c26fcd598da7c84f020f5a6b9309fe638cbb5d/guides/Cordova%20Custom%20URL%20Scheme%20Handling.md -- 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] [Updated] (CB-8475) Create plugin to handle local/remote push notification delegates in the app delegate
[ https://issues.apache.org/jira/browse/CB-8475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shazron Abdullah updated CB-8475: - Affects Version/s: 4.0.0 Create plugin to handle local/remote push notification delegates in the app delegate Key: CB-8475 URL: https://issues.apache.org/jira/browse/CB-8475 Project: Apache Cordova Issue Type: Task Components: iOS, Plugins Affects Versions: 4.0.0 Reporter: Shazron Abdullah Fix For: 4.0.0 These refer to the 3 delegates that were in AppDelegate.m in the template. See dependent issue. Plugin should reside in the cordova-plugins repo. -- 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] [Comment Edited] (CB-7522) Wrong file path leads to error code 1000 due to NullPointerException on Android
[ https://issues.apache.org/jira/browse/CB-7522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14359523#comment-14359523 ] Jonathon Lamon edited comment on CB-7522 at 3/12/15 10:12 PM: -- Ran into this issue on upgrading from Cordova 3.3. I disagree that this is not a bug. The implementation of fullPathForFilesystemPath does not make sense to ever return null. It is called if the full path starts with /. Then if the full path matches the rootURI, it removes the rootURI from the path, creating a relative URI, but if it does not, we end up with a null pointer exception. On IOS and Desktop platforms, using a path beginning with a / does not cause issues and the path is returned as absolute relative to to the sdcard/app documents. IMO, 1 of the following should occur 1. If the path provided begins with the rootURI, then only go down the path of removing it. 2. if the absolutePath provided does not begin with the rootUri, simply return the absolutePath, instead of null. 3. continue to return null, but if URLforFilesystemPath returns null, treat it as a relative path instead and call URLforFullPath. I have personally modified LcalFilesystem to do option 2, which mimics the behavior from cordova 3.3. {noformat} private String fullPathForFilesystemPath(String absolutePath) { if (absolutePath != null absolutePath.startsWith(rootUri.getPath())) { return absolutePath.substring(rootUri.getPath().length()); } return absolutePath; } {noformat} was (Author: jonl-percsol): Ran into this issue on upgrading from Cordova 3.3. I disagree that this is not a bug. The implementation of fullPathForFilesystemPath does not make sense to ever return null. It is called if the full path starts with /. Then if the full path matches the rootURI, it removes the rootURI from the path, creating a relative URI, but if it does not, we end up with a null pointer exception. On IOS and Desktop platforms, using a path beginning with a / does not cause issues and the path is returned as absolute relative to to the sdcard/app documents. IMO, 1 of the following should occur 1. If the path provided begins with the rootURI, then only go down the path of removing it. 2. if the absolutePath provided does not begin with the rootUri, simply return the absolutePath, instead of null. 3. continue to return null, but if URLforFilesystemPath returns null, treat it as a relative path instead and call URLforFullPath. I have personally modified LcalFilesystem to do option 2, which mimics the behavior from cordova 3.3. Wrong file path leads to error code 1000 due to NullPointerException on Android --- Key: CB-7522 URL: https://issues.apache.org/jira/browse/CB-7522 Project: Apache Cordova Issue Type: Bug Components: Plugin File Affects Versions: 3.5.0 Environment: Android Reporter: Leon Priority: Minor Hi, I am using Cordova version 3.5.0-0.2.6 and version 1.3.0 of the File plugin on Ubuntu. Yesterday I got error code 1000 (corresponds to UNKNOWN_ERR as defined in android/FileUtils.java) when I tried the following JavaScript code on Samsung S2 (GT-I9100) with Android 4.1.2: {code:title=my.js|borderStyle=solid} var sFileLocation = '/Android/data/package name/assets/'; sFileLocation += filesToRemove[nFile]; fileSystem.root.getFile( sFileLocation, null, function(entry) { entry.remove( function() { console.log(file removed); }, onError); }, onGetFileError); {code} My investigation showed that the error code 1000 was caused by Java NullPointerException from implentation of the method fullPathForFilesystemPath in class *LocalFilesystem* because of the following code: {code:title=LocalFilesystem.java|borderStyle=solid} private String fullPathForFilesystemPath(String absolutePath) { if (absolutePath != null absolutePath.startsWith(this.fsRoot)) { return absolutePath.substring(this.fsRoot.length()); } return null; } {code} The specified path at JavaScript snippet starts with / but its prefix does not match the root of dir so in Android the Java method fullPathForFilesystemPath returns *null* and leads to error *1000* at the JavaScript. The +JavaScript snippet works fine+ if the path is specified using any of the following formats: *Android/data/package name/assets/* or */storage/sdcard0/Android/data/package name/assets/*. It is not exactly a bug but it is very inconvenient and not developer friendly. I did not find anything about this behaviour at the
[jira] [Commented] (CB-8664) Make CDVPlugin initializer private
[ https://issues.apache.org/jira/browse/CB-8664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14359569#comment-14359569 ] Shazron Abdullah commented on CB-8664: -- Public vs Private vs Project http://stackoverflow.com/questions/7439192/xcode-copy-headers-public-vs-private-vs-project Make CDVPlugin initializer private -- Key: CB-8664 URL: https://issues.apache.org/jira/browse/CB-8664 Project: Apache Cordova Issue Type: Sub-task Affects Versions: 4.0.0 Reporter: Shazron Abdullah Assignee: Shazron Abdullah Fix For: 4.0.0 Put in a CDVPlugin+Private.h file -- 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] [Created] (CB-8656) The Container Android Dependencies references non existing library mainactivity_cordovalib.jar
Rakshith created CB-8656: Summary: The Container Android Dependencies references non existing library mainactivity_cordovalib.jar Key: CB-8656 URL: https://issues.apache.org/jira/browse/CB-8656 Project: Apache Cordova Issue Type: Bug Components: Android, CordovaLib Reporter: Rakshith -- 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] [Closed] (CB-8655) The Container Android Dependencies references non existing Library 'C:\abc\platforms\android\CordovaLib\bin\mainactivity-cordovalib.jar'
[ https://issues.apache.org/jira/browse/CB-8655?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rakshith closed CB-8655. Resolution: Fixed The Container Android Dependencies references non existing Library 'C:\abc\platforms\android\CordovaLib\bin\mainactivity-cordovalib.jar' Key: CB-8655 URL: https://issues.apache.org/jira/browse/CB-8655 Project: Apache Cordova Issue Type: Bug Reporter: Rakshith -- 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] [Updated] (CB-8657) app icon config declaration not working for fire os
[ https://issues.apache.org/jira/browse/CB-8657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] benny görlitz updated CB-8657: -- Description: it seems that the icon declaration is not working properly. it does not matter what i configure for plarform amazon-fireos: {code} platform name=amazon-fireos icon src=res/appicon-fireos.png / /platform {code} only the android platform setting take affect, so i'm forced to configure android like this: {code} platform name=android !-- you can use any density that exists in the Android project -- icon src=res/android/drawable-hdpi/appicon.png density=hdpi / icon src=res/android/drawable-ldpi/appicon.png density=ldpi / icon src=res/android/drawable-mdpi/appicon.png density=mdpi / !--use big icon for fireos coverflow here, platform settings currently not supported for fireos icon -- icon src=res/appicon-fireos.png density=xhdpi / icon src=res/appicon-fireos.png density=xxhdpi / icon src=res/appicon-fireos.png density=xxxhdpi / /platform {code} thats because fireos has big coverflow app icons that are very blurry with default android settings. please use android icon settings only in case of fallback when no amazon-fireos setting is existent. cheers was: it seems that the icon declaration is not working properly. it does not matter what ich configure for plarform amazon-fireos: {code} platform name=amazon-fireos icon src=res/appicon-fireos.png / /platform {code} only the android platform setting take affect, so i'm forced to configure android like this: {code} platform name=android !-- you can use any density that exists in the Android project -- icon src=res/android/drawable-hdpi/appicon.png density=hdpi / icon src=res/android/drawable-ldpi/appicon.png density=ldpi / icon src=res/android/drawable-mdpi/appicon.png density=mdpi / !--use big icon for fireos coverflow here, platform settings currently not supported for fireos icon -- icon src=res/appicon-fireos.png density=xhdpi / icon src=res/appicon-fireos.png density=xxhdpi / icon src=res/appicon-fireos.png density=xxxhdpi / /platform {code} thats because fireos has big coverflow app icons that are very blurry with default android settings. please use android icon settings only in case of fallback when no amazon-fireos setting is existent. cheers app icon config declaration not working for fire os --- Key: CB-8657 URL: https://issues.apache.org/jira/browse/CB-8657 Project: Apache Cordova Issue Type: Bug Components: Amazon FireOS Affects Versions: 3.5.0 Environment: i used newest cordova 4.3 Reporter: benny görlitz Assignee: Archana Naik Priority: Minor it seems that the icon declaration is not working properly. it does not matter what i configure for plarform amazon-fireos: {code} platform name=amazon-fireos icon src=res/appicon-fireos.png / /platform {code} only the android platform setting take affect, so i'm forced to configure android like this: {code} platform name=android !-- you can use any density that exists in the Android project -- icon src=res/android/drawable-hdpi/appicon.png density=hdpi / icon src=res/android/drawable-ldpi/appicon.png density=ldpi / icon src=res/android/drawable-mdpi/appicon.png density=mdpi / !--use big icon for fireos coverflow here, platform settings currently not supported for fireos icon -- icon src=res/appicon-fireos.png density=xhdpi / icon src=res/appicon-fireos.png density=xxhdpi / icon src=res/appicon-fireos.png density=xxxhdpi / /platform {code} thats because fireos has big coverflow app icons that are very blurry with default android settings. please use android icon settings only in case of fallback when no amazon-fireos setting is existent. cheers -- 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] [Created] (CB-8657) app icon config declaration not working for fire os
benny görlitz created CB-8657: - Summary: app icon config declaration not working for fire os Key: CB-8657 URL: https://issues.apache.org/jira/browse/CB-8657 Project: Apache Cordova Issue Type: Bug Components: Amazon FireOS Affects Versions: 3.5.0 Environment: i used newest cordova 4.3 Reporter: benny görlitz Assignee: Archana Naik Priority: Minor it seems that the icon declaration is not working properly. it does not matter what ich configure for plarform amazon-fireos: {code} platform name=amazon-fireos icon src=res/appicon-fireos.png / /platform {code} only the android platform setting take affect, so i'm forced to configure android like this: {code} platform name=android !-- you can use any density that exists in the Android project -- icon src=res/android/drawable-hdpi/appicon.png density=hdpi / icon src=res/android/drawable-ldpi/appicon.png density=ldpi / icon src=res/android/drawable-mdpi/appicon.png density=mdpi / !--use big icon for fireos coverflow here, platform settings currently not supported for fireos icon -- icon src=res/appicon-fireos.png density=xhdpi / icon src=res/appicon-fireos.png density=xxhdpi / icon src=res/appicon-fireos.png density=xxxhdpi / /platform {code} thats because fireos has big coverflow app icons that are very blurry with default android settings. please use android icon settings only in case of fallback when no amazon-fireos setting is existent. cheers -- 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] [Created] (CB-8658) Cordova camera plugin displays a black screen when the user denies access to the camera in iOS
DotNetWise created CB-8658: -- Summary: Cordova camera plugin displays a black screen when the user denies access to the camera in iOS Key: CB-8658 URL: https://issues.apache.org/jira/browse/CB-8658 Project: Apache Cordova Issue Type: Bug Components: Plugin Camera Affects Versions: 3.7.0 Environment: IOS Reporter: DotNetWise I'm making use of the cordova camera plugin in my App (which is supported only for iOS now) and the app uses both the camera and the photo library to select photos. There is an issue with how the plugin responds when ever the user denies access to the device camera. Check out the screen shot below when the user denies access to the camera: https://stackoverflow.com/questions/28427783/cordova-camera-plugin-displays-a-black-screen-when-the-user-denies-access-to-the -- 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] [Updated] (CB-8658) Cordova camera plugin displays a black screen when the user denies access to the camera in iOS
[ https://issues.apache.org/jira/browse/CB-8658?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] DotNetWise updated CB-8658: --- Attachment: screen.png Cordova camera plugin displays a black screen when the user denies access to the camera in iOS -- Key: CB-8658 URL: https://issues.apache.org/jira/browse/CB-8658 Project: Apache Cordova Issue Type: Bug Components: Plugin Camera Affects Versions: 3.7.0 Environment: IOS Reporter: DotNetWise Labels: bug, camera, cordova, plugin Attachments: screen.png I'm making use of the cordova camera plugin in my App (which is supported only for iOS now) and the app uses both the camera and the photo library to select photos. There is an issue with how the plugin responds when ever the user denies access to the device camera. Check out the screen shot below when the user denies access to the camera: https://stackoverflow.com/questions/28427783/cordova-camera-plugin-displays-a-black-screen-when-the-user-denies-access-to-the -- 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-8658) Cordova camera plugin displays a black screen when the user denies access to the camera in iOS
[ https://issues.apache.org/jira/browse/CB-8658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14358580#comment-14358580 ] DotNetWise commented on CB-8658: Although the camera is black, capturing a picture will work correctly. Happening on IOS 7.1 with the latest version of the plugin Cordova camera plugin displays a black screen when the user denies access to the camera in iOS -- Key: CB-8658 URL: https://issues.apache.org/jira/browse/CB-8658 Project: Apache Cordova Issue Type: Bug Components: Plugin Camera Affects Versions: 3.7.0 Environment: IOS Reporter: DotNetWise Labels: bug, camera, cordova, plugin Attachments: privacy.png, screen.png I'm making use of the cordova camera plugin in my App (which is supported only for iOS now) and the app uses both the camera and the photo library to select photos. There is an issue with how the plugin responds when ever the user denies access to the device camera. Check out the screen shot below when the user denies access to the camera: https://stackoverflow.com/questions/28427783/cordova-camera-plugin-displays-a-black-screen-when-the-user-denies-access-to-the -- 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] [Updated] (CB-8658) Cordova camera plugin displays a black screen when the user denies access to the camera in iOS
[ https://issues.apache.org/jira/browse/CB-8658?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] DotNetWise updated CB-8658: --- Attachment: privacy.png Cordova camera plugin displays a black screen when the user denies access to the camera in iOS -- Key: CB-8658 URL: https://issues.apache.org/jira/browse/CB-8658 Project: Apache Cordova Issue Type: Bug Components: Plugin Camera Affects Versions: 3.7.0 Environment: IOS Reporter: DotNetWise Labels: bug, camera, cordova, plugin Attachments: privacy.png, screen.png I'm making use of the cordova camera plugin in my App (which is supported only for iOS now) and the app uses both the camera and the photo library to select photos. There is an issue with how the plugin responds when ever the user denies access to the device camera. Check out the screen shot below when the user denies access to the camera: https://stackoverflow.com/questions/28427783/cordova-camera-plugin-displays-a-black-screen-when-the-user-denies-access-to-the -- 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] [Resolved] (CB-8464) Remove non-ARC code in AppDelegate
[ https://issues.apache.org/jira/browse/CB-8464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shazron Abdullah resolved CB-8464. -- Resolution: Fixed Assignee: Shazron Abdullah http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/4d60a630 Remove non-ARC code in AppDelegate -- Key: CB-8464 URL: https://issues.apache.org/jira/browse/CB-8464 Project: Apache Cordova Issue Type: Bug Components: iOS Affects Versions: 4.0.0 Reporter: Shazron Abdullah Assignee: Shazron Abdullah Fix For: 4.0.0 https://github.com/apache/cordova-ios/blob/master/bin/templates/project/__PROJECT_NAME__/Classes/AppDelegate.m All new projects have ARC enabled by default. -- 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-8556) handleOpenURL functionality to be removed to a plugin
[ https://issues.apache.org/jira/browse/CB-8556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14359618#comment-14359618 ] Shazron Abdullah commented on CB-8556: -- Since the plugin code has been altered to support CDVWebViewEngineProtocol and is now async, this must be re-tested to ensure that it works on both cold and warm starts before it is broken out. handleOpenURL functionality to be removed to a plugin - Key: CB-8556 URL: https://issues.apache.org/jira/browse/CB-8556 Project: Apache Cordova Issue Type: Bug Components: iOS Affects Versions: 4.0.0 Reporter: Shazron Abdullah Fix For: 4.0.0 It's already pluginized due to CB-7606 In 4.0.0, remove the plugin from core and put it in cordova-plugins. Possibility of release as a core plugin, not sure. This will include functionality to configure the callback function that is called, which is currently a global handleOpenURL function. Remove/edit the note here as well: https://github.com/apache/cordova-ios/blob/b3c26fcd598da7c84f020f5a6b9309fe638cbb5d/guides/Cordova%20Custom%20URL%20Scheme%20Handling.md -- 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] [Updated] (CB-7826) Add CDVPlugin support for getting items from plugin resource bundles
[ https://issues.apache.org/jira/browse/CB-7826?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shazron Abdullah updated CB-7826: - Description: Example: https://github.com/apache/cordova-plugin-media-capture/blob/f7d70e2e8f8354743286011f70dcd79a3292a82e/src/ios/CDVCapture.m#L34-L40 Each plugin can have a PluginName.bundle with images, localization strings, etc and we provide an interface in CDVPlugin to grab them. Advantages: 1. Only one line in plugin.xml as a resource tag, versus N lines for N files 2. Namespacing of resources built in, no fear of resource name collision with other plugins, or the project template was: Example: https://github.com/apache/cordova-plugin-media-capture/blob/f7d70e2e8f8354743286011f70dcd79a3292a82e/src/ios/CDVCapture.m#L34 Each plugin can have a PluginName.bundle with images, localization strings, etc and we provide an interface in CDVPlugin to grab them. Advantages: 1. Only one line in plugin.xml as a resource tag, versus N lines for N files 2. Namespacing of resources built in, no fear of resource name collision with other plugins, or the project template Add CDVPlugin support for getting items from plugin resource bundles Key: CB-7826 URL: https://issues.apache.org/jira/browse/CB-7826 Project: Apache Cordova Issue Type: Bug Components: iOS Affects Versions: 4.0.0 Reporter: Shazron Abdullah Fix For: 4.0.0 Example: https://github.com/apache/cordova-plugin-media-capture/blob/f7d70e2e8f8354743286011f70dcd79a3292a82e/src/ios/CDVCapture.m#L34-L40 Each plugin can have a PluginName.bundle with images, localization strings, etc and we provide an interface in CDVPlugin to grab them. Advantages: 1. Only one line in plugin.xml as a resource tag, versus N lines for N files 2. Namespacing of resources built in, no fear of resource name collision with other plugins, or the project template -- 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] [Resolved] (CB-8473) Remove AppDelegate code from template
[ https://issues.apache.org/jira/browse/CB-8473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shazron Abdullah resolved CB-8473. -- Resolution: Fixed Assignee: Shazron Abdullah http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/0053d35b Remove AppDelegate code from template - Key: CB-8473 URL: https://issues.apache.org/jira/browse/CB-8473 Project: Apache Cordova Issue Type: Task Components: iOS Affects Versions: 4.0.0 Reporter: Shazron Abdullah Assignee: Shazron Abdullah Fix For: 4.0.0 1. Move the AppDelegate code into the CordovaLib project (e.g. CordovaAppDelegate) 2. Make the template AppDelegate class inherit from CordovaAppDelegate, and just be empty -- 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] [Resolved] (CB-8474) Remove local/remote push notification delegates from CordovaAppDelegate
[ https://issues.apache.org/jira/browse/CB-8474?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shazron Abdullah resolved CB-8474. -- Resolution: Fixed Assignee: Shazron Abdullah http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/962f47cb Remove local/remote push notification delegates from CordovaAppDelegate --- Key: CB-8474 URL: https://issues.apache.org/jira/browse/CB-8474 Project: Apache Cordova Issue Type: Task Components: iOS Affects Versions: 4.0.0 Reporter: Shazron Abdullah Assignee: Shazron Abdullah Fix For: 4.0.0 They should be in a plugin, in the cordova-plugins repo, that swizzles the appropriate delegates (see CB-8475) See dependent and is depended on linked issues. -- 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] [Updated] (CB-8475) Create plugin to handle local/remote push notification delegates in the app delegate
[ https://issues.apache.org/jira/browse/CB-8475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shazron Abdullah updated CB-8475: - Description: These refer to the 3 delegates that were in AppDelegate.m in the template. See dependent issue. Plugin should reside in the cordova-plugins repo. Lines: https://github.com/apache/cordova-ios/blob/4d60a630a203f149dff46c02cb59c0bd0438c082/CordovaLib/Classes/CDVAppDelegate.m#L88-L116 was: These refer to the 3 delegates that were in AppDelegate.m in the template. See dependent issue. Plugin should reside in the cordova-plugins repo. Create plugin to handle local/remote push notification delegates in the app delegate Key: CB-8475 URL: https://issues.apache.org/jira/browse/CB-8475 Project: Apache Cordova Issue Type: Task Components: iOS, Plugins Affects Versions: 4.0.0 Reporter: Shazron Abdullah Fix For: 4.0.0 These refer to the 3 delegates that were in AppDelegate.m in the template. See dependent issue. Plugin should reside in the cordova-plugins repo. Lines: https://github.com/apache/cordova-ios/blob/4d60a630a203f149dff46c02cb59c0bd0438c082/CordovaLib/Classes/CDVAppDelegate.m#L88-L116 -- 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] [Updated] (CB-7767) [iOS] Remove usage of NSData+Base64
[ https://issues.apache.org/jira/browse/CB-7767?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shazron Abdullah updated CB-7767: - Description: There is built in support since iOS 7. Once we drop iOS 6, we can do this. https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSData_Class/index.html#//apple_ref/doc/uid/2172-SW36 was:There is built in support since iOS 7. Once we drop iOS 6, we can do this. [iOS] Remove usage of NSData+Base64 Key: CB-7767 URL: https://issues.apache.org/jira/browse/CB-7767 Project: Apache Cordova Issue Type: Bug Components: iOS Reporter: Shazron Abdullah Fix For: 4.0.0 There is built in support since iOS 7. Once we drop iOS 6, we can do this. https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSData_Class/index.html#//apple_ref/doc/uid/2172-SW36 -- 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-5806) [Windows8] Add keepCallback support to proxy
[ https://issues.apache.org/jira/browse/CB-5806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14358188#comment-14358188 ] ASF GitHub Bot commented on CB-5806: Github user CJRChang commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/61#discussion_r26282196 --- Diff: cordova-js-src/exec.js --- @@ -60,18 +60,32 @@ module.exports = function (success, fail, service, action, args) { // CB-5806 [Windows8] Add keepCallback support to proxy onSuccess = function (result, callbackOptions) { callbackOptions = callbackOptions || {}; +var callbackStatus; +if (callbackOptions.status !== null) { --- End diff -- My sincere apologies sir - you're quite right and I've amended the code to handle undefined. I've evidently been writing too much code in too many languages at once. [Windows8] Add keepCallback support to proxy Key: CB-5806 URL: https://issues.apache.org/jira/browse/CB-5806 Project: Apache Cordova Issue Type: Bug Components: CordovaJS, Windows 8 Affects Versions: 3.3.0 Reporter: Sergey Grebnov Assignee: Jesse MacFadyen Fix For: 3.4.0 Below is current proxy implementation. There is no way pass keepCallbck param via onSuccess method. onSuccess = function (result) { cordova.callbackSuccess(callbackId, { status: cordova.callbackStatus.OK, message: result }); }; onError = function (err) { cordova.callbackError(callbackId, { status: cordova.callbackStatus.ERROR, message: err }); }; proxy(onSuccess, onError, args); -- 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] [Created] (CB-8641) Some file-transfer plugin tests occasionally fail in mobilespec
Alexander Sorokin created CB-8641: - Summary: Some file-transfer plugin tests occasionally fail in mobilespec Key: CB-8641 URL: https://issues.apache.org/jira/browse/CB-8641 Project: Apache Cordova Issue Type: Bug Components: Plugin File Transfer Reporter: Alexander Sorokin Priority: Minor Some file-transfer plugin tests occasionally fail in mobilespec: File-transfer.spec.10 download should be stopped by abort() right away File-transfer.spec.21 upload should be stopped by abort() right away The issue seems to be caused by insufficient timeout and could be fixed by increasing it. -- 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-8641) Some file-transfer plugin tests occasionally fail in mobilespec
[ https://issues.apache.org/jira/browse/CB-8641?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14355102#comment-14355102 ] ASF GitHub Bot commented on CB-8641: GitHub user alsorokin opened a pull request: https://github.com/apache/cordova-plugin-file-transfer/pull/69 CB-8641 Fixed occasional test failures https://issues.apache.org/jira/browse/CB-8641 You can merge this pull request into a Git repository by running: $ git pull https://github.com/MSOpenTech/cordova-plugin-file-transfer CB-8641 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-plugin-file-transfer/pull/69.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 #69 commit e647afd066a8fcf3d852ad9fcb91830a288542de Author: alsorokin alexander.soro...@akvelon.com Date: 2015-03-10T15:38:36Z CB-8641 Fixed occasional test failures Some file-transfer plugin tests occasionally fail in mobilespec --- Key: CB-8641 URL: https://issues.apache.org/jira/browse/CB-8641 Project: Apache Cordova Issue Type: Bug Components: Plugin File Transfer Reporter: Alexander Sorokin Priority: Minor Some file-transfer plugin tests occasionally fail in mobilespec: File-transfer.spec.10 download should be stopped by abort() right away File-transfer.spec.21 upload should be stopped by abort() right away The issue seems to be caused by insufficient timeout and could be fixed by increasing it. -- 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-8634) `cordova platform add git_url` should accept custom branches and check them out
[ https://issues.apache.org/jira/browse/CB-8634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14355124#comment-14355124 ] ASF GitHub Bot commented on CB-8634: Github user omefire commented on a diff in the pull request: https://github.com/apache/cordova-cli/pull/210#discussion_r26135743 --- Diff: doc/platform.txt --- @@ -42,6 +45,8 @@ Syntax url . url to a git repository containing a platform version . major.minor.patch version specifier + +branch .. name of the branch to checkout after cloning the git repo --- End diff -- Thanks! done. `cordova platform add git_url` should accept custom branches and check them out --- Key: CB-8634 URL: https://issues.apache.org/jira/browse/CB-8634 Project: Apache Cordova Issue Type: Bug Reporter: Omar Mefire Assignee: Omar Mefire Priority: Minor Currently, adding a platform via a git_url, always checks out the master branch. It would be great if we could also checkout custom branches (i.e: pluggable_webview branch) : `cordova platform add https://github.com/apache/cordova-android.git#pluggable_webview` -- 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-5806) [Windows8] Add keepCallback support to proxy
[ https://issues.apache.org/jira/browse/CB-5806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14358147#comment-14358147 ] ASF GitHub Bot commented on CB-5806: Github user robpaveza commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/61#discussion_r26280733 --- Diff: cordova-js-src/exec.js --- @@ -60,18 +60,32 @@ module.exports = function (success, fail, service, action, args) { // CB-5806 [Windows8] Add keepCallback support to proxy onSuccess = function (result, callbackOptions) { callbackOptions = callbackOptions || {}; +var callbackStatus; +if (callbackOptions.status !== null) { --- End diff -- Is undefined a possible value here? [Windows8] Add keepCallback support to proxy Key: CB-5806 URL: https://issues.apache.org/jira/browse/CB-5806 Project: Apache Cordova Issue Type: Bug Components: CordovaJS, Windows 8 Affects Versions: 3.3.0 Reporter: Sergey Grebnov Assignee: Jesse MacFadyen Fix For: 3.4.0 Below is current proxy implementation. There is no way pass keepCallbck param via onSuccess method. onSuccess = function (result) { cordova.callbackSuccess(callbackId, { status: cordova.callbackStatus.OK, message: result }); }; onError = function (err) { cordova.callbackError(callbackId, { status: cordova.callbackStatus.ERROR, message: err }); }; proxy(onSuccess, onError, args); -- 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-5806) [Windows8] Add keepCallback support to proxy
[ https://issues.apache.org/jira/browse/CB-5806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14358152#comment-14358152 ] ASF GitHub Bot commented on CB-5806: Github user CJRChang commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/61#discussion_r26280804 --- Diff: cordova-js-src/exec.js --- @@ -60,18 +60,32 @@ module.exports = function (success, fail, service, action, args) { // CB-5806 [Windows8] Add keepCallback support to proxy onSuccess = function (result, callbackOptions) { callbackOptions = callbackOptions || {}; +var callbackStatus; +if (callbackOptions.status !== null) { --- End diff -- Yes it is - in the event that the user passes a callbackOptions but does not specify status, it will return null. [Windows8] Add keepCallback support to proxy Key: CB-5806 URL: https://issues.apache.org/jira/browse/CB-5806 Project: Apache Cordova Issue Type: Bug Components: CordovaJS, Windows 8 Affects Versions: 3.3.0 Reporter: Sergey Grebnov Assignee: Jesse MacFadyen Fix For: 3.4.0 Below is current proxy implementation. There is no way pass keepCallbck param via onSuccess method. onSuccess = function (result) { cordova.callbackSuccess(callbackId, { status: cordova.callbackStatus.OK, message: result }); }; onError = function (err) { cordova.callbackError(callbackId, { status: cordova.callbackStatus.ERROR, message: err }); }; proxy(onSuccess, onError, args); -- 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-5806) [Windows8] Add keepCallback support to proxy
[ https://issues.apache.org/jira/browse/CB-5806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14358160#comment-14358160 ] ASF GitHub Bot commented on CB-5806: Github user robpaveza commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/61#discussion_r26281092 --- Diff: cordova-js-src/exec.js --- @@ -60,18 +60,32 @@ module.exports = function (success, fail, service, action, args) { // CB-5806 [Windows8] Add keepCallback support to proxy onSuccess = function (result, callbackOptions) { callbackOptions = callbackOptions || {}; +var callbackStatus; +if (callbackOptions.status !== null) { --- End diff -- If the user passed undefined explicitly, it would have evaluated to falsy and in line 65 (pre-change) would have been replaced with cordova.callbackStatus.OK. With your change, line 64's (post-change) test is true (undefined !== null), so local callbackStatus becomes undefined (line 65), and the status property is undefined (line 72 or 88). [Windows8] Add keepCallback support to proxy Key: CB-5806 URL: https://issues.apache.org/jira/browse/CB-5806 Project: Apache Cordova Issue Type: Bug Components: CordovaJS, Windows 8 Affects Versions: 3.3.0 Reporter: Sergey Grebnov Assignee: Jesse MacFadyen Fix For: 3.4.0 Below is current proxy implementation. There is no way pass keepCallbck param via onSuccess method. onSuccess = function (result) { cordova.callbackSuccess(callbackId, { status: cordova.callbackStatus.OK, message: result }); }; onError = function (err) { cordova.callbackError(callbackId, { status: cordova.callbackStatus.ERROR, message: err }); }; proxy(onSuccess, onError, args); -- 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] [Created] (CB-8648) HTC One Accelerometer Not Working
Jon Knight created CB-8648: -- Summary: HTC One Accelerometer Not Working Key: CB-8648 URL: https://issues.apache.org/jira/browse/CB-8648 Project: Apache Cordova Issue Type: Bug Components: Plugin Device Motion Affects Versions: 3.5.0 Environment: HTC One with Android Lollipop Reporter: Jon Knight Priority: Minor I have a working application using the accelerometer that works on other devices. On the HTC One, the watchAccelerometer call does not fire either the success or error callbacks. It just fails silently. To eliminate the possibility of coding error, I have taken demo projects from online tutorials - which again work on other devices, but not the HTC One. Other non-phonegap apps are still working. The phone successfully re-orients. -- 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-8595) Merge platform specific code into one place
[ https://issues.apache.org/jira/browse/CB-8595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14356893#comment-14356893 ] ASF GitHub Bot commented on CB-8595: Github user mmocny commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/183#discussion_r26214059 --- Diff: cordova-lib/src/platforms/platforms.js --- @@ -0,0 +1,102 @@ +/** +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +License); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +*/ + +var platforms = require('./platformsConfig.json'); + +// Remove this block soon. The parser property is no longer used in +// cordova-lib but some downstream tools still use it. +var addModuleProperty = require('../cordova/util').addModuleProperty; +Object.keys(platforms).forEach(function(key) { +var obj = platforms[key]; +if (obj.parser_file) { +addModuleProperty(module, 'parser', obj.parser_file, false, obj); +} +}); + + +// Avoid loading the same platform projects more than once (identified by path) +var cachedProjects = {}; + +var PARSER_PUBLIC_METHODS = [ +'config_xml', +'cordovajs_path', +'update_from_config', +'update_overrides', +'update_project', +'update_www', +'www_dir', +]; + +var HANDLER_PUBLIC_METHODS = [ +'package_name', +'parseProjectFile', +'purgeProjectFileCache', +]; + + +// A single class that exposes functionality from platform specific files from +// both places cordova/metadata and plugman/platforms. Hopefully, to be soon +// replaced by real unified platform specific classes. +function PlatformProjectAdapter(platform, platformRootDir) { +var self = this; +self.root = platformRootDir; +self.platform = platform; +var ParserConstructor = require(platforms[platform].parser_file); +self.parser = new ParserConstructor(platformRootDir); +self.handler = require(platforms[platform].handler_file); + +// Expos all public methods from the parser and handler, properly bound. +PARSER_PUBLIC_METHODS.forEach(function(method) { +if (self.parser[method]) { --- End diff -- Is it an error to not be there? Should we throw if this fails? Merge platform specific code into one place --- Key: CB-8595 URL: https://issues.apache.org/jira/browse/CB-8595 Project: Apache Cordova Issue Type: Improvement Reporter: Mark Koudritsky Assignee: Mark Koudritsky Currently we have two separate places for platform specific code src/cordova/metadata src/plugman/platforms This is confusing. Once consolidated the platform specific code will be much easier to move to the platform repos where it belongs. -- 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-8595) Merge platform specific code into one place
[ https://issues.apache.org/jira/browse/CB-8595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14356919#comment-14356919 ] ASF GitHub Bot commented on CB-8595: Github user mmocny commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/183#discussion_r26215219 --- Diff: cordova-lib/src/plugman/uninstall.js --- @@ -293,58 +293,25 @@ function runUninstallPlatform(actions, platform, project_dir, plugin_dir, plugin function handleUninstall(actions, platform, pluginInfo, project_dir, www_dir, plugins_dir, is_top_level, options) { var plugin_id = pluginInfo.id; var plugin_dir = pluginInfo.dir; -var platform_modules = require('./platforms'); -var handler = platform_modules[platform]; -www_dir = www_dir || handler.www_dir(project_dir); +var handler = platform_modules.getPlatformProject(platform, project_dir); +www_dir = www_dir || handler.www_dir(); events.emit('log', 'Uninstalling ' + plugin_id + ' from ' + platform); +var pluginItems = pluginInfo.getFilesAndFrameworks(platform); var assets = pluginInfo.getAssets(platform); --- End diff -- Why are assets different? Merge platform specific code into one place --- Key: CB-8595 URL: https://issues.apache.org/jira/browse/CB-8595 Project: Apache Cordova Issue Type: Improvement Reporter: Mark Koudritsky Assignee: Mark Koudritsky Currently we have two separate places for platform specific code src/cordova/metadata src/plugman/platforms This is confusing. Once consolidated the platform specific code will be much easier to move to the platform repos where it belongs. -- 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