[jira] [Commented] (CB-13948) Apps with ampersand (&) in the name throw build error in cordova-ios@4.3.1
[ https://issues.apache.org/jira/browse/CB-13948?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16391272#comment-16391272 ] ASF GitHub Bot commented on CB-13948: - ronaldozanoni closed pull request #362: CB-13948 Properly encode app name to generate XML files using cordova-ios 4.3.1 URL: https://github.com/apache/cordova-ios/pull/362 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/CordovaLib/VERSION b/CordovaLib/VERSION index f77856a6f..cc2fbe89b 100644 --- a/CordovaLib/VERSION +++ b/CordovaLib/VERSION @@ -1 +1 @@ -4.3.1 +4.3.2 diff --git a/CordovaLib/cordova.js b/CordovaLib/cordova.js index 29be90991..9aa3d4bf3 100644 --- a/CordovaLib/cordova.js +++ b/CordovaLib/cordova.js @@ -8,9 +8,9 @@ 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 @@ -19,7 +19,7 @@ under the License. */ ;(function() { -var PLATFORM_VERSION_BUILD_LABEL = '4.3.1'; +var PLATFORM_VERSION_BUILD_LABEL = '4.3.2'; // file: src/scripts/require.js /*jshint -W079 */ @@ -962,7 +962,7 @@ function iOSExec() { // CB-10530 function proxyChanged() { var cexec = cordovaExec(); - + return (execProxy !== cexec && // proxy objects are different iOSExec !== cexec // proxy object is not the current iOSExec ); @@ -979,14 +979,14 @@ function handleBridgeChange() { var action = command[2]; var actionArgs = command[3]; var callbacks = cordova.callbacks[callbackId] || {}; - + execProxy(callbacks.success, callbacks.fail, service, action, actionArgs); - + commandString = commandQueue.shift(); }; return true; } - + return false; } @@ -996,7 +996,7 @@ function pokeNative() { setTimeout(pokeNative); return; } - + // Check if they've removed it from the DOM, and put it back if so. if (execIframe && execIframe.contentWindow) { execIframe.contentWindow.location = 'gap://ready'; diff --git a/bin/lib/create.js b/bin/lib/create.js index 89b9c8a9f..d62a44cd5 100755 --- a/bin/lib/create.js +++ b/bin/lib/create.js @@ -24,6 +24,7 @@ var shell = require('shelljs'), path = require('path'), fs = require('fs'), plist = require('plist'), +xmlescape = require('xml-escape'), ROOT = path.join(__dirname, '..', '..'), events = require('cordova-common').events; @@ -145,10 +146,14 @@ function copyTemplateFiles(project_path, project_name, project_template_dir, pac * - ./__PROJECT_NAME__/Resources/__PROJECT_NAME__-info.plist * - ./__PROJECT_NAME__/Resources/__PROJECT_NAME__-Prefix.plist */ + +// https://issues.apache.org/jira/browse/CB-12402 - Encode XML characters properly +var project_name_xml_esc = xmlescape(project_name); +shell.sed('-i', /__PROJECT_NAME__/g, project_name_xml_esc, path.join(r+'.xcworkspace', 'contents.xcworkspacedata')); +shell.sed('-i', /__PROJECT_NAME__/g, project_name_xml_esc, path.join(r+'.xcworkspace', 'xcshareddata', 'xcschemes', project_name +'.xcscheme')); + var project_name_esc = project_name.replace(/&/g, '\\&'); shell.sed('-i', /__PROJECT_NAME__/g, project_name_esc, path.join(r+'.xcodeproj', 'project.pbxproj')); -shell.sed('-i', /__PROJECT_NAME__/g, project_name_esc, path.join(r+'.xcworkspace', 'contents.xcworkspacedata')); -shell.sed('-i', /__PROJECT_NAME__/g, project_name_esc, path.join(r+'.xcworkspace', 'xcshareddata', 'xcschemes', project_name +'.xcscheme')); shell.sed('-i', /__PROJECT_NAME__/g, project_name_esc, path.join(r, 'Classes', 'AppDelegate.h')); shell.sed('-i', /__PROJECT_NAME__/g, project_name_esc, path.join(r, 'Classes', 'AppDelegate.m')); shell.sed('-i', /__PROJECT_NAME__/g, project_name_esc, path.join(r, 'Classes', 'MainViewController.h')); diff --git a/bin/templates/scripts/cordova/version b/bin/templates/scripts/cordova/version index 9f3eb4799..e3d0fb4c4 100755 --- a/bin/templates/scripts/cordova/version +++ b/bin/templates/scripts/cordova/version @@ -26,7 +26,7 @@ */ // Coho updates this line -var VERSION="4.3.1"; +var VERSION="4.3.2"; module.exports.version = VERSION; diff --git a/node_modules/xml-escape/LICENSE b/node_modules/xml-escape/LICENSE new file mode 100644 index 0..bd261effa --- /dev/null +++ b/n
[jira] [Commented] (CB-13948) Apps with ampersand (&) in the name throw build error in cordova-ios@4.3.1
[ https://issues.apache.org/jira/browse/CB-13948?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16391265#comment-16391265 ] ASF GitHub Bot commented on CB-13948: - ronaldozanoni commented on issue #361: CB-13948 Properly encode app name to generate XML files using cordova-ios 4.3.1 URL: https://github.com/apache/cordova-ios/pull/361#issuecomment-371494009 @shazron sure. I'm going to close the https://github.com/apache/cordova-ios/pull/362 and the JIRA task too. If someone else needs it, use the branch from my fork https://github.com/ronaldozanoni/cordova-ios/tree/xml-encoded-fix-4.3.1 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Apps with ampersand (&) in the name throw build error in cordova-ios@4.3.1 > -- > > Key: CB-13948 > URL: https://issues.apache.org/jira/browse/CB-13948 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-ios >Affects Versions: 4.3.1 >Reporter: Ronaldo Zanoni >Assignee: Suraj Pindoria >Priority: Major > > Cordova apps with an ampersand in the name give a build error in cordova-ios > 4.3.1: > "xcodebuild: error: Unable to load workspace 'Tom & Jerry.xcworkspace'. > Reason: Could not open workspace file at ~/git/Tom & Jerry/platforms/ios/Tom > & Jerry.xcworkspace/contents.xcworkspacedata" > I found that the problem is with the .xcworkspace file. The ampersand doesn't > get encoded in the XML files that are generated. > PR that created the problem: [https://github.com/apache/cordova-ios/pull/247] > Reproduce: > 1. run cordova create HelloCordova > 2. edit config.xml tag inside to "Tom & Jerry" > 3. run cordova platform add ios@4.3.1 > 4. run cordova build ios > --> ERROR > *NOTE*: This was fixed in the _cordova-ios 4.4.0_, but that version has > removed the _IOS 8_ support and we need that support yet. > So, the solution is merge the branch _origin/4.3.x_ with this pull request: > [https://github.com/apache/cordova-ios/pull/288] > -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13948) Apps with ampersand (&) in the name throw build error in cordova-ios@4.3.1
[ https://issues.apache.org/jira/browse/CB-13948?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16385501#comment-16385501 ] ASF GitHub Bot commented on CB-13948: - shazron commented on issue #361: CB-13948 Properly encode app name to generate XML files using cordova-ios 4.3.1 URL: https://github.com/apache/cordova-ios/pull/361#issuecomment-370292877 @ronaldozanoni I understand, but my statement still remains "Thanks for the PR, but this will not be released by us because we don't do back-releases, only forward looking releases." This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Apps with ampersand (&) in the name throw build error in cordova-ios@4.3.1 > -- > > Key: CB-13948 > URL: https://issues.apache.org/jira/browse/CB-13948 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-ios >Affects Versions: 4.3.1 >Reporter: Ronaldo Zanoni >Assignee: Suraj Pindoria >Priority: Major > > Cordova apps with an ampersand in the name give a build error in cordova-ios > 4.3.1: > "xcodebuild: error: Unable to load workspace 'Tom & Jerry.xcworkspace'. > Reason: Could not open workspace file at ~/git/Tom & Jerry/platforms/ios/Tom > & Jerry.xcworkspace/contents.xcworkspacedata" > I found that the problem is with the .xcworkspace file. The ampersand doesn't > get encoded in the XML files that are generated. > PR that created the problem: [https://github.com/apache/cordova-ios/pull/247] > Reproduce: > 1. run cordova create HelloCordova > 2. edit config.xml tag inside to "Tom & Jerry" > 3. run cordova platform add ios@4.3.1 > 4. run cordova build ios > --> ERROR > *NOTE*: This was fixed in the _cordova-ios 4.4.0_, but that version has > removed the _IOS 8_ support and we need that support yet. > So, the solution is merge the branch _origin/4.3.x_ with this pull request: > [https://github.com/apache/cordova-ios/pull/288] > -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13948) Apps with ampersand (&) in the name throw build error in cordova-ios@4.3.1
[ https://issues.apache.org/jira/browse/CB-13948?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16385492#comment-16385492 ] ASF GitHub Bot commented on CB-13948: - ronaldozanoni commented on issue #361: CB-13948 Properly encode app name to generate XML files using cordova-ios 4.3.1 URL: https://github.com/apache/cordova-ios/pull/361#issuecomment-370291143 Hi @shazron Thank you for your feedback. I've closed this PR and created a new one using the _cherry-pick_ to add only that commit. https://github.com/apache/cordova-ios/pull/362 About the DEPLOYMENT_TARGET, the problem is not it. The app throws an exception before loading the app on IOS <=8.3, as you can see the images below. https://user-images.githubusercontent.com/4555903/36954643-24760d74-2002-11e8-8dbb-72d1b83c3f1a.png";> https://user-images.githubusercontent.com/4555903/36954644-249e4db6-2002-11e8-9cfe-e9e73b8a8c80.png";> This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Apps with ampersand (&) in the name throw build error in cordova-ios@4.3.1 > -- > > Key: CB-13948 > URL: https://issues.apache.org/jira/browse/CB-13948 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-ios >Affects Versions: 4.3.1 >Reporter: Ronaldo Zanoni >Assignee: Suraj Pindoria >Priority: Major > > Cordova apps with an ampersand in the name give a build error in cordova-ios > 4.3.1: > "xcodebuild: error: Unable to load workspace 'Tom & Jerry.xcworkspace'. > Reason: Could not open workspace file at ~/git/Tom & Jerry/platforms/ios/Tom > & Jerry.xcworkspace/contents.xcworkspacedata" > I found that the problem is with the .xcworkspace file. The ampersand doesn't > get encoded in the XML files that are generated. > PR that created the problem: [https://github.com/apache/cordova-ios/pull/247] > Reproduce: > 1. run cordova create HelloCordova > 2. edit config.xml tag inside to "Tom & Jerry" > 3. run cordova platform add ios@4.3.1 > 4. run cordova build ios > --> ERROR > *NOTE*: This was fixed in the _cordova-ios 4.4.0_, but that version has > removed the _IOS 8_ support and we need that support yet. > So, the solution is merge the branch _origin/4.3.x_ with this pull request: > [https://github.com/apache/cordova-ios/pull/288] > -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13948) Apps with ampersand (&) in the name throw build error in cordova-ios@4.3.1
[ https://issues.apache.org/jira/browse/CB-13948?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16385494#comment-16385494 ] ASF GitHub Bot commented on CB-13948: - codecov-io commented on issue #362: CB-13948 Properly encode app name to generate XML files using cordova-ios 4.3.1 URL: https://github.com/apache/cordova-ios/pull/362#issuecomment-370291222 # [Codecov](https://codecov.io/gh/apache/cordova-ios/pull/362?src=pr&el=h1) Report > Merging [#362](https://codecov.io/gh/apache/cordova-ios/pull/362?src=pr&el=desc) into [4.3.x](https://codecov.io/gh/apache/cordova-ios/commit/8fe24d41b02e17eef6e232d1b907e2f97d0b87bd?src=pr&el=desc) will **not change** coverage. > The diff coverage is `n/a`. [![Impacted file tree graph](https://codecov.io/gh/apache/cordova-ios/pull/362/graphs/tree.svg?height=150&width=650&token=WomDD5jInz&src=pr)](https://codecov.io/gh/apache/cordova-ios/pull/362?src=pr&el=tree) ```diff @@ Coverage Diff @@ ##4.3.x #362 +/- ## === Coverage 64.11% 64.11% === Files 12 12 Lines1360 1360 Branches 229 229 === Hits 872 872 Misses488 488 ``` -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/cordova-ios/pull/362?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/apache/cordova-ios/pull/362?src=pr&el=footer). Last update [8fe24d4...924b34c](https://codecov.io/gh/apache/cordova-ios/pull/362?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments). This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Apps with ampersand (&) in the name throw build error in cordova-ios@4.3.1 > -- > > Key: CB-13948 > URL: https://issues.apache.org/jira/browse/CB-13948 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-ios >Affects Versions: 4.3.1 >Reporter: Ronaldo Zanoni >Assignee: Suraj Pindoria >Priority: Major > > Cordova apps with an ampersand in the name give a build error in cordova-ios > 4.3.1: > "xcodebuild: error: Unable to load workspace 'Tom & Jerry.xcworkspace'. > Reason: Could not open workspace file at ~/git/Tom & Jerry/platforms/ios/Tom > & Jerry.xcworkspace/contents.xcworkspacedata" > I found that the problem is with the .xcworkspace file. The ampersand doesn't > get encoded in the XML files that are generated. > PR that created the problem: [https://github.com/apache/cordova-ios/pull/247] > Reproduce: > 1. run cordova create HelloCordova > 2. edit config.xml tag inside to "Tom & Jerry" > 3. run cordova platform add ios@4.3.1 > 4. run cordova build ios > --> ERROR > *NOTE*: This was fixed in the _cordova-ios 4.4.0_, but that version has > removed the _IOS 8_ support and we need that support yet. > So, the solution is merge the branch _origin/4.3.x_ with this pull request: > [https://github.com/apache/cordova-ios/pull/288] > -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13948) Apps with ampersand (&) in the name throw build error in cordova-ios@4.3.1
[ https://issues.apache.org/jira/browse/CB-13948?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16385493#comment-16385493 ] ASF GitHub Bot commented on CB-13948: - ronaldozanoni commented on issue #361: CB-13948 Properly encode app name to generate XML files using cordova-ios 4.3.1 URL: https://github.com/apache/cordova-ios/pull/361#issuecomment-370291143 Hi @shazron Thank you for your feedback. I've closed this PR and created a new one using the _cherry-pick_ to add only that commit. https://github.com/apache/cordova-ios/pull/362 About the DEPLOYMENT_TARGET, the problem is not it. The app throws an exception before loading the app on IOS <=8.3, as you can see the images below. cordova-ios: 4.4.0 https://user-images.githubusercontent.com/4555903/36954643-24760d74-2002-11e8-8dbb-72d1b83c3f1a.png";> https://user-images.githubusercontent.com/4555903/36954644-249e4db6-2002-11e8-9cfe-e9e73b8a8c80.png";> This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Apps with ampersand (&) in the name throw build error in cordova-ios@4.3.1 > -- > > Key: CB-13948 > URL: https://issues.apache.org/jira/browse/CB-13948 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-ios >Affects Versions: 4.3.1 >Reporter: Ronaldo Zanoni >Assignee: Suraj Pindoria >Priority: Major > > Cordova apps with an ampersand in the name give a build error in cordova-ios > 4.3.1: > "xcodebuild: error: Unable to load workspace 'Tom & Jerry.xcworkspace'. > Reason: Could not open workspace file at ~/git/Tom & Jerry/platforms/ios/Tom > & Jerry.xcworkspace/contents.xcworkspacedata" > I found that the problem is with the .xcworkspace file. The ampersand doesn't > get encoded in the XML files that are generated. > PR that created the problem: [https://github.com/apache/cordova-ios/pull/247] > Reproduce: > 1. run cordova create HelloCordova > 2. edit config.xml tag inside to "Tom & Jerry" > 3. run cordova platform add ios@4.3.1 > 4. run cordova build ios > --> ERROR > *NOTE*: This was fixed in the _cordova-ios 4.4.0_, but that version has > removed the _IOS 8_ support and we need that support yet. > So, the solution is merge the branch _origin/4.3.x_ with this pull request: > [https://github.com/apache/cordova-ios/pull/288] > -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13948) Apps with ampersand (&) in the name throw build error in cordova-ios@4.3.1
[ https://issues.apache.org/jira/browse/CB-13948?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16385488#comment-16385488 ] ASF GitHub Bot commented on CB-13948: - ronaldozanoni opened a new pull request #362: CB-13948 Properly encode app name to generate XML files using cordova-ios 4.3.1 URL: https://github.com/apache/cordova-ios/pull/362 ### Platforms affected self ### What does this PR do? This PR merges the https://github.com/apache/cordova-ios/pull/288 and the branch _origin/4.3.x_. This is needed due to the _cordova-ios 4.4.0_ has removed the _IOS 8_ support and we need it yet. ### What testing has been done on this change? Auto-test using _Iphone 6s (IOS11)_ and some iPhone devices using IOS 8. ### Checklist - [x] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database - [x] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB- is the JIRA ID & "android" is the platform affected. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Apps with ampersand (&) in the name throw build error in cordova-ios@4.3.1 > -- > > Key: CB-13948 > URL: https://issues.apache.org/jira/browse/CB-13948 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-ios >Affects Versions: 4.3.1 >Reporter: Ronaldo Zanoni >Assignee: Suraj Pindoria >Priority: Major > > Cordova apps with an ampersand in the name give a build error in cordova-ios > 4.3.1: > "xcodebuild: error: Unable to load workspace 'Tom & Jerry.xcworkspace'. > Reason: Could not open workspace file at ~/git/Tom & Jerry/platforms/ios/Tom > & Jerry.xcworkspace/contents.xcworkspacedata" > I found that the problem is with the .xcworkspace file. The ampersand doesn't > get encoded in the XML files that are generated. > PR that created the problem: [https://github.com/apache/cordova-ios/pull/247] > Reproduce: > 1. run cordova create HelloCordova > 2. edit config.xml tag inside to "Tom & Jerry" > 3. run cordova platform add ios@4.3.1 > 4. run cordova build ios > --> ERROR > *NOTE*: This was fixed in the _cordova-ios 4.4.0_, but that version has > removed the _IOS 8_ support and we need that support yet. > So, the solution is merge the branch _origin/4.3.x_ with this pull request: > [https://github.com/apache/cordova-ios/pull/288] > -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13948) Apps with ampersand (&) in the name throw build error in cordova-ios@4.3.1
[ https://issues.apache.org/jira/browse/CB-13948?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16385480#comment-16385480 ] ASF GitHub Bot commented on CB-13948: - ronaldozanoni closed pull request #361: CB-13948 Properly encode app name to generate XML files using cordova-ios 4.3.1 URL: https://github.com/apache/cordova-ios/pull/361 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/.gitignore b/.gitignore index ac9b10187..4e6a1e946 100644 --- a/.gitignore +++ b/.gitignore @@ -215,4 +215,12 @@ node_modules/yallist/ node_modules/yargs/ coverage/ npm-debug.log - +node_modules/.bin/color-support +node_modules/.bin/jasmine +node_modules/asynckit/ +node_modules/aws4/ +node_modules/bcrypt-pbkdf/ +node_modules/color-support/ +node_modules/fs.realpath/ +node_modules/jasmine-core/ +node_modules/jasmine/ diff --git a/CordovaLib/Classes/Public/CDVAppDelegate.m b/CordovaLib/Classes/Public/CDVAppDelegate.m index 13c2e7bdb..821b957e3 100644 --- a/CordovaLib/Classes/Public/CDVAppDelegate.m +++ b/CordovaLib/Classes/Public/CDVAppDelegate.m @@ -85,9 +85,9 @@ - (BOOL)application:(UIApplication*)application openURL:(NSURL*)url sourceApplic return YES; } -#if __IPHONE_OS_VERSION_MAX_ALLOWED < 9 +#if __IPHONE_OS_VERSION_MAX_ALLOWED < 9 - (NSUInteger)application:(UIApplication*)application supportedInterfaceOrientationsForWindow:(UIWindow*)window -#else +#else //CB-12098. Defaults to UIInterfaceOrientationMask for iOS 9+ - (UIInterfaceOrientationMask)application:(UIApplication*)application supportedInterfaceOrientationsForWindow:(UIWindow*)window #endif { diff --git a/CordovaLib/Classes/Public/CDVScreenOrientationDelegate.h b/CordovaLib/Classes/Public/CDVScreenOrientationDelegate.h index 7226205a5..519dd490c 100644 --- a/CordovaLib/Classes/Public/CDVScreenOrientationDelegate.h +++ b/CordovaLib/Classes/Public/CDVScreenOrientationDelegate.h @@ -21,7 +21,12 @@ @protocol CDVScreenOrientationDelegate -- (NSUInteger)supportedInterfaceOrientations; +#if __IPHONE_OS_VERSION_MAX_ALLOWED < 9 +- (NSUInteger)supportedInterfaceOrientations; +#else +- (UIInterfaceOrientationMask)supportedInterfaceOrientations; +#endif + - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation; - (BOOL)shouldAutorotate; diff --git a/CordovaLib/Classes/Public/CDVUserAgentUtil.m b/CordovaLib/Classes/Public/CDVUserAgentUtil.m index b589e1f35..b17107e14 100644 --- a/CordovaLib/Classes/Public/CDVUserAgentUtil.m +++ b/CordovaLib/Classes/Public/CDVUserAgentUtil.m @@ -90,7 +90,7 @@ + (void)acquireLock:(void (^)(NSInteger lockToken))block + (void)releaseLock:(NSInteger*)lockToken { -if (*lockToken == 0) { +if (lockToken == nil || *lockToken == 0) { return; } NSAssert(gCurrentLockToken == *lockToken, @"Got token %ld, expected %ld", (long)*lockToken, (long)gCurrentLockToken); diff --git a/CordovaLib/Classes/Public/CDVViewController.h b/CordovaLib/Classes/Public/CDVViewController.h index 90d33d228..605dbbbfb 100644 --- a/CordovaLib/Classes/Public/CDVViewController.h +++ b/CordovaLib/Classes/Public/CDVViewController.h @@ -79,6 +79,7 @@ - (NSString*)appURLScheme; - (NSURL*)errorURL; +- (UIColor*)colorFromColorString:(NSString*)colorString; - (NSArray*)parseInterfaceOrientations:(NSArray*)orientations; - (BOOL)supportsOrientation:(UIInterfaceOrientation)orientation; diff --git a/CordovaLib/Classes/Public/CDVViewController.m b/CordovaLib/Classes/Public/CDVViewController.m index 4019c2043..6e329aa92 100644 --- a/CordovaLib/Classes/Public/CDVViewController.m +++ b/CordovaLib/Classes/Public/CDVViewController.m @@ -207,11 +207,11 @@ - (NSURL*)appUrl appURL = [NSURL URLWithString:self.startPage]; } else if ([self.wwwFolderName rangeOfString:@"://"].location != NSNotFound) { appURL = [NSURL URLWithString:[NSString stringWithFormat:@"%@/%@", self.wwwFolderName, self.startPage]]; -} else if([self.wwwFolderName hasSuffix:@".bundle"]){ +} else if([self.wwwFolderName rangeOfString:@".bundle"].location != NSNotFound){ // www folder is actually a bundle NSBundle* bundle = [NSBundle bundleWithPath:self.wwwFolderName]; appURL = [bundle URLForResource:self.startPage withExtension:nil]; -} else if([self.wwwFolderName hasSuffix:@".framework"]){ +} else if([self.wwwFolderName rangeOfString:@".framework"].location != NSNotFound){ // www folder is actually a framework NSBundle* bundle = [NSBundle bundleWithPath:self.wwwFolderName]; appURL = [bundle URLForResource:self.startPage withExtension:nil]; @@ -319,10 +319,11 @@ - (void)viewDidLoad //
[jira] [Commented] (CB-13948) Apps with ampersand (&) in the name throw build error in cordova-ios@4.3.1
[ https://issues.apache.org/jira/browse/CB-13948?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16385454#comment-16385454 ] ASF GitHub Bot commented on CB-13948: - shazron commented on issue #361: CB-13948 Properly encode app name to generate XML files using cordova-ios 4.3.1 URL: https://github.com/apache/cordova-ios/pull/361#issuecomment-370280491 Thanks for the PR, but this will not be released by us because we don't do back-releases, only forward looking releases. In any case, I'm not sure why there are many commits in this PR, since if you want that change you can cherry pick the commit (https://github.com/apache/cordova-ios/pull/288/commits/9b7efc9bb2af115cd5efb5eae79cfdad6c54b0d2) into the branch, and your PR will only contain 1 commit. Also, often version support drops means we don't test on that version because of limited resources; often you can just change DEPLOYMENT_TARGET in the build settings and it should work. It should be something that can be changed in your config.xml as well. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Apps with ampersand (&) in the name throw build error in cordova-ios@4.3.1 > -- > > Key: CB-13948 > URL: https://issues.apache.org/jira/browse/CB-13948 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-ios >Affects Versions: 4.3.1 >Reporter: Ronaldo Zanoni >Assignee: Suraj Pindoria >Priority: Major > > Cordova apps with an ampersand in the name give a build error in cordova-ios > 4.3.1: > "xcodebuild: error: Unable to load workspace 'Tom & Jerry.xcworkspace'. > Reason: Could not open workspace file at ~/git/Tom & Jerry/platforms/ios/Tom > & Jerry.xcworkspace/contents.xcworkspacedata" > I found that the problem is with the .xcworkspace file. The ampersand doesn't > get encoded in the XML files that are generated. > PR that created the problem: [https://github.com/apache/cordova-ios/pull/247] > Reproduce: > 1. run cordova create HelloCordova > 2. edit config.xml tag inside to "Tom & Jerry" > 3. run cordova platform add ios@4.3.1 > 4. run cordova build ios > --> ERROR > *NOTE*: This was fixed in the _cordova-ios 4.4.0_, but that version has > removed the _IOS 8_ support and we need that support yet. > So, the solution is merge the branch _origin/4.3.x_ with this pull request: > [https://github.com/apache/cordova-ios/pull/288] > -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13948) Apps with ampersand (&) in the name throw build error in cordova-ios@4.3.1
[ https://issues.apache.org/jira/browse/CB-13948?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16385295#comment-16385295 ] ASF GitHub Bot commented on CB-13948: - ronaldozanoni opened a new pull request #361: CB-13948 Properly encode app name to generate XML files using cordova-ios 4.3.1 URL: https://github.com/apache/cordova-ios/pull/361 ### Platforms affected self ### What does this PR do? This PR merges the https://github.com/apache/cordova-ios/pull/288 and the branch _origin/4.3.x_. This is needed due to the _cordova-ios 4.4.0_ has removed the _IOS 8_ support and we need it yet. ### What testing has been done on this change? Auto-test using _Iphone 6s (IOS11)_ and some iPhone devices using IOS 8. ### Checklist - [x] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database - [x] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB- is the JIRA ID & "android" is the platform affected. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Apps with ampersand (&) in the name throw build error in cordova-ios@4.3.1 > -- > > Key: CB-13948 > URL: https://issues.apache.org/jira/browse/CB-13948 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-ios >Affects Versions: 4.3.1 >Reporter: Ronaldo Zanoni >Assignee: Suraj Pindoria >Priority: Major > > Cordova apps with an ampersand in the name give a build error in cordova-ios > 4.3.1: > "xcodebuild: error: Unable to load workspace 'Tom & Jerry.xcworkspace'. > Reason: Could not open workspace file at ~/git/Tom & Jerry/platforms/ios/Tom > & Jerry.xcworkspace/contents.xcworkspacedata" > I found that the problem is with the .xcworkspace file. The ampersand doesn't > get encoded in the XML files that are generated. > PR that created the problem: [https://github.com/apache/cordova-ios/pull/247] > Reproduce: > 1. run cordova create HelloCordova > 2. edit config.xml tag inside to "Tom & Jerry" > 3. run cordova platform add ios@4.3.1 > 4. run cordova build ios > --> ERROR > *NOTE*: This was fixed in the _cordova-ios 4.4.0_, but that version has > removed the _IOS 8_ support and we need that support yet. > So, the solution is merge the branch _origin/4.3.x_ with this pull request: > [https://github.com/apache/cordova-ios/pull/288] > -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org