diff --git a/lib/parser/pbxproj.js b/lib/parser/pbxproj.js index 04eec3f..f574479 100644 --- a/lib/parser/pbxproj.js +++ b/lib/parser/pbxproj.js @@ -1,2680 +1,1843 @@ -module.exports = (function(){ - /* Generated by PEG.js 0.6.2 (http://pegjs.majda.cz/). */ - - var result = { - /* - * Parses the input with a generated parser. If the parsing is successfull, - * returns a value explicitly or implicitly specified by the grammar from - * which the parser was generated (see |PEG.buildParser|). If the parsing is - * unsuccessful, throws |PEG.parser.SyntaxError| describing the error. - */ - parse: function(input, startRule) { - var parseFunctions = { - "Alpha": parse_Alpha, - "Array": parse_Array, - "ArrayBody": parse_ArrayBody, - "ArrayEntry": parse_ArrayEntry, - "Assignment": parse_Assignment, - "AssignmentList": parse_AssignmentList, - "Char": parse_Char, - "CommentedArrayEntry": parse_CommentedArrayEntry, - "CommentedAssignment": parse_CommentedAssignment, - "CommentedIdentifier": parse_CommentedIdentifier, - "CommentedValue": parse_CommentedValue, - "DecimalValue": parse_DecimalValue, - "DelimitedSection": parse_DelimitedSection, - "DelimitedSectionBegin": parse_DelimitedSectionBegin, - "DelimitedSectionEnd": parse_DelimitedSectionEnd, - "Digit": parse_Digit, - "DoubleQuote": parse_DoubleQuote, - "EmptyArray": parse_EmptyArray, - "EmptyBody": parse_EmptyBody, - "EscapedQuote": parse_EscapedQuote, - "Identifier": parse_Identifier, - "InlineComment": parse_InlineComment, - "InlineCommentClose": parse_InlineCommentClose, - "InlineCommentOpen": parse_InlineCommentOpen, - "IntegerValue": parse_IntegerValue, - "LineTerminator": parse_LineTerminator, - "LiteralChar": parse_LiteralChar, - "LiteralString": parse_LiteralString, - "NewLine": parse_NewLine, - "NonLine": parse_NonLine, - "NonQuote": parse_NonQuote, - "NonTerminator": parse_NonTerminator, - "NumberValue": parse_NumberValue, - "Object": parse_Object, - "OneLineString": parse_OneLineString, - "Project": parse_Project, - "QuotedBody": parse_QuotedBody, - "QuotedString": parse_QuotedString, - "SimpleArrayEntry": parse_SimpleArrayEntry, - "SimpleAssignment": parse_SimpleAssignment, - "SingleLineComment": parse_SingleLineComment, - "StringValue": parse_StringValue, - "Value": parse_Value, - "_": parse__, - "whitespace": parse_whitespace - }; - - if (startRule !== undefined) { - if (parseFunctions[startRule] === undefined) { - throw new Error("Invalid rule name: " + quote(startRule) + "."); - } - } else { - startRule = "Project"; - } - - var pos = 0; - var reportMatchFailures = true; - var rightmostMatchFailuresPos = 0; - var rightmostMatchFailuresExpected = []; - var cache = {}; - - function padLeft(input, padding, length) { - var result = input; - - var padLength = length - input.length; - for (var i = 0; i < padLength; i++) { - result = padding + result; - } - - return result; +module.exports = (function() { + /* + * Generated by PEG.js 0.8.0. + * + * http://pegjs.majda.cz/ + */ + + function peg$subclass(child, parent) { + function ctor() { this.constructor = child; } + ctor.prototype = parent.prototype; + child.prototype = new ctor(); + } + + function SyntaxError(message, expected, found, offset, line, column) { + this.message = message; + this.expected = expected; + this.found = found; + this.offset = offset; + this.line = line; + this.column = column; + + this.name = "SyntaxError"; + } + + peg$subclass(SyntaxError, Error); + + function parse(input) { + var options = arguments.length > 1 ? arguments[1] : {}, + + peg$FAILED = {}, + + peg$startRuleFunctions = { Project: peg$parseProject }, + peg$startRuleFunction = peg$parseProject, + + peg$c0 = peg$FAILED, + peg$c1 = null, + peg$c2 = function(headComment, obj) { + var proj = Object.create(null) + proj.project = obj + + if (headComment) { + proj.headComment = headComment + } + + return proj; + }, + peg$c3 = "{", + peg$c4 = { type: "literal", value: "{", description: "\"{\"" }, + peg$c5 = "}", + peg$c6 = { type: "literal", value: "}", description: "\"}\"" }, + peg$c7 = function(obj) { return obj }, + peg$c8 = function() { return Object.create(null) }, + peg$c9 = [], + peg$c10 = function(head, tail) { + if (tail) return merge(head,tail) + else return head + }, + peg$c11 = function(head, tail) { + if (tail) return merge(head,tail) + else return head + }, + peg$c12 = "=", + peg$c13 = { type: "literal", value: "=", description: "\"=\"" }, + peg$c14 = ";", + peg$c15 = { type: "literal", value: ";", description: "\";\"" }, + peg$c16 = function(id, val) { + var result = Object.create(null); + result[id] = val + return result + }, + peg$c17 = function(commentedId, val) { + var result = Object.create(null), + commentKey = commentedId.id + '_comment'; + + result[commentedId.id] = val; + result[commentKey] = commentedId[commentKey]; + return result; + + }, + peg$c18 = function(id, commentedVal) { + var result = Object.create(null); + result[id] = commentedVal.value; + result[id + "_comment"] = commentedVal.comment; + return result; + }, + peg$c19 = function(id, comment) { + var result = Object.create(null); + result.id = id; + result[id + "_comment"] = comment.trim(); + return result + }, + peg$c20 = function(literal, comment) { + var result = Object.create(null) + result.comment = comment.trim(); + result.value = literal.trim(); + return result; + }, + peg$c21 = /^[^*]/, + peg$c22 = { type: "class", value: "[^*]", description: "[^*]" }, + peg$c23 = function(body) { return body.join('') }, + peg$c24 = "/*", + peg$c25 = { type: "literal", value: "/*", description: "\"/*\"" }, + peg$c26 = "*/", + peg$c27 = { type: "literal", value: "*/", description: "\"*/\"" }, + peg$c28 = function(begin, fields) { + var section = Object.create(null); + section[begin.name] = fields + + return section + }, + peg$c29 = "/* Begin ", + peg$c30 = { type: "literal", value: "/* Begin ", description: "\"/* Begin \"" }, + peg$c31 = " section */", + peg$c32 = { type: "literal", value: " section */", description: "\" section */\"" }, + peg$c33 = function(sectionName) { return { name: sectionName } }, + peg$c34 = "/* End ", + peg$c35 = { type: "literal", value: "/* End ", description: "\"/* End \"" }, + peg$c36 = "(", + peg$c37 = { type: "literal", value: "(", description: "\"(\"" }, + peg$c38 = ")", + peg$c39 = { type: "literal", value: ")", description: "\")\"" }, + peg$c40 = function(arr) { return arr }, + peg$c41 = function() { return [] }, + peg$c42 = function(head, tail) { + if (tail) { + tail.unshift(head); + return tail; + } else { + return [head]; + } + }, + peg$c43 = function(val) { return val }, + peg$c44 = function(val, comment) { + var result = Object.create(null); + result.value = val.trim(); + result.comment = comment.trim(); + return result; + }, + peg$c45 = ",", + peg$c46 = { type: "literal", value: ",", description: "\",\"" }, + peg$c47 = void 0, + peg$c48 = /^[A-Za-z0-9_.]/, + peg$c49 = { type: "class", value: "[A-Za-z0-9_.]", description: "[A-Za-z0-9_.]" }, + peg$c50 = function(id) { return id.join('') }, + peg$c51 = ".", + peg$c52 = { type: "literal", value: ".", description: "\".\"" }, + peg$c53 = function(decimal) { + // store decimals as strings + // as JS doesn't differentiate bw strings and numbers + return decimal.join('') + }, + peg$c54 = function(number) { return parseInt(number.join(''), 10) }, + peg$c55 = function(str) { return '"' + str + '"' }, + peg$c56 = function(str) { return str.join('') }, + peg$c57 = { type: "any", description: "any character" }, + peg$c58 = function(char) { return char }, + peg$c59 = "\\", + peg$c60 = { type: "literal", value: "\\", description: "\"\\\\\"" }, + peg$c61 = function() { return '\\"' }, + peg$c62 = function(literal) { return literal.join('') }, + peg$c63 = /^[^;,\n]/, + peg$c64 = { type: "class", value: "[^;,\\n]", description: "[^;,\\n]" }, + peg$c65 = "//", + peg$c66 = { type: "literal", value: "//", description: "\"//\"" }, + peg$c67 = function(contents) { return contents }, + peg$c68 = function(contents) { return contents.join('') }, + peg$c69 = /^[0-9]/, + peg$c70 = { type: "class", value: "[0-9]", description: "[0-9]" }, + peg$c71 = /^[A-Za-z]/, + peg$c72 = { type: "class", value: "[A-Za-z]", description: "[A-Za-z]" }, + peg$c73 = "\"", + peg$c74 = { type: "literal", value: "\"", description: "\"\\\"\"" }, + peg$c75 = { type: "other", description: "whitespace" }, + peg$c76 = /^[\t ]/, + peg$c77 = { type: "class", value: "[\\t ]", description: "[\\t ]" }, + peg$c78 = /^[\n\r]/, + peg$c79 = { type: "class", value: "[\\n\\r]", description: "[\\n\\r]" }, + + peg$currPos = 0, + peg$reportedPos = 0, + peg$cachedPos = 0, + peg$cachedPosDetails = { line: 1, column: 1, seenCR: false }, + peg$maxFailPos = 0, + peg$maxFailExpected = [], + peg$silentFails = 0, + + peg$result; + + if ("startRule" in options) { + if (!(options.startRule in peg$startRuleFunctions)) { + throw new Error("Can't start parsing from rule \"" + options.startRule + "\"."); } - - function escape(ch) { - var charCode = ch.charCodeAt(0); - - if (charCode <= 0xFF) { - var escapeChar = 'x'; - var length = 2; - } else { - var escapeChar = 'u'; - var length = 4; - } - - return '\\' + escapeChar + padLeft(charCode.toString(16).toUpperCase(), '0', length); - } - - function quote(s) { - /* - * ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a - * string literal except for the closing quote character, backslash, - * carriage return, line separator, paragraph separator, and line feed. - * Any character may appear in the form of an escape sequence. - */ - return '"' + s - .replace(/\\/g, '\\\\') // backslash - .replace(/"/g, '\\"') // closing quote character - .replace(/\r/g, '\\r') // carriage return - .replace(/\n/g, '\\n') // line feed - .replace(/[\x80-\uFFFF]/g, escape) // non-ASCII characters - + '"'; - } - - function matchFailed(failure) { - if (pos < rightmostMatchFailuresPos) { - return; - } - - if (pos > rightmostMatchFailuresPos) { - rightmostMatchFailuresPos = pos; - rightmostMatchFailuresExpected = []; + + peg$startRuleFunction = peg$startRuleFunctions[options.startRule]; + } + + function text() { + return input.substring(peg$reportedPos, peg$currPos); + } + + function offset() { + return peg$reportedPos; + } + + function line() { + return peg$computePosDetails(peg$reportedPos).line; + } + + function column() { + return peg$computePosDetails(peg$reportedPos).column; + } + + function expected(description) { + throw peg$buildException( + null, + [{ type: "other", description: description }], + peg$reportedPos + ); + } + + function error(message) { + throw peg$buildException(message, null, peg$reportedPos); + } + + function peg$computePosDetails(pos) { + function advance(details, startPos, endPos) { + var p, ch; + + for (p = startPos; p < endPos; p++) { + ch = input.charAt(p); + if (ch === "\n") { + if (!details.seenCR) { details.line++; } + details.column = 1; + details.seenCR = false; + } else if (ch === "\r" || ch === "\u2028" || ch === "\u2029") { + details.line++; + details.column = 1; + details.seenCR = true; + } else { + details.column++; + details.seenCR = false; + } } - - rightmostMatchFailuresExpected.push(failure); - } - - function parse_Project() { - var cacheKey = 'Project@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; + } + + if (peg$cachedPos !== pos) { + if (peg$cachedPos > pos) { + peg$cachedPos = 0; + peg$cachedPosDetails = { line: 1, column: 1, seenCR: false }; + } + advance(peg$cachedPosDetails, peg$cachedPos, pos); + peg$cachedPos = pos; + } + + return peg$cachedPosDetails; + } + + function peg$fail(expected) { + if (peg$currPos < peg$maxFailPos) { return; } + + if (peg$currPos > peg$maxFailPos) { + peg$maxFailPos = peg$currPos; + peg$maxFailExpected = []; + } + + peg$maxFailExpected.push(expected); + } + + function peg$buildException(message, expected, pos) { + function cleanupExpected(expected) { + var i = 1; + + expected.sort(function(a, b) { + if (a.description < b.description) { + return -1; + } else if (a.description > b.description) { + return 1; + } else { + return 0; + } + }); + + while (i < expected.length) { + if (expected[i - 1] === expected[i]) { + expected.splice(i, 1); + } else { + i++; + } } - - - var savedPos0 = pos; - var savedPos1 = pos; - var result10 = parse_SingleLineComment(); - var result3 = result10 !== null ? result10 : ''; - if (result3 !== null) { - var result9 = parse_InlineComment(); - var result4 = result9 !== null ? result9 : ''; - if (result4 !== null) { - var result5 = parse__(); - if (result5 !== null) { - var result6 = parse_Object(); - if (result6 !== null) { - var result7 = parse_NewLine(); - if (result7 !== null) { - var result8 = parse__(); - if (result8 !== null) { - var result1 = [result3, result4, result5, result6, result7, result8]; - } else { - var result1 = null; - pos = savedPos1; - } + } + + function buildMessage(expected, found) { + function stringEscape(s) { + function hex(ch) { return ch.charCodeAt(0).toString(16).toUpperCase(); } + + return s + .replace(/\\/g, '\\\\') + .replace(/"/g, '\\"') + .replace(/\x08/g, '\\b') + .replace(/\t/g, '\\t') + .replace(/\n/g, '\\n') + .replace(/\f/g, '\\f') + .replace(/\r/g, '\\r') + .replace(/[\x00-\x07\x0B\x0E\x0F]/g, function(ch) { return '\\x0' + hex(ch); }) + .replace(/[\x10-\x1F\x80-\xFF]/g, function(ch) { return '\\x' + hex(ch); }) + .replace(/[\u0180-\u0FFF]/g, function(ch) { return '\\u0' + hex(ch); }) + .replace(/[\u1080-\uFFFF]/g, function(ch) { return '\\u' + hex(ch); }); + } + + var expectedDescs = new Array(expected.length), + expectedDesc, foundDesc, i; + + for (i = 0; i < expected.length; i++) { + expectedDescs[i] = expected[i].description; + } + + expectedDesc = expected.length > 1 + ? expectedDescs.slice(0, -1).join(", ") + + " or " + + expectedDescs[expected.length - 1] + : expectedDescs[0]; + + foundDesc = found ? "\"" + stringEscape(found) + "\"" : "end of input"; + + return "Expected " + expectedDesc + " but " + foundDesc + " found."; + } + + var posDetails = peg$computePosDetails(pos), + found = pos < input.length ? input.charAt(pos) : null; + + if (expected !== null) { + cleanupExpected(expected); + } + + return new SyntaxError( + message !== null ? message : buildMessage(expected, found), + expected, + found, + pos, + posDetails.line, + posDetails.column + ); + } + + function peg$parseProject() { + var s0, s1, s2, s3, s4, s5, s6; + + s0 = peg$currPos; + s1 = peg$parseSingleLineComment(); + if (s1 === peg$FAILED) { + s1 = peg$c1; + } + if (s1 !== peg$FAILED) { + s2 = peg$parseInlineComment(); + if (s2 === peg$FAILED) { + s2 = peg$c1; + } + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s4 = peg$parseObject(); + if (s4 !== peg$FAILED) { + s5 = peg$parseNewLine(); + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + if (s6 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c2(s1, s4); + s0 = s1; } else { - var result1 = null; - pos = savedPos1; + peg$currPos = s0; + s0 = peg$c0; } } else { - var result1 = null; - pos = savedPos1; + peg$currPos = s0; + s0 = peg$c0; } } else { - var result1 = null; - pos = savedPos1; + peg$currPos = s0; + s0 = peg$c0; } } else { - var result1 = null; - pos = savedPos1; + peg$currPos = s0; + s0 = peg$c0; } } else { - var result1 = null; - pos = savedPos1; - } - var result2 = result1 !== null - ? (function(headComment, obj) { - var proj = Object.create(null) - proj.project = obj - - if (headComment) { - proj.headComment = headComment - } - - return proj; - })(result1[0], result1[3]) - : null; - if (result2 !== null) { - var result0 = result2; - } else { - var result0 = null; - pos = savedPos0; - } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_Object() { - var cacheKey = 'Object@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; + peg$currPos = s0; + s0 = peg$c0; } - - - var savedPos0 = pos; - var savedPos1 = pos; - if (input.substr(pos, 1) === "{") { - var result3 = "{"; - pos += 1; - } else { - var result3 = null; - if (reportMatchFailures) { - matchFailed("\"{\""); + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseObject() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 123) { + s1 = peg$c3; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c4); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parseAssignmentList(); + if (s2 === peg$FAILED) { + s2 = peg$parseEmptyBody(); + } + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 125) { + s3 = peg$c5; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c6); } } - } - if (result3 !== null) { - var result7 = parse_AssignmentList(); - if (result7 !== null) { - var result4 = result7; + if (s3 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c7(s2); + s0 = s1; } else { - var result6 = parse_EmptyBody(); - if (result6 !== null) { - var result4 = result6; - } else { - var result4 = null;; - }; + peg$currPos = s0; + s0 = peg$c0; } - if (result4 !== null) { - if (input.substr(pos, 1) === "}") { - var result5 = "}"; - pos += 1; - } else { - var result5 = null; - if (reportMatchFailures) { - matchFailed("\"}\""); - } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseEmptyBody() { + var s0, s1; + + s0 = peg$currPos; + s1 = peg$parse_(); + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c8(); + } + s0 = s1; + + return s0; + } + + function peg$parseAssignmentList() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + s1 = peg$parse_(); + if (s1 !== peg$FAILED) { + s2 = peg$parseAssignment(); + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s4 = []; + s5 = peg$parseAssignmentList(); + while (s5 !== peg$FAILED) { + s4.push(s5); + s5 = peg$parseAssignmentList(); } - if (result5 !== null) { - var result1 = [result3, result4, result5]; + if (s4 !== peg$FAILED) { + s5 = peg$parse_(); + if (s5 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c10(s2, s4); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c0; + } } else { - var result1 = null; - pos = savedPos1; + peg$currPos = s0; + s0 = peg$c0; } } else { - var result1 = null; - pos = savedPos1; + peg$currPos = s0; + s0 = peg$c0; } } else { - var result1 = null; - pos = savedPos1; - } - var result2 = result1 !== null - ? (function(obj) { return obj })(result1[1]) - : null; - if (result2 !== null) { - var result0 = result2; - } else { - var result0 = null; - pos = savedPos0; + peg$currPos = s0; + s0 = peg$c0; } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_EmptyBody() { - var cacheKey = 'EmptyBody@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; - } - - - var savedPos0 = pos; - var result1 = parse__(); - var result2 = result1 !== null - ? (function() { return Object.create(null) })() - : null; - if (result2 !== null) { - var result0 = result2; - } else { - var result0 = null; - pos = savedPos0; - } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_AssignmentList() { - var cacheKey = 'AssignmentList@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; - } - - - var savedPos2 = pos; - var savedPos3 = pos; - var result12 = parse__(); - if (result12 !== null) { - var result13 = parse_Assignment(); - if (result13 !== null) { - var result14 = parse__(); - if (result14 !== null) { - var result15 = []; - var result17 = parse_AssignmentList(); - while (result17 !== null) { - result15.push(result17); - var result17 = parse_AssignmentList(); + } else { + peg$currPos = s0; + s0 = peg$c0; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parse_(); + if (s1 !== peg$FAILED) { + s2 = peg$parseDelimitedSection(); + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s4 = []; + s5 = peg$parseAssignmentList(); + while (s5 !== peg$FAILED) { + s4.push(s5); + s5 = peg$parseAssignmentList(); } - if (result15 !== null) { - var result16 = parse__(); - if (result16 !== null) { - var result10 = [result12, result13, result14, result15, result16]; - } else { - var result10 = null; - pos = savedPos3; - } + if (s4 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c11(s2, s4); + s0 = s1; } else { - var result10 = null; - pos = savedPos3; + peg$currPos = s0; + s0 = peg$c0; } } else { - var result10 = null; - pos = savedPos3; + peg$currPos = s0; + s0 = peg$c0; } } else { - var result10 = null; - pos = savedPos3; + peg$currPos = s0; + s0 = peg$c0; } } else { - var result10 = null; - pos = savedPos3; - } - var result11 = result10 !== null - ? (function(head, tail) { - if (tail) return merge(head,tail) - else return head - })(result10[1], result10[3]) - : null; - if (result11 !== null) { - var result9 = result11; - } else { - var result9 = null; - pos = savedPos2; + peg$currPos = s0; + s0 = peg$c0; } - if (result9 !== null) { - var result0 = result9; - } else { - var savedPos0 = pos; - var savedPos1 = pos; - var result4 = parse__(); - if (result4 !== null) { - var result5 = parse_DelimitedSection(); - if (result5 !== null) { - var result6 = parse__(); - if (result6 !== null) { - var result7 = []; - var result8 = parse_AssignmentList(); - while (result8 !== null) { - result7.push(result8); - var result8 = parse_AssignmentList(); + } + + return s0; + } + + function peg$parseAssignment() { + var s0; + + s0 = peg$parseSimpleAssignment(); + if (s0 === peg$FAILED) { + s0 = peg$parseCommentedAssignment(); + } + + return s0; + } + + function peg$parseSimpleAssignment() { + var s0, s1, s2, s3, s4, s5, s6; + + s0 = peg$currPos; + s1 = peg$parseIdentifier(); + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 61) { + s3 = peg$c12; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c13); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + s5 = peg$parseValue(); + if (s5 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 59) { + s6 = peg$c14; + peg$currPos++; + } else { + s6 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c15); } } - if (result7 !== null) { - var result2 = [result4, result5, result6, result7]; + if (s6 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c16(s1, s5); + s0 = s1; } else { - var result2 = null; - pos = savedPos1; + peg$currPos = s0; + s0 = peg$c0; } } else { - var result2 = null; - pos = savedPos1; + peg$currPos = s0; + s0 = peg$c0; } } else { - var result2 = null; - pos = savedPos1; + peg$currPos = s0; + s0 = peg$c0; } } else { - var result2 = null; - pos = savedPos1; - } - var result3 = result2 !== null - ? (function(head, tail) { - if (tail) return merge(head,tail) - else return head - })(result2[1], result2[3]) - : null; - if (result3 !== null) { - var result1 = result3; - } else { - var result1 = null; - pos = savedPos0; + peg$currPos = s0; + s0 = peg$c0; } - if (result1 !== null) { - var result0 = result1; - } else { - var result0 = null;; - }; - } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_Assignment() { - var cacheKey = 'Assignment@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; - } - - - var result2 = parse_SimpleAssignment(); - if (result2 !== null) { - var result0 = result2; } else { - var result1 = parse_CommentedAssignment(); - if (result1 !== null) { - var result0 = result1; - } else { - var result0 = null;; - }; - } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_SimpleAssignment() { - var cacheKey = 'SimpleAssignment@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; + peg$currPos = s0; + s0 = peg$c0; } - - - var savedPos0 = pos; - var savedPos1 = pos; - var result3 = parse_Identifier(); - if (result3 !== null) { - var result4 = parse__(); - if (result4 !== null) { - if (input.substr(pos, 1) === "=") { - var result5 = "="; - pos += 1; - } else { - var result5 = null; - if (reportMatchFailures) { - matchFailed("\"=\""); - } - } - if (result5 !== null) { - var result6 = parse__(); - if (result6 !== null) { - var result7 = parse_Value(); - if (result7 !== null) { - if (input.substr(pos, 1) === ";") { - var result8 = ";"; - pos += 1; - } else { - var result8 = null; - if (reportMatchFailures) { - matchFailed("\";\""); - } - } - if (result8 !== null) { - var result1 = [result3, result4, result5, result6, result7, result8]; - } else { - var result1 = null; - pos = savedPos1; - } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseCommentedAssignment() { + var s0, s1, s2, s3, s4, s5, s6; + + s0 = peg$currPos; + s1 = peg$parseCommentedIdentifier(); + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 61) { + s3 = peg$c12; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c13); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + s5 = peg$parseValue(); + if (s5 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 59) { + s6 = peg$c14; + peg$currPos++; + } else { + s6 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c15); } + } + if (s6 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c17(s1, s5); + s0 = s1; } else { - var result1 = null; - pos = savedPos1; + peg$currPos = s0; + s0 = peg$c0; } } else { - var result1 = null; - pos = savedPos1; + peg$currPos = s0; + s0 = peg$c0; } } else { - var result1 = null; - pos = savedPos1; + peg$currPos = s0; + s0 = peg$c0; } } else { - var result1 = null; - pos = savedPos1; + peg$currPos = s0; + s0 = peg$c0; } } else { - var result1 = null; - pos = savedPos1; - } - var result2 = result1 !== null - ? (function(id, val) { - var result = Object.create(null); - result[id] = val - return result - })(result1[0], result1[4]) - : null; - if (result2 !== null) { - var result0 = result2; - } else { - var result0 = null; - pos = savedPos0; - } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_CommentedAssignment() { - var cacheKey = 'CommentedAssignment@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; + peg$currPos = s0; + s0 = peg$c0; } - - - var savedPos2 = pos; - var savedPos3 = pos; - var result13 = parse_CommentedIdentifier(); - if (result13 !== null) { - var result14 = parse__(); - if (result14 !== null) { - if (input.substr(pos, 1) === "=") { - var result15 = "="; - pos += 1; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseIdentifier(); + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 61) { + s3 = peg$c12; + peg$currPos++; } else { - var result15 = null; - if (reportMatchFailures) { - matchFailed("\"=\""); - } + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c13); } } - if (result15 !== null) { - var result16 = parse__(); - if (result16 !== null) { - var result17 = parse_Value(); - if (result17 !== null) { - if (input.substr(pos, 1) === ";") { - var result18 = ";"; - pos += 1; + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + s5 = peg$parseCommentedValue(); + if (s5 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 59) { + s6 = peg$c14; + peg$currPos++; } else { - var result18 = null; - if (reportMatchFailures) { - matchFailed("\";\""); - } + s6 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c15); } } - if (result18 !== null) { - var result11 = [result13, result14, result15, result16, result17, result18]; + if (s6 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c18(s1, s5); + s0 = s1; } else { - var result11 = null; - pos = savedPos3; + peg$currPos = s0; + s0 = peg$c0; } } else { - var result11 = null; - pos = savedPos3; + peg$currPos = s0; + s0 = peg$c0; } } else { - var result11 = null; - pos = savedPos3; + peg$currPos = s0; + s0 = peg$c0; } } else { - var result11 = null; - pos = savedPos3; + peg$currPos = s0; + s0 = peg$c0; } } else { - var result11 = null; - pos = savedPos3; + peg$currPos = s0; + s0 = peg$c0; } } else { - var result11 = null; - pos = savedPos3; - } - var result12 = result11 !== null - ? (function(commentedId, val) { - var result = Object.create(null), - commentKey = commentedId.id + '_comment'; - - result[commentedId.id] = val; - result[commentKey] = commentedId[commentKey]; - return result; - - })(result11[0], result11[4]) - : null; - if (result12 !== null) { - var result10 = result12; - } else { - var result10 = null; - pos = savedPos2; + peg$currPos = s0; + s0 = peg$c0; } - if (result10 !== null) { - var result0 = result10; - } else { - var savedPos0 = pos; - var savedPos1 = pos; - var result4 = parse_Identifier(); - if (result4 !== null) { - var result5 = parse__(); - if (result5 !== null) { - if (input.substr(pos, 1) === "=") { - var result6 = "="; - pos += 1; - } else { - var result6 = null; - if (reportMatchFailures) { - matchFailed("\"=\""); - } - } - if (result6 !== null) { - var result7 = parse__(); - if (result7 !== null) { - var result8 = parse_CommentedValue(); - if (result8 !== null) { - if (input.substr(pos, 1) === ";") { - var result9 = ";"; - pos += 1; - } else { - var result9 = null; - if (reportMatchFailures) { - matchFailed("\";\""); - } - } - if (result9 !== null) { - var result2 = [result4, result5, result6, result7, result8, result9]; - } else { - var result2 = null; - pos = savedPos1; - } - } else { - var result2 = null; - pos = savedPos1; - } - } else { - var result2 = null; - pos = savedPos1; - } - } else { - var result2 = null; - pos = savedPos1; - } - } else { - var result2 = null; - pos = savedPos1; - } + } + + return s0; + } + + function peg$parseCommentedIdentifier() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + s1 = peg$parseIdentifier(); + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = peg$parseInlineComment(); + if (s3 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c19(s1, s3); + s0 = s1; } else { - var result2 = null; - pos = savedPos1; + peg$currPos = s0; + s0 = peg$c0; } - var result3 = result2 !== null - ? (function(id, commentedVal) { - var result = Object.create(null); - result[id] = commentedVal.value; - result[id + "_comment"] = commentedVal.comment; - return result; - })(result2[0], result2[4]) - : null; - if (result3 !== null) { - var result1 = result3; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseCommentedValue() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + s1 = peg$parseValue(); + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = peg$parseInlineComment(); + if (s3 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c20(s1, s3); + s0 = s1; } else { - var result1 = null; - pos = savedPos0; + peg$currPos = s0; + s0 = peg$c0; } - if (result1 !== null) { - var result0 = result1; - } else { - var result0 = null;; - }; - } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_CommentedIdentifier() { - var cacheKey = 'CommentedIdentifier@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; + } else { + peg$currPos = s0; + s0 = peg$c0; } - - - var savedPos0 = pos; - var savedPos1 = pos; - var result3 = parse_Identifier(); - if (result3 !== null) { - var result4 = parse__(); - if (result4 !== null) { - var result5 = parse_InlineComment(); - if (result5 !== null) { - var result1 = [result3, result4, result5]; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseInlineComment() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + s1 = peg$parseInlineCommentOpen(); + if (s1 !== peg$FAILED) { + s2 = []; + if (peg$c21.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c22); } + } + if (s3 !== peg$FAILED) { + while (s3 !== peg$FAILED) { + s2.push(s3); + if (peg$c21.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; } else { - var result1 = null; - pos = savedPos1; + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c22); } } - } else { - var result1 = null; - pos = savedPos1; } } else { - var result1 = null; - pos = savedPos1; + s2 = peg$c0; } - var result2 = result1 !== null - ? (function(id, comment) { - var result = Object.create(null); - result.id = id; - result[id + "_comment"] = comment.trim(); - return result - })(result1[0], result1[2]) - : null; - if (result2 !== null) { - var result0 = result2; + if (s2 !== peg$FAILED) { + s3 = peg$parseInlineCommentClose(); + if (s3 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c23(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c0; + } } else { - var result0 = null; - pos = savedPos0; - } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_CommentedValue() { - var cacheKey = 'CommentedValue@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; + peg$currPos = s0; + s0 = peg$c0; } - - - var savedPos0 = pos; - var savedPos1 = pos; - var result3 = parse_Value(); - if (result3 !== null) { - var result4 = parse__(); - if (result4 !== null) { - var result5 = parse_InlineComment(); - if (result5 !== null) { - var result1 = [result3, result4, result5]; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseInlineCommentOpen() { + var s0; + + if (input.substr(peg$currPos, 2) === peg$c24) { + s0 = peg$c24; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c25); } + } + + return s0; + } + + function peg$parseInlineCommentClose() { + var s0; + + if (input.substr(peg$currPos, 2) === peg$c26) { + s0 = peg$c26; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c27); } + } + + return s0; + } + + function peg$parseDelimitedSection() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + s1 = peg$parseDelimitedSectionBegin(); + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = peg$parseAssignmentList(); + if (s3 === peg$FAILED) { + s3 = peg$parseEmptyBody(); + } + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + s5 = peg$parseDelimitedSectionEnd(); + if (s5 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c28(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c0; + } } else { - var result1 = null; - pos = savedPos1; + peg$currPos = s0; + s0 = peg$c0; } } else { - var result1 = null; - pos = savedPos1; + peg$currPos = s0; + s0 = peg$c0; } } else { - var result1 = null; - pos = savedPos1; - } - var result2 = result1 !== null - ? (function(literal, comment) { - var result = Object.create(null) - result.comment = comment.trim(); - result.value = literal.trim(); - return result; - })(result1[0], result1[2]) - : null; - if (result2 !== null) { - var result0 = result2; - } else { - var result0 = null; - pos = savedPos0; - } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_InlineComment() { - var cacheKey = 'InlineComment@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; + peg$currPos = s0; + s0 = peg$c0; } - - - var savedPos0 = pos; - var savedPos1 = pos; - var result3 = parse_InlineCommentOpen(); - if (result3 !== null) { - if (input.substr(pos).match(/^[^*]/) !== null) { - var result6 = input.charAt(pos); - pos++; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseDelimitedSectionBegin() { + var s0, s1, s2, s3, s4; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 9) === peg$c29) { + s1 = peg$c29; + peg$currPos += 9; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c30); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parseIdentifier(); + if (s2 !== peg$FAILED) { + if (input.substr(peg$currPos, 11) === peg$c31) { + s3 = peg$c31; + peg$currPos += 11; } else { - var result6 = null; - if (reportMatchFailures) { - matchFailed("[^*]"); - } + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c32); } } - if (result6 !== null) { - var result4 = []; - while (result6 !== null) { - result4.push(result6); - if (input.substr(pos).match(/^[^*]/) !== null) { - var result6 = input.charAt(pos); - pos++; - } else { - var result6 = null; - if (reportMatchFailures) { - matchFailed("[^*]"); - } - } + if (s3 !== peg$FAILED) { + s4 = peg$parseNewLine(); + if (s4 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c33(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c0; } } else { - var result4 = null; + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseDelimitedSectionEnd() { + var s0, s1, s2, s3, s4; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 7) === peg$c34) { + s1 = peg$c34; + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c35); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parseIdentifier(); + if (s2 !== peg$FAILED) { + if (input.substr(peg$currPos, 11) === peg$c31) { + s3 = peg$c31; + peg$currPos += 11; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c32); } } - if (result4 !== null) { - var result5 = parse_InlineCommentClose(); - if (result5 !== null) { - var result1 = [result3, result4, result5]; + if (s3 !== peg$FAILED) { + s4 = peg$parseNewLine(); + if (s4 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c33(s2); + s0 = s1; } else { - var result1 = null; - pos = savedPos1; + peg$currPos = s0; + s0 = peg$c0; } } else { - var result1 = null; - pos = savedPos1; + peg$currPos = s0; + s0 = peg$c0; } } else { - var result1 = null; - pos = savedPos1; - } - var result2 = result1 !== null - ? (function(body) { return body.join('') })(result1[1]) - : null; - if (result2 !== null) { - var result0 = result2; - } else { - var result0 = null; - pos = savedPos0; - } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_InlineCommentOpen() { - var cacheKey = 'InlineCommentOpen@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; + peg$currPos = s0; + s0 = peg$c0; } - - - if (input.substr(pos, 2) === "/*") { - var result0 = "/*"; - pos += 2; - } else { - var result0 = null; - if (reportMatchFailures) { - matchFailed("\"/*\""); + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseArray() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 40) { + s1 = peg$c36; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c37); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parseArrayBody(); + if (s2 === peg$FAILED) { + s2 = peg$parseEmptyArray(); + } + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 41) { + s3 = peg$c38; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c39); } } - } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_InlineCommentClose() { - var cacheKey = 'InlineCommentClose@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; - } - - - if (input.substr(pos, 2) === "*/") { - var result0 = "*/"; - pos += 2; - } else { - var result0 = null; - if (reportMatchFailures) { - matchFailed("\"*/\""); + if (s3 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c40(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c0; } + } else { + peg$currPos = s0; + s0 = peg$c0; } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_DelimitedSection() { - var cacheKey = 'DelimitedSection@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; - } - - - var savedPos0 = pos; - var savedPos1 = pos; - var result3 = parse_DelimitedSectionBegin(); - if (result3 !== null) { - var result4 = parse__(); - if (result4 !== null) { - var result9 = parse_AssignmentList(); - if (result9 !== null) { - var result5 = result9; - } else { - var result8 = parse_EmptyBody(); - if (result8 !== null) { - var result5 = result8; - } else { - var result5 = null;; - }; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseEmptyArray() { + var s0, s1; + + s0 = peg$currPos; + s1 = peg$parse_(); + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c41(); + } + s0 = s1; + + return s0; + } + + function peg$parseArrayBody() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + s1 = peg$parse_(); + if (s1 !== peg$FAILED) { + s2 = peg$parseArrayEntry(); + if (s2 !== peg$FAILED) { + s3 = peg$parse_(); + if (s3 !== peg$FAILED) { + s4 = peg$parseArrayBody(); + if (s4 === peg$FAILED) { + s4 = peg$c1; } - if (result5 !== null) { - var result6 = parse__(); - if (result6 !== null) { - var result7 = parse_DelimitedSectionEnd(); - if (result7 !== null) { - var result1 = [result3, result4, result5, result6, result7]; - } else { - var result1 = null; - pos = savedPos1; - } + if (s4 !== peg$FAILED) { + s5 = peg$parse_(); + if (s5 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c42(s2, s4); + s0 = s1; } else { - var result1 = null; - pos = savedPos1; + peg$currPos = s0; + s0 = peg$c0; } } else { - var result1 = null; - pos = savedPos1; + peg$currPos = s0; + s0 = peg$c0; } } else { - var result1 = null; - pos = savedPos1; + peg$currPos = s0; + s0 = peg$c0; } } else { - var result1 = null; - pos = savedPos1; + peg$currPos = s0; + s0 = peg$c0; } - var result2 = result1 !== null - ? (function(begin, fields) { - var section = Object.create(null); - section[begin.name] = fields - - return section - })(result1[0], result1[2]) - : null; - if (result2 !== null) { - var result0 = result2; - } else { - var result0 = null; - pos = savedPos0; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseArrayEntry() { + var s0; + + s0 = peg$parseSimpleArrayEntry(); + if (s0 === peg$FAILED) { + s0 = peg$parseCommentedArrayEntry(); + } + + return s0; + } + + function peg$parseSimpleArrayEntry() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = peg$parseValue(); + if (s1 !== peg$FAILED) { + s2 = peg$parseEndArrayEntry(); + if (s2 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c43(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c0; } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_DelimitedSectionBegin() { - var cacheKey = 'DelimitedSectionBegin@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseCommentedArrayEntry() { + var s0, s1, s2, s3, s4; + + s0 = peg$currPos; + s1 = peg$parseValue(); + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = peg$parseInlineComment(); + if (s3 !== peg$FAILED) { + s4 = peg$parseEndArrayEntry(); + if (s4 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c44(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + } else { + peg$currPos = s0; + s0 = peg$c0; } - - - var savedPos0 = pos; - var savedPos1 = pos; - if (input.substr(pos, 9) === "/* Begin ") { - var result3 = "/* Begin "; - pos += 9; - } else { - var result3 = null; - if (reportMatchFailures) { - matchFailed("\"/* Begin \""); - } - } - if (result3 !== null) { - var result4 = parse_Identifier(); - if (result4 !== null) { - if (input.substr(pos, 11) === " section */") { - var result5 = " section */"; - pos += 11; - } else { - var result5 = null; - if (reportMatchFailures) { - matchFailed("\" section */\""); - } - } - if (result5 !== null) { - var result6 = parse_NewLine(); - if (result6 !== null) { - var result1 = [result3, result4, result5, result6]; - } else { - var result1 = null; - pos = savedPos1; - } - } else { - var result1 = null; - pos = savedPos1; - } - } else { - var result1 = null; - pos = savedPos1; - } - } else { - var result1 = null; - pos = savedPos1; - } - var result2 = result1 !== null - ? (function(sectionName) { return { name: sectionName } })(result1[1]) - : null; - if (result2 !== null) { - var result0 = result2; - } else { - var result0 = null; - pos = savedPos0; - } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_DelimitedSectionEnd() { - var cacheKey = 'DelimitedSectionEnd@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; - } - - - var savedPos0 = pos; - var savedPos1 = pos; - if (input.substr(pos, 7) === "/* End ") { - var result3 = "/* End "; - pos += 7; - } else { - var result3 = null; - if (reportMatchFailures) { - matchFailed("\"/* End \""); - } - } - if (result3 !== null) { - var result4 = parse_Identifier(); - if (result4 !== null) { - if (input.substr(pos, 11) === " section */") { - var result5 = " section */"; - pos += 11; - } else { - var result5 = null; - if (reportMatchFailures) { - matchFailed("\" section */\""); - } - } - if (result5 !== null) { - var result6 = parse_NewLine(); - if (result6 !== null) { - var result1 = [result3, result4, result5, result6]; - } else { - var result1 = null; - pos = savedPos1; - } - } else { - var result1 = null; - pos = savedPos1; - } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseEndArrayEntry() { + var s0, s1, s2, s3; + + if (input.charCodeAt(peg$currPos) === 44) { + s0 = peg$c45; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c46); } + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parse_(); + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + if (input.charCodeAt(peg$currPos) === 41) { + s3 = peg$c38; + peg$currPos++; } else { - var result1 = null; - pos = savedPos1; + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c39); } } - } else { - var result1 = null; - pos = savedPos1; - } - var result2 = result1 !== null - ? (function(sectionName) { return { name: sectionName } })(result1[1]) - : null; - if (result2 !== null) { - var result0 = result2; - } else { - var result0 = null; - pos = savedPos0; - } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_Array() { - var cacheKey = 'Array@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; - } - - - var savedPos0 = pos; - var savedPos1 = pos; - if (input.substr(pos, 1) === "(") { - var result3 = "("; - pos += 1; - } else { - var result3 = null; - if (reportMatchFailures) { - matchFailed("\"(\""); - } - } - if (result3 !== null) { - var result7 = parse_ArrayBody(); - if (result7 !== null) { - var result4 = result7; + peg$silentFails--; + if (s3 !== peg$FAILED) { + peg$currPos = s2; + s2 = peg$c47; } else { - var result6 = parse_EmptyArray(); - if (result6 !== null) { - var result4 = result6; - } else { - var result4 = null;; - }; + s2 = peg$c0; } - if (result4 !== null) { - if (input.substr(pos, 1) === ")") { - var result5 = ")"; - pos += 1; - } else { - var result5 = null; - if (reportMatchFailures) { - matchFailed("\")\""); - } - } - if (result5 !== null) { - var result1 = [result3, result4, result5]; - } else { - var result1 = null; - pos = savedPos1; - } + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; } else { - var result1 = null; - pos = savedPos1; + peg$currPos = s0; + s0 = peg$c0; } } else { - var result1 = null; - pos = savedPos1; - } - var result2 = result1 !== null - ? (function(arr) { return arr })(result1[1]) - : null; - if (result2 !== null) { - var result0 = result2; - } else { - var result0 = null; - pos = savedPos0; - } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_EmptyArray() { - var cacheKey = 'EmptyArray@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; + peg$currPos = s0; + s0 = peg$c0; } - - - var savedPos0 = pos; - var result1 = parse__(); - var result2 = result1 !== null - ? (function() { return [] })() - : null; - if (result2 !== null) { - var result0 = result2; - } else { - var result0 = null; - pos = savedPos0; - } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_ArrayBody() { - var cacheKey = 'ArrayBody@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; - } - - - var savedPos0 = pos; - var savedPos1 = pos; - var result3 = parse__(); - if (result3 !== null) { - var result4 = parse_ArrayEntry(); - if (result4 !== null) { - var result5 = parse__(); - if (result5 !== null) { - var result8 = parse_ArrayBody(); - var result6 = result8 !== null ? result8 : ''; - if (result6 !== null) { - var result7 = parse__(); - if (result7 !== null) { - var result1 = [result3, result4, result5, result6, result7]; - } else { - var result1 = null; - pos = savedPos1; - } - } else { - var result1 = null; - pos = savedPos1; - } - } else { - var result1 = null; - pos = savedPos1; - } + } + + return s0; + } + + function peg$parseIdentifier() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = []; + if (peg$c48.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c49); } + } + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + if (peg$c48.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; } else { - var result1 = null; - pos = savedPos1; + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c49); } } - } else { - var result1 = null; - pos = savedPos1; - } - var result2 = result1 !== null - ? (function(head, tail) { - if (tail) { - tail.unshift(head); - return tail; - } else { - return [head]; - } - })(result1[1], result1[3]) - : null; - if (result2 !== null) { - var result0 = result2; - } else { - var result0 = null; - pos = savedPos0; } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_ArrayEntry() { - var cacheKey = 'ArrayEntry@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; - } - - - var result2 = parse_SimpleArrayEntry(); - if (result2 !== null) { - var result0 = result2; - } else { - var result1 = parse_CommentedArrayEntry(); - if (result1 !== null) { - var result0 = result1; - } else { - var result0 = null;; - }; - } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_SimpleArrayEntry() { - var cacheKey = 'SimpleArrayEntry@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; - } - - - var savedPos0 = pos; - var savedPos1 = pos; - var result3 = parse_Value(); - if (result3 !== null) { - if (input.substr(pos, 1) === ",") { - var result4 = ","; - pos += 1; - } else { - var result4 = null; - if (reportMatchFailures) { - matchFailed("\",\""); - } - } - if (result4 !== null) { - var result1 = [result3, result4]; - } else { - var result1 = null; - pos = savedPos1; + } else { + s1 = peg$c0; + } + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c50(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$parseQuotedString(); + } + + return s0; + } + + function peg$parseValue() { + var s0; + + s0 = peg$parseObject(); + if (s0 === peg$FAILED) { + s0 = peg$parseArray(); + if (s0 === peg$FAILED) { + s0 = peg$parseNumberValue(); + if (s0 === peg$FAILED) { + s0 = peg$parseStringValue(); } - } else { - var result1 = null; - pos = savedPos1; - } - var result2 = result1 !== null - ? (function(val) { return val })(result1[0]) - : null; - if (result2 !== null) { - var result0 = result2; - } else { - var result0 = null; - pos = savedPos0; - } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_CommentedArrayEntry() { - var cacheKey = 'CommentedArrayEntry@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; } - - - var savedPos0 = pos; - var savedPos1 = pos; - var result3 = parse_Value(); - if (result3 !== null) { - var result4 = parse__(); - if (result4 !== null) { - var result5 = parse_InlineComment(); - if (result5 !== null) { - if (input.substr(pos, 1) === ",") { - var result6 = ","; - pos += 1; - } else { - var result6 = null; - if (reportMatchFailures) { - matchFailed("\",\""); - } - } - if (result6 !== null) { - var result1 = [result3, result4, result5, result6]; - } else { - var result1 = null; - pos = savedPos1; - } - } else { - var result1 = null; - pos = savedPos1; - } + } + + return s0; + } + + function peg$parseNumberValue() { + var s0; + + s0 = peg$parseDecimalValue(); + if (s0 === peg$FAILED) { + s0 = peg$parseIntegerValue(); + } + + return s0; + } + + function peg$parseDecimalValue() { + var s0, s1, s2, s3, s4; + + s0 = peg$currPos; + s1 = peg$currPos; + s2 = peg$parseIntegerValue(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 46) { + s3 = peg$c51; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c52); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parseIntegerValue(); + if (s4 !== peg$FAILED) { + s2 = [s2, s3, s4]; + s1 = s2; } else { - var result1 = null; - pos = savedPos1; - } - } else { - var result1 = null; - pos = savedPos1; - } - var result2 = result1 !== null - ? (function(val, comment) { - var result = Object.create(null); - result.value = val.trim(); - result.comment = comment.trim(); - return result; - })(result1[0], result1[2]) - : null; - if (result2 !== null) { - var result0 = result2; - } else { - var result0 = null; - pos = savedPos0; - } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_Identifier() { - var cacheKey = 'Identifier@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; - } - - - var savedPos0 = pos; - if (input.substr(pos).match(/^[A-Za-z0-9_.]/) !== null) { - var result5 = input.charAt(pos); - pos++; - } else { - var result5 = null; - if (reportMatchFailures) { - matchFailed("[A-Za-z0-9_.]"); - } - } - if (result5 !== null) { - var result3 = []; - while (result5 !== null) { - result3.push(result5); - if (input.substr(pos).match(/^[A-Za-z0-9_.]/) !== null) { - var result5 = input.charAt(pos); - pos++; - } else { - var result5 = null; - if (reportMatchFailures) { - matchFailed("[A-Za-z0-9_.]"); - } - } + peg$currPos = s1; + s1 = peg$c0; } } else { - var result3 = null; - } - var result4 = result3 !== null - ? (function(id) { return id.join('') })(result3) - : null; - if (result4 !== null) { - var result2 = result4; - } else { - var result2 = null; - pos = savedPos0; - } - if (result2 !== null) { - var result0 = result2; - } else { - var result1 = parse_QuotedString(); - if (result1 !== null) { - var result0 = result1; - } else { - var result0 = null;; - }; - } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_Value() { - var cacheKey = 'Value@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; - } - - - var result4 = parse_Object(); - if (result4 !== null) { - var result0 = result4; - } else { - var result3 = parse_Array(); - if (result3 !== null) { - var result0 = result3; - } else { - var result2 = parse_NumberValue(); - if (result2 !== null) { - var result0 = result2; - } else { - var result1 = parse_StringValue(); - if (result1 !== null) { - var result0 = result1; - } else { - var result0 = null;; - }; - }; - }; - } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_NumberValue() { - var cacheKey = 'NumberValue@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; - } - - - var result2 = parse_DecimalValue(); - if (result2 !== null) { - var result0 = result2; - } else { - var result1 = parse_IntegerValue(); - if (result1 !== null) { - var result0 = result1; - } else { - var result0 = null;; - }; - } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_DecimalValue() { - var cacheKey = 'DecimalValue@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; + peg$currPos = s1; + s1 = peg$c0; } - - - var savedPos0 = pos; - var savedPos1 = pos; - var result3 = parse_IntegerValue(); - if (result3 !== null) { - if (input.substr(pos, 1) === ".") { - var result4 = "."; - pos += 1; - } else { - var result4 = null; - if (reportMatchFailures) { - matchFailed("\".\""); - } - } - if (result4 !== null) { - var result5 = parse_IntegerValue(); - if (result5 !== null) { - var result1 = [result3, result4, result5]; - } else { - var result1 = null; - pos = savedPos1; - } - } else { - var result1 = null; - pos = savedPos1; + } else { + peg$currPos = s1; + s1 = peg$c0; + } + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c53(s1); + } + s0 = s1; + + return s0; + } + + function peg$parseIntegerValue() { + var s0, s1, s2, s3, s4; + + s0 = peg$currPos; + s1 = peg$currPos; + peg$silentFails++; + s2 = peg$parseAlpha(); + peg$silentFails--; + if (s2 === peg$FAILED) { + s1 = peg$c47; + } else { + peg$currPos = s1; + s1 = peg$c0; + } + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parseDigit(); + if (s3 !== peg$FAILED) { + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parseDigit(); } } else { - var result1 = null; - pos = savedPos1; - } - var result2 = result1 !== null - ? (function(decimal) { - // store decimals as strings - // as JS doesn't differentiate bw strings and numbers - return decimal.join('') - })(result1) - : null; - if (result2 !== null) { - var result0 = result2; - } else { - var result0 = null; - pos = savedPos0; + s2 = peg$c0; } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_IntegerValue() { - var cacheKey = 'IntegerValue@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; - } - - - var savedPos0 = pos; - var savedPos1 = pos; - var savedPos3 = pos; - var savedReportMatchFailuresVar1 = reportMatchFailures; - reportMatchFailures = false; - var result8 = parse_Alpha(); - reportMatchFailures = savedReportMatchFailuresVar1; - if (result8 === null) { - var result3 = ''; - } else { - var result3 = null; - pos = savedPos3; - } - if (result3 !== null) { - var result7 = parse_Digit(); - if (result7 !== null) { - var result4 = []; - while (result7 !== null) { - result4.push(result7); - var result7 = parse_Digit(); - } + if (s2 !== peg$FAILED) { + s3 = peg$currPos; + peg$silentFails++; + s4 = peg$parseNonTerminator(); + peg$silentFails--; + if (s4 === peg$FAILED) { + s3 = peg$c47; } else { - var result4 = null; + peg$currPos = s3; + s3 = peg$c0; } - if (result4 !== null) { - var savedPos2 = pos; - var savedReportMatchFailuresVar0 = reportMatchFailures; - reportMatchFailures = false; - var result6 = parse_NonTerminator(); - reportMatchFailures = savedReportMatchFailuresVar0; - if (result6 === null) { - var result5 = ''; - } else { - var result5 = null; - pos = savedPos2; - } - if (result5 !== null) { - var result1 = [result3, result4, result5]; - } else { - var result1 = null; - pos = savedPos1; - } + if (s3 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c54(s2); + s0 = s1; } else { - var result1 = null; - pos = savedPos1; + peg$currPos = s0; + s0 = peg$c0; } } else { - var result1 = null; - pos = savedPos1; - } - var result2 = result1 !== null - ? (function(number) { return parseInt(number.join(''), 10) })(result1[1]) - : null; - if (result2 !== null) { - var result0 = result2; - } else { - var result0 = null; - pos = savedPos0; - } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_StringValue() { - var cacheKey = 'StringValue@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; + peg$currPos = s0; + s0 = peg$c0; } - - - var result2 = parse_QuotedString(); - if (result2 !== null) { - var result0 = result2; - } else { - var result1 = parse_LiteralString(); - if (result1 !== null) { - var result0 = result1; - } else { - var result0 = null;; - }; - } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_QuotedString() { - var cacheKey = 'QuotedString@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; - } - - - var savedPos0 = pos; - var savedPos1 = pos; - var result3 = parse_DoubleQuote(); - if (result3 !== null) { - var result4 = parse_QuotedBody(); - if (result4 !== null) { - var result5 = parse_DoubleQuote(); - if (result5 !== null) { - var result1 = [result3, result4, result5]; - } else { - var result1 = null; - pos = savedPos1; - } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseStringValue() { + var s0; + + s0 = peg$parseQuotedString(); + if (s0 === peg$FAILED) { + s0 = peg$parseLiteralString(); + } + + return s0; + } + + function peg$parseQuotedString() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + s1 = peg$parseDoubleQuote(); + if (s1 !== peg$FAILED) { + s2 = peg$parseQuotedBody(); + if (s2 !== peg$FAILED) { + s3 = peg$parseDoubleQuote(); + if (s3 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c55(s2); + s0 = s1; } else { - var result1 = null; - pos = savedPos1; + peg$currPos = s0; + s0 = peg$c0; } } else { - var result1 = null; - pos = savedPos1; - } - var result2 = result1 !== null - ? (function(str) { return '"' + str + '"' })(result1[1]) - : null; - if (result2 !== null) { - var result0 = result2; - } else { - var result0 = null; - pos = savedPos0; + peg$currPos = s0; + s0 = peg$c0; } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_QuotedBody() { - var cacheKey = 'QuotedBody@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; - } - - - var savedPos0 = pos; - var result3 = parse_NonQuote(); - if (result3 !== null) { - var result1 = []; - while (result3 !== null) { - result1.push(result3); - var result3 = parse_NonQuote(); - } - } else { - var result1 = null; - } - var result2 = result1 !== null - ? (function(str) { return str.join('') })(result1) - : null; - if (result2 !== null) { - var result0 = result2; - } else { - var result0 = null; - pos = savedPos0; - } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_NonQuote() { - var cacheKey = 'NonQuote@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseQuotedBody() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = []; + s2 = peg$parseNonQuote(); + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseNonQuote(); } - - - var result7 = parse_EscapedQuote(); - if (result7 !== null) { - var result0 = result7; - } else { - var savedPos0 = pos; - var savedPos1 = pos; - var savedPos2 = pos; - var savedReportMatchFailuresVar0 = reportMatchFailures; - reportMatchFailures = false; - var result6 = parse_DoubleQuote(); - reportMatchFailures = savedReportMatchFailuresVar0; - if (result6 === null) { - var result4 = ''; - } else { - var result4 = null; - pos = savedPos2; - } - if (result4 !== null) { - if (input.length > pos) { - var result5 = input.charAt(pos); - pos++; - } else { - var result5 = null; - if (reportMatchFailures) { - matchFailed('any character'); - } - } - if (result5 !== null) { - var result2 = [result4, result5]; - } else { - var result2 = null; - pos = savedPos1; - } - } else { - var result2 = null; - pos = savedPos1; - } - var result3 = result2 !== null - ? (function(char) { return char })(result2[1]) - : null; - if (result3 !== null) { - var result1 = result3; - } else { - var result1 = null; - pos = savedPos0; - } - if (result1 !== null) { - var result0 = result1; + } else { + s1 = peg$c0; + } + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c56(s1); + } + s0 = s1; + + return s0; + } + + function peg$parseNonQuote() { + var s0, s1, s2; + + s0 = peg$parseEscapedQuote(); + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$currPos; + peg$silentFails++; + s2 = peg$parseDoubleQuote(); + peg$silentFails--; + if (s2 === peg$FAILED) { + s1 = peg$c47; + } else { + peg$currPos = s1; + s1 = peg$c0; + } + if (s1 !== peg$FAILED) { + if (input.length > peg$currPos) { + s2 = input.charAt(peg$currPos); + peg$currPos++; } else { - var result0 = null;; - }; - } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_EscapedQuote() { - var cacheKey = 'EscapedQuote@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; - } - - - var savedPos0 = pos; - var savedPos1 = pos; - if (input.substr(pos, 1) === "\\") { - var result3 = "\\"; - pos += 1; - } else { - var result3 = null; - if (reportMatchFailures) { - matchFailed("\"\\\\\""); + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c57); } } - } - if (result3 !== null) { - var result4 = parse_DoubleQuote(); - if (result4 !== null) { - var result1 = [result3, result4]; + if (s2 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c58(s2); + s0 = s1; } else { - var result1 = null; - pos = savedPos1; + peg$currPos = s0; + s0 = peg$c0; } } else { - var result1 = null; - pos = savedPos1; + peg$currPos = s0; + s0 = peg$c0; } - var result2 = result1 !== null - ? (function() { return '\\"' })() - : null; - if (result2 !== null) { - var result0 = result2; - } else { - var result0 = null; - pos = savedPos0; - } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_LiteralString() { - var cacheKey = 'LiteralString@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; - } - - - var savedPos0 = pos; - var result3 = parse_LiteralChar(); - if (result3 !== null) { - var result1 = []; - while (result3 !== null) { - result1.push(result3); - var result3 = parse_LiteralChar(); - } - } else { - var result1 = null; - } - var result2 = result1 !== null - ? (function(literal) { return literal.join('') })(result1) - : null; - if (result2 !== null) { - var result0 = result2; + } + + return s0; + } + + function peg$parseEscapedQuote() { + var s0, s1, s2; + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 92) { + s1 = peg$c59; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c60); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parseDoubleQuote(); + if (s2 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c61(); + s0 = s1; } else { - var result0 = null; - pos = savedPos0; - } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_LiteralChar() { - var cacheKey = 'LiteralChar@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; + peg$currPos = s0; + s0 = peg$c0; } - - - var savedPos0 = pos; - var savedPos1 = pos; - var savedPos3 = pos; - var savedReportMatchFailuresVar1 = reportMatchFailures; - reportMatchFailures = false; - var result7 = parse_InlineCommentOpen(); - reportMatchFailures = savedReportMatchFailuresVar1; - if (result7 === null) { - var result3 = ''; - } else { - var result3 = null; - pos = savedPos3; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseLiteralString() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = []; + s2 = peg$parseLiteralChar(); + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseLiteralChar(); } - if (result3 !== null) { - var savedPos2 = pos; - var savedReportMatchFailuresVar0 = reportMatchFailures; - reportMatchFailures = false; - var result6 = parse_LineTerminator(); - reportMatchFailures = savedReportMatchFailuresVar0; - if (result6 === null) { - var result4 = ''; - } else { - var result4 = null; - pos = savedPos2; - } - if (result4 !== null) { - var result5 = parse_NonTerminator(); - if (result5 !== null) { - var result1 = [result3, result4, result5]; - } else { - var result1 = null; - pos = savedPos1; - } + } else { + s1 = peg$c0; + } + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c62(s1); + } + s0 = s1; + + return s0; + } + + function peg$parseLiteralChar() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + s1 = peg$currPos; + peg$silentFails++; + s2 = peg$parseInlineCommentOpen(); + peg$silentFails--; + if (s2 === peg$FAILED) { + s1 = peg$c47; + } else { + peg$currPos = s1; + s1 = peg$c0; + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseLineTerminator(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = peg$c47; + } else { + peg$currPos = s2; + s2 = peg$c0; + } + if (s2 !== peg$FAILED) { + s3 = peg$parseNonTerminator(); + if (s3 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c58(s3); + s0 = s1; } else { - var result1 = null; - pos = savedPos1; + peg$currPos = s0; + s0 = peg$c0; } } else { - var result1 = null; - pos = savedPos1; - } - var result2 = result1 !== null - ? (function(char) { return char })(result1[2]) - : null; - if (result2 !== null) { - var result0 = result2; - } else { - var result0 = null; - pos = savedPos0; - } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_NonTerminator() { - var cacheKey = 'NonTerminator@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; - } - - - if (input.substr(pos).match(/^[^;,\n]/) !== null) { - var result0 = input.charAt(pos); - pos++; - } else { - var result0 = null; - if (reportMatchFailures) { - matchFailed("[^;,\\n]"); - } - } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_SingleLineComment() { - var cacheKey = 'SingleLineComment@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; - } - - - var savedPos0 = pos; - var savedPos1 = pos; - if (input.substr(pos, 2) === "//") { - var result3 = "//"; - pos += 2; - } else { - var result3 = null; - if (reportMatchFailures) { - matchFailed("\"//\""); - } + peg$currPos = s0; + s0 = peg$c0; } - if (result3 !== null) { - var result4 = parse__(); - if (result4 !== null) { - var result5 = parse_OneLineString(); - if (result5 !== null) { - var result6 = parse_NewLine(); - if (result6 !== null) { - var result1 = [result3, result4, result5, result6]; - } else { - var result1 = null; - pos = savedPos1; - } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseNonTerminator() { + var s0; + + if (peg$c63.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c64); } + } + + return s0; + } + + function peg$parseSingleLineComment() { + var s0, s1, s2, s3, s4; + + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c65) { + s1 = peg$c65; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c66); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = peg$parseOneLineString(); + if (s3 !== peg$FAILED) { + s4 = peg$parseNewLine(); + if (s4 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c67(s3); + s0 = s1; } else { - var result1 = null; - pos = savedPos1; + peg$currPos = s0; + s0 = peg$c0; } } else { - var result1 = null; - pos = savedPos1; + peg$currPos = s0; + s0 = peg$c0; } } else { - var result1 = null; - pos = savedPos1; - } - var result2 = result1 !== null - ? (function(contents) { return contents })(result1[2]) - : null; - if (result2 !== null) { - var result0 = result2; - } else { - var result0 = null; - pos = savedPos0; - } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_OneLineString() { - var cacheKey = 'OneLineString@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; - } - - - var savedPos0 = pos; - var result1 = []; - var result3 = parse_NonLine(); - while (result3 !== null) { - result1.push(result3); - var result3 = parse_NonLine(); - } - var result2 = result1 !== null - ? (function(contents) { return contents.join('') })(result1) - : null; - if (result2 !== null) { - var result0 = result2; - } else { - var result0 = null; - pos = savedPos0; - } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_Digit() { - var cacheKey = 'Digit@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; - } - - - if (input.substr(pos).match(/^[0-9]/) !== null) { - var result0 = input.charAt(pos); - pos++; - } else { - var result0 = null; - if (reportMatchFailures) { - matchFailed("[0-9]"); - } + peg$currPos = s0; + s0 = peg$c0; } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_Alpha() { - var cacheKey = 'Alpha@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; - } - - - if (input.substr(pos).match(/^[A-Za-z]/) !== null) { - var result0 = input.charAt(pos); - pos++; - } else { - var result0 = null; - if (reportMatchFailures) { - matchFailed("[A-Za-z]"); - } - } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_DoubleQuote() { - var cacheKey = 'DoubleQuote@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; - } - - - if (input.substr(pos, 1) === "\"") { - var result0 = "\""; - pos += 1; - } else { - var result0 = null; - if (reportMatchFailures) { - matchFailed("\"\\\"\""); - } - } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse__() { - var cacheKey = '_@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; - } - - var savedReportMatchFailures = reportMatchFailures; - reportMatchFailures = false; - var result0 = []; - var result1 = parse_whitespace(); - while (result1 !== null) { - result0.push(result1); - var result1 = parse_whitespace(); - } - reportMatchFailures = savedReportMatchFailures; - if (reportMatchFailures && result0 === null) { - matchFailed("whitespace"); - } - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_whitespace() { - var cacheKey = 'whitespace@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; - } - - - var result2 = parse_NewLine(); - if (result2 !== null) { - var result0 = result2; - } else { - if (input.substr(pos).match(/^[ ]/) !== null) { - var result1 = input.charAt(pos); - pos++; - } else { - var result1 = null; - if (reportMatchFailures) { - matchFailed("[ ]"); - } - } - if (result1 !== null) { - var result0 = result1; - } else { - var result0 = null;; - }; - } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_NonLine() { - var cacheKey = 'NonLine@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; - } - - - var savedPos0 = pos; - var savedPos1 = pos; - var savedPos2 = pos; - var savedReportMatchFailuresVar0 = reportMatchFailures; - reportMatchFailures = false; - var result5 = parse_NewLine(); - reportMatchFailures = savedReportMatchFailuresVar0; - if (result5 === null) { - var result3 = ''; - } else { - var result3 = null; - pos = savedPos2; - } - if (result3 !== null) { - var result4 = parse_Char(); - if (result4 !== null) { - var result1 = [result3, result4]; - } else { - var result1 = null; - pos = savedPos1; - } - } else { - var result1 = null; - pos = savedPos1; - } - var result2 = result1 !== null - ? (function(char) { return char })(result1[1]) - : null; - if (result2 !== null) { - var result0 = result2; - } else { - var result0 = null; - pos = savedPos0; - } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_LineTerminator() { - var cacheKey = 'LineTerminator@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; - } - - - var result2 = parse_NewLine(); - if (result2 !== null) { - var result0 = result2; - } else { - if (input.substr(pos, 1) === ";") { - var result1 = ";"; - pos += 1; - } else { - var result1 = null; - if (reportMatchFailures) { - matchFailed("\";\""); - } - } - if (result1 !== null) { - var result0 = result1; - } else { - var result0 = null;; - }; - } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_NewLine() { - var cacheKey = 'NewLine@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; - } - - - if (input.substr(pos).match(/^[\n\r]/) !== null) { - var result0 = input.charAt(pos); - pos++; - } else { - var result0 = null; - if (reportMatchFailures) { - matchFailed("[\\n\\r]"); - } - } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function parse_Char() { - var cacheKey = 'Char@' + pos; - var cachedResult = cache[cacheKey]; - if (cachedResult) { - pos = cachedResult.nextPos; - return cachedResult.result; + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseOneLineString() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = []; + s2 = peg$parseNonLine(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseNonLine(); + } + if (s1 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c68(s1); + } + s0 = s1; + + return s0; + } + + function peg$parseDigit() { + var s0; + + if (peg$c69.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c70); } + } + + return s0; + } + + function peg$parseAlpha() { + var s0; + + if (peg$c71.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c72); } + } + + return s0; + } + + function peg$parseDoubleQuote() { + var s0; + + if (input.charCodeAt(peg$currPos) === 34) { + s0 = peg$c73; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c74); } + } + + return s0; + } + + function peg$parse_() { + var s0, s1; + + peg$silentFails++; + s0 = []; + s1 = peg$parsewhitespace(); + while (s1 !== peg$FAILED) { + s0.push(s1); + s1 = peg$parsewhitespace(); + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c75); } + } + + return s0; + } + + function peg$parsewhitespace() { + var s0; + + s0 = peg$parseNewLine(); + if (s0 === peg$FAILED) { + if (peg$c76.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c77); } } - - - if (input.length > pos) { - var result0 = input.charAt(pos); - pos++; + } + + return s0; + } + + function peg$parseNonLine() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = peg$currPos; + peg$silentFails++; + s2 = peg$parseNewLine(); + peg$silentFails--; + if (s2 === peg$FAILED) { + s1 = peg$c47; + } else { + peg$currPos = s1; + s1 = peg$c0; + } + if (s1 !== peg$FAILED) { + s2 = peg$parseChar(); + if (s2 !== peg$FAILED) { + peg$reportedPos = s0; + s1 = peg$c58(s2); + s0 = s1; } else { - var result0 = null; - if (reportMatchFailures) { - matchFailed('any character'); - } - } - - - - cache[cacheKey] = { - nextPos: pos, - result: result0 - }; - return result0; - } - - function buildErrorMessage() { - function buildExpected(failuresExpected) { - failuresExpected.sort(); - - var lastFailure = null; - var failuresExpectedUnique = []; - for (var i = 0; i < failuresExpected.length; i++) { - if (failuresExpected[i] !== lastFailure) { - failuresExpectedUnique.push(failuresExpected[i]); - lastFailure = failuresExpected[i]; - } - } - - switch (failuresExpectedUnique.length) { - case 0: - return 'end of input'; - case 1: - return failuresExpectedUnique[0]; - default: - return failuresExpectedUnique.slice(0, failuresExpectedUnique.length - 1).join(', ') - + ' or ' - + failuresExpectedUnique[failuresExpectedUnique.length - 1]; - } + peg$currPos = s0; + s0 = peg$c0; } - - var expected = buildExpected(rightmostMatchFailuresExpected); - var actualPos = Math.max(pos, rightmostMatchFailuresPos); - var actual = actualPos < input.length - ? quote(input.charAt(actualPos)) - : 'end of input'; - - return 'Expected ' + expected + ' but ' + actual + ' found.'; - } - - function computeErrorPosition() { - /* - * The first idea was to use |String.split| to break the input up to the - * error position along newlines and derive the line and column from - * there. However IE's |split| implementation is so broken that it was - * enough to prevent it. - */ - - var line = 1; - var column = 1; - var seenCR = false; - - for (var i = 0; i < rightmostMatchFailuresPos; i++) { - var ch = input.charAt(i); - if (ch === '\n') { - if (!seenCR) { line++; } - column = 1; - seenCR = false; - } else if (ch === '\r' | ch === '\u2028' || ch === '\u2029') { - line++; - column = 1; - seenCR = true; - } else { - column++; - seenCR = false; - } + } else { + peg$currPos = s0; + s0 = peg$c0; + } + + return s0; + } + + function peg$parseLineTerminator() { + var s0; + + s0 = peg$parseNewLine(); + if (s0 === peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 59) { + s0 = peg$c14; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c15); } } - - return { line: line, column: column }; } - - - + + return s0; + } + + function peg$parseNewLine() { + var s0; + + if (peg$c78.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c79); } + } + + return s0; + } + + function peg$parseChar() { + var s0; + + if (input.length > peg$currPos) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c57); } + } + + return s0; + } + + function merge(hash, secondHash) { - secondHash = secondHash[0] - - for(var i in secondHash) - - hash[i] = secondHash[i] - - - + for(var i in secondHash) { + hash[i] = merge_obj(hash[i], secondHash[i]); + } + return hash; - } - - - - var result = parseFunctions[startRule](); - - /* - * The parser is now in one of the following three states: - * - * 1. The parser successfully parsed the whole input. - * - * - |result !== null| - * - |pos === input.length| - * - |rightmostMatchFailuresExpected| may or may not contain something - * - * 2. The parser successfully parsed only a part of the input. - * - * - |result !== null| - * - |pos < input.length| - * - |rightmostMatchFailuresExpected| may or may not contain something - * - * 3. The parser did not successfully parse any part of the input. - * - * - |result === null| - * - |pos === 0| - * - |rightmostMatchFailuresExpected| contains at least one failure - * - * All code following this comment (including called functions) must - * handle these states. - */ - if (result === null || pos !== input.length) { - var errorPosition = computeErrorPosition(); - throw new this.SyntaxError( - buildErrorMessage(), - errorPosition.line, - errorPosition.column - ); - } - - return result; - }, - - /* Returns the parser source code. */ - toSource: function() { return this._source; } - }; - - /* Thrown when a parser encounters a syntax error. */ - - result.SyntaxError = function(message, line, column) { - this.name = 'SyntaxError'; - this.message = message; - this.line = line; - this.column = column; + + function merge_obj(obj, secondObj) { + if (!obj) + return secondObj; + + for(var i in secondObj) + obj[i] = merge_obj(obj[i], secondObj[i]); + + return obj; + } + + + peg$result = peg$startRuleFunction(); + + if (peg$result !== peg$FAILED && peg$currPos === input.length) { + return peg$result; + } else { + if (peg$result !== peg$FAILED && peg$currPos < input.length) { + peg$fail({ type: "end", description: "end of input" }); + } + + throw peg$buildException(null, peg$maxFailExpected, peg$maxFailPos); + } + } + + return { + SyntaxError: SyntaxError, + parse: parse }; - - result.SyntaxError.prototype = Error.prototype; - - return result; })(); diff --git a/lib/parser/pbxproj.pegjs b/lib/parser/pbxproj.pegjs index 419a2c3..5140c05 100644 --- a/lib/parser/pbxproj.pegjs +++ b/lib/parser/pbxproj.pegjs @@ -1,11 +1,22 @@ { function merge(hash, secondHash) { secondHash = secondHash[0] - for(var i in secondHash) - hash[i] = secondHash[i] + for(var i in secondHash) { + hash[i] = merge_obj(hash[i], secondHash[i]); + } return hash; } + + function merge_obj(obj, secondObj) { + if (!obj) + return secondObj; + + for(var i in secondObj) + obj[i] = merge_obj(obj[i], secondObj[i]); + + return obj; + } } /* @@ -155,10 +166,10 @@ ArrayEntry = SimpleArrayEntry / CommentedArrayEntry SimpleArrayEntry - = val:Value "," { return val } + = val:Value EndArrayEntry { return val } CommentedArrayEntry - = val:Value _ comment:InlineComment "," + = val:Value _ comment:InlineComment EndArrayEntry { var result = Object.create(null); result.value = val.trim(); @@ -166,6 +177,9 @@ CommentedArrayEntry return result; } +EndArrayEntry + = "," / _ &")" + /* * Identifiers and Values */ diff --git a/lib/pbxFile.js b/lib/pbxFile.js index 7f51e10..8a2723b 100644 --- a/lib/pbxFile.js +++ b/lib/pbxFile.js @@ -1,10 +1,11 @@ var path = require('path'), + util = require('util'), M_EXTENSION = /[.]m$/, SOURCE_FILE = 'sourcecode.c.objc', H_EXTENSION = /[.]h$/, HEADER_FILE = 'sourcecode.c.h', BUNDLE_EXTENSION = /[.]bundle$/, BUNDLE = '"wrapper.plug-in"', XIB_EXTENSION = /[.]xib$/, XIB_FILE = 'file.xib', DYLIB_EXTENSION = /[.]dylib$/, DYLIB = '"compiled.mach-o.dylib"', - FRAMEWORK_EXTENSION = /[.]framework/, FRAMEWORK = 'wrapper.framework', + FRAMEWORK_EXTENSION = /[.]framework$/, FRAMEWORK = 'wrapper.framework', ARCHIVE_EXTENSION = /[.]a$/, ARCHIVE = 'archive.ar', PNG_EXTENSION = /[.]png/, PNG_IMAGE = "image.png", DEFAULT_SOURCE_TREE = '""', @@ -97,7 +98,7 @@ function pbxFile(filepath, opt) { if (opt.compilerFlags) { if (!this.settings) this.settings = {}; - this.settings.COMPILER_FLAGS = opt.compilerFlags; + this.settings.COMPILER_FLAGS = util.format('"%s"', opt.compilerFlags); } } diff --git a/lib/pbxProject.js b/lib/pbxProject.js index bd72497..2684436 100644 --- a/lib/pbxProject.js +++ b/lib/pbxProject.js @@ -109,11 +109,13 @@ pbxProject.prototype.removePluginFile = function (path, opt) { return file; } + pbxProject.prototype.addSourceFile = function (path, opt) { + var file = this.addPluginFile(path, opt); - if (!file) return false; + file.target = opt ? opt.target : undefined; file.uuid = this.generateUuid(); this.addToPbxBuildFileSection(file); // PBXBuildFile @@ -122,8 +124,10 @@ pbxProject.prototype.addSourceFile = function (path, opt) { return file; } + pbxProject.prototype.removeSourceFile = function (path, opt) { var file = this.removePluginFile(path, opt) + file.target = opt ? opt.target : undefined; this.removeFromPbxBuildFileSection(file); // PBXBuildFile this.removeFromPbxSourcesBuildPhase(file); // PBXSourcesBuildPhase @@ -152,6 +156,7 @@ pbxProject.prototype.addResourceFile = function (path, opt) { } file.uuid = this.generateUuid(); + file.target = opt ? opt.target : undefined; if (!opt.plugin) { correctForResourcesPath(file, this); @@ -171,6 +176,7 @@ pbxProject.prototype.addResourceFile = function (path, opt) { pbxProject.prototype.removeResourceFile = function (path, opt) { var file = new pbxFile(path, opt); + file.target = opt ? opt.target : undefined; correctForResourcesPath(file, this); @@ -188,7 +194,9 @@ pbxProject.prototype.addFramework = function (fpath, opt) { if (this.hasFile(file.path)) return false; file.uuid = this.generateUuid(); - file.fileRef = this.generateUuid(); + file.fileRef = this.generateUuid(); + file.target = opt ? opt.target : undefined; + this.addToPbxBuildFileSection(file); // PBXBuildFile this.addToPbxFileReferenceSection(file); // PBXFileReference @@ -209,6 +217,7 @@ pbxProject.prototype.addFramework = function (fpath, opt) { pbxProject.prototype.removeFramework = function (fpath, opt) { var file = new pbxFile(fpath, opt); + file.target = opt ? opt.target : undefined; this.removeFromPbxBuildFileSection(file); // PBXBuildFile this.removeFromPbxFileReferenceSection(file); // PBXFileReference @@ -241,6 +250,7 @@ pbxProject.prototype.addStaticLibrary = function (path, opt) { } file.uuid = this.generateUuid(); + file.target = opt ? opt.target : undefined; if (!opt.plugin) { file.fileRef = this.generateUuid(); @@ -276,6 +286,57 @@ pbxProject.prototype.removeFromPbxBuildFileSection = function (file) { } } +pbxProject.prototype.addPbxGroup = function (filePathsArray, name, path, sourceTree) { + var groups = this.hash.project.objects['PBXGroup'], + pbxGroupUuid = this.generateUuid(), + commentKey = f("%s_comment", pbxGroupUuid), + pbxGroup = { + isa: 'PBXGroup', + children: [], + name: name, + path: path, + sourceTree: sourceTree ? sourceTree : '""' + }, + fileReferenceSection = this.pbxFileReferenceSection(), + filePathToReference = {}; + + for (var key in fileReferenceSection) { + // only look for comments + if (!COMMENT_KEY.test(key)) continue; + + var fileReferenceKey = key.split(COMMENT_KEY)[0], + fileReference = fileReferenceSection[fileReferenceKey]; + + filePathToReference[fileReference.path] = {fileRef: fileReferenceKey, basename: fileReferenceSection[key]}; + } + + for (var index = 0; index < filePathsArray.length; index++) { + var filePath = filePathsArray[index], + filePathQuoted = "\"" + filePath + "\""; + if (filePathToReference[filePath]) { + pbxGroup.children.push(pbxGroupChild(filePathToReference[filePath])); + continue; + } else if (filePathToReference[filePathQuoted]) { + pbxGroup.children.push(pbxGroupChild(filePathToReference[filePathQuoted])); + continue; + } + + var file = new pbxFile(filePath); + file.uuid = this.generateUuid(); + file.fileRef = this.generateUuid(); + this.addToPbxFileReferenceSection(file); // PBXFileReference + this.addToPbxBuildFileSection(file); // PBXBuildFile + pbxGroup.children.push(pbxGroupChild(file)); + } + + if (groups) { + groups[pbxGroupUuid] = pbxGroup; + groups[commentKey] = name; + } + + return {uuid: pbxGroupUuid, pbxGroup: pbxGroup}; +} + pbxProject.prototype.addToPbxFileReferenceSection = function (file) { var commentKey = f("%s_comment", file.fileRef); @@ -289,7 +350,9 @@ pbxProject.prototype.removeFromPbxFileReferenceSection = function (file) { var refObj = pbxFileReferenceObj(file); for(i in this.pbxFileReferenceSection()) { if(this.pbxFileReferenceSection()[i].name == refObj.name || - this.pbxFileReferenceSection()[i].path == refObj.path) { + ('"' + this.pbxFileReferenceSection()[i].name + '"') == refObj.name || + this.pbxFileReferenceSection()[i].path == refObj.path || + ('"' + this.pbxFileReferenceSection()[i].path + '"') == refObj.path) { file.fileRef = file.uuid = i; delete this.pbxFileReferenceSection()[i]; break; @@ -351,14 +414,14 @@ pbxProject.prototype.removeFromFrameworksPbxGroup = function (file) { } } } - pbxProject.prototype.addToPbxSourcesBuildPhase = function (file) { - var sources = this.pbxSourcesBuildPhaseObj(); + var sources = this.pbxSourcesBuildPhaseObj(file.target); sources.files.push(pbxBuildPhaseObj(file)); } pbxProject.prototype.removeFromPbxSourcesBuildPhase = function (file) { - var sources = this.pbxSourcesBuildPhaseObj(), i; + + var sources = this.pbxSourcesBuildPhaseObj(file.target), i; for(i in sources.files) { if(sources.files[i].comment == longComment(file)) { sources.files.splice(i, 1); @@ -368,12 +431,12 @@ pbxProject.prototype.removeFromPbxSourcesBuildPhase = function (file) { } pbxProject.prototype.addToPbxResourcesBuildPhase = function (file) { - var sources = this.pbxResourcesBuildPhaseObj(); + var sources = this.pbxResourcesBuildPhaseObj(file.target); sources.files.push(pbxBuildPhaseObj(file)); } pbxProject.prototype.removeFromPbxResourcesBuildPhase = function (file) { - var sources = this.pbxResourcesBuildPhaseObj(), i; + var sources = this.pbxResourcesBuildPhaseObj(file.target), i; for(i in sources.files) { if(sources.files[i].comment == longComment(file)) { @@ -384,12 +447,12 @@ pbxProject.prototype.removeFromPbxResourcesBuildPhase = function (file) { } pbxProject.prototype.addToPbxFrameworksBuildPhase = function (file) { - var sources = this.pbxFrameworksBuildPhaseObj(); + var sources = this.pbxFrameworksBuildPhaseObj(file.target); sources.files.push(pbxBuildPhaseObj(file)); } pbxProject.prototype.removeFromPbxFrameworksBuildPhase = function (file) { - var sources = this.pbxFrameworksBuildPhaseObj(); + var sources = this.pbxFrameworksBuildPhaseObj(file.target); for(i in sources.files) { if(sources.files[i].comment == longComment(file)) { sources.files.splice(i, 1); @@ -426,7 +489,152 @@ pbxProject.prototype.removeFromPbxEmbedFrameworksBuildPhase = function (file, op } } +pbxProject.prototype.addXCConfigurationList = function (configurationObjectsArray, defaultConfigurationName, comment) { + var pbxBuildConfigurationSection = this.pbxXCBuildConfigurationSection(), + pbxXCConfigurationListSection = this.pbxXCConfigurationList(), + xcConfigurationListUuid = this.generateUuid(), + commentKey = f("%s_comment", xcConfigurationListUuid), + xcConfigurationList = { + isa: 'XCConfigurationList', + buildConfigurations: [], + defaultConfigurationIsVisible: 0, + defaultConfigurationName: defaultConfigurationName + }; + + for (var index = 0; index < configurationObjectsArray.length; index++) { + var configuration = configurationObjectsArray[index], + configurationUuid = this.generateUuid(), + configurationCommentKey = f("%s_comment", configurationUuid); + + pbxBuildConfigurationSection[configurationUuid] = configuration; + pbxBuildConfigurationSection[configurationCommentKey] = configuration.name; + xcConfigurationList.buildConfigurations.push({value: configurationUuid, comment: configuration.name}); + } + + if (pbxXCConfigurationListSection) { + pbxXCConfigurationListSection[xcConfigurationListUuid] = xcConfigurationList; + pbxXCConfigurationListSection[commentKey] = comment; + } + + return {uuid: xcConfigurationListUuid, xcConfigurationList: xcConfigurationList}; +} + +pbxProject.prototype.addTargetDependency = function (target, dependencyTargets) { + if (!target) + return undefined; + + var nativeTargets = this.pbxNativeTarget(); + + if (typeof nativeTargets[target] == "undefined") + throw new Error("Invalid target: " + target); + + for (var index = 0; index < dependencyTargets.length; index++) { + var dependencyTarget = dependencyTargets[index]; + if (typeof nativeTargets[dependencyTarget] == "undefined") + throw new Error("Invalid target: " + dependencyTarget); + } + + var pbxTargetDependency = 'PBXTargetDependency', + pbxContainerItemProxy = 'PBXContainerItemProxy', + pbxTargetDependencySection = this.hash.project.objects[pbxTargetDependency], + pbxContainerItemProxySection = this.hash.project.objects[pbxContainerItemProxy]; + + for (var index = 0; index < dependencyTargets.length; index++) { + var dependencyTargetUuid = dependencyTargets[index], + dependencyTargetCommentKey = f("%s_comment", dependencyTargetUuid), + targetDependencyUuid = this.generateUuid(), + targetDependencyCommentKey = f("%s_comment", targetDependencyUuid), + itemProxyUuid = this.generateUuid(), + itemProxyCommentKey = f("%s_comment", itemProxyUuid), + itemProxy = { + isa: pbxContainerItemProxy, + containerPortal: this.hash.project['rootObject'], + containerPortal_comment: this.hash.project['rootObject_comment'], + proxyType: 1, + remoteGlobalIDString: dependencyTargetUuid, + remoteInfo: nativeTargets[dependencyTargetUuid].name + }, + targetDependency = { + isa: pbxTargetDependency, + target: dependencyTargetUuid, + target_comment: nativeTargets[dependencyTargetCommentKey], + targetProxy: itemProxyUuid, + targetProxy_comment: pbxContainerItemProxy + }; + + if (pbxContainerItemProxySection && pbxTargetDependencySection) { + pbxContainerItemProxySection[itemProxyUuid] = itemProxy; + pbxContainerItemProxySection[itemProxyCommentKey] = pbxContainerItemProxy; + pbxTargetDependencySection[targetDependencyUuid] = targetDependency; + pbxTargetDependencySection[targetDependencyCommentKey] = pbxTargetDependency; + nativeTargets[target].dependencies.push({value: targetDependencyUuid, comment: pbxTargetDependency}) + } + } + + return {uuid: target, target: nativeTargets[target]}; +} + +pbxProject.prototype.addBuildPhase = function (filePathsArray, isa, comment) { + var section = this.hash.project.objects[isa], + fileReferenceSection = this.pbxFileReferenceSection(), + buildFileSection = this.pbxBuildFileSection(), + buildPhaseUuid = this.generateUuid(), + commentKey = f("%s_comment", buildPhaseUuid), + buildPhase = { + isa: isa, + buildActionMask: 2147483647, + files: [], + runOnlyForDeploymentPostprocessing: 0 + }, + filePathToBuildFile = {}; + + for (var key in buildFileSection) { + // only look for comments + if (!COMMENT_KEY.test(key)) continue; + + var buildFileKey = key.split(COMMENT_KEY)[0], + buildFile = buildFileSection[buildFileKey]; + fileReference = fileReferenceSection[buildFile.fileRef]; + + if (!fileReference) continue; + + var pbxFileObj = new pbxFile(fileReference.path); + + filePathToBuildFile[fileReference.path] = {uuid: buildFileKey, basename: pbxFileObj.basename, group: pbxFileObj.group}; + } + + for (var index = 0; index < filePathsArray.length; index++) { + var filePath = filePathsArray[index], + filePathQuoted = "\"" + filePath + "\"", + file = new pbxFile(filePath); + + if (filePathToBuildFile[filePath]) { + buildPhase.files.push(pbxBuildPhaseObj(filePathToBuildFile[filePath])); + continue; + } else if (filePathToBuildFile[filePathQuoted]) { + buildPhase.files.push(pbxBuildPhaseObj(filePathToBuildFile[filePathQuoted])); + continue; + } + + file.uuid = this.generateUuid(); + file.fileRef = this.generateUuid(); + this.addToPbxFileReferenceSection(file); // PBXFileReference + this.addToPbxBuildFileSection(file); // PBXBuildFile + buildPhase.files.push(pbxBuildPhaseObj(file)); + } + + if (section) { + section[buildPhaseUuid] = buildPhase; + section[commentKey] = comment; + } + + return {uuid: buildPhaseUuid, buildPhase: buildPhase}; +} + // helper access functions +pbxProject.prototype.pbxProjectSection = function () { + return this.hash.project.objects['PBXProject']; +} pbxProject.prototype.pbxBuildFileSection = function () { return this.hash.project.objects['PBXBuildFile']; } @@ -439,56 +647,97 @@ pbxProject.prototype.pbxFileReferenceSection = function () { return this.hash.project.objects['PBXFileReference']; } +pbxProject.prototype.pbxNativeTarget = function () { + return this.hash.project.objects['PBXNativeTarget']; +} + +pbxProject.prototype.pbxXCConfigurationList = function () { + return this.hash.project.objects['XCConfigurationList']; +} + pbxProject.prototype.pbxGroupByName = function (name) { - var groups = this.hash.project.objects['PBXGroup'], - key, groupKey; + return this.pbxItemByComment(name, 'PBXGroup'); +} - for (key in groups) { +pbxProject.prototype.pbxTargetByName = function (name) { + return this.pbxItemByComment(name, 'PBXNativeTarget'); +} + +pbxProject.prototype.pbxItemByComment = function (name, pbxSectionName) { + var section = this.hash.project.objects[pbxSectionName], + key, itemKey; + + for (key in section) { // only look for comments if (!COMMENT_KEY.test(key)) continue; - if (groups[key] == name) { - groupKey = key.split(COMMENT_KEY)[0]; - return groups[groupKey]; + if (section[key] == name) { + itemKey = key.split(COMMENT_KEY)[0]; + return section[itemKey]; } } return null; } -pbxProject.prototype.pbxSourcesBuildPhaseObj = function () { - return this.buildPhaseObject('PBXSourcesBuildPhase', 'Sources'); +pbxProject.prototype.pbxSourcesBuildPhaseObj = function (target) { + return this.buildPhaseObject('PBXSourcesBuildPhase', 'Sources', target); } -pbxProject.prototype.pbxResourcesBuildPhaseObj = function () { - return this.buildPhaseObject('PBXResourcesBuildPhase', 'Resources'); +pbxProject.prototype.pbxResourcesBuildPhaseObj = function (target) { + return this.buildPhaseObject('PBXResourcesBuildPhase', 'Resources',target); } -pbxProject.prototype.pbxFrameworksBuildPhaseObj = function () { - return this.buildPhaseObject('PBXFrameworksBuildPhase', 'Frameworks'); +pbxProject.prototype.pbxFrameworksBuildPhaseObj = function (target) { + return this.buildPhaseObject('PBXFrameworksBuildPhase', 'Frameworks',target); } pbxProject.prototype.pbxEmbedFrameworksBuildPhaseObj = function () { return this.buildPhaseObject('PBXCopyFilesBuildPhase', 'Embed Frameworks'); } -pbxProject.prototype.buildPhaseObject = function (name, group) { +// Find Build Phase from group/target +pbxProject.prototype.buildPhase = function (group,target) { + + if (!target) + return undefined; + + var nativeTargets = this.pbxNativeTarget(); + if (typeof nativeTargets[target] == "undefined") + throw new Error("Invalid target: "+target); + + var nativeTarget= nativeTargets[target]; + var buildPhases = nativeTarget.buildPhases; + for(var i in buildPhases) + { + var buildPhase = buildPhases[i]; + if (buildPhase.comment==group) + return buildPhase.value+"_comment"; + } +} + +pbxProject.prototype.buildPhaseObject = function (name, group, target) { var section = this.hash.project.objects[name], obj, sectionKey, key; + var buildPhase = this.buildPhase(group,target); for (key in section) { + // only look for comments if (!COMMENT_KEY.test(key)) continue; - + + // select the proper buildPhase + if (buildPhase && buildPhase!=key) + continue; if (section[key] == group) { - sectionKey = key.split(COMMENT_KEY)[0]; + sectionKey = key.split(COMMENT_KEY)[0]; return section[sectionKey]; } - } - + } return null; } + pbxProject.prototype.updateBuildProperty = function(prop, value) { var config = this.pbxXCBuildConfigurationSection(); propReplace(config, prop, value); @@ -623,6 +872,7 @@ pbxProject.prototype.removeFromHeaderSearchPaths = function (file) { } } + pbxProject.prototype.addToHeaderSearchPaths = function (file) { var configurations = nonComments(this.pbxXCBuildConfigurationSection()), INHERITED = '"$(inherited)"', @@ -645,6 +895,7 @@ pbxProject.prototype.addToHeaderSearchPaths = function (file) { } } } + // a JS getter. hmmm pbxProject.prototype.__defineGetter__("productName", function () { var configurations = nonComments(this.pbxXCBuildConfigurationSection()), @@ -675,10 +926,11 @@ pbxProject.prototype.hasFile = function (filePath) { // helper recursive prop search+replace function propReplace(obj, prop, value) { + var o = {}; for (var p in obj) { // this is needed because the object could have been created with Object.create(null) if (Object.prototype.hasOwnProperty.call(obj, p)) { - if (typeof obj[p] == 'object') { + if (typeof obj[p] == 'object' && !Array.isArray(obj[p])) { propReplace(obj[p], prop, value); } else if (p == prop) { obj[p] = value; @@ -724,6 +976,12 @@ function pbxFileReferenceObj(file) { if (file.fileEncoding) obj.fileEncoding = file.fileEncoding; + + if (file.explicitFileType) + obj.explicitFileType = file.explicitFileType; + + if ('includeInIndex' in file) + obj.includeInIndex = file.includeInIndex; return obj; } @@ -763,33 +1021,31 @@ function longComment(file, opt) { // respect path function correctForPluginsPath(file, project) { - var r_plugin_dir = /^Plugins\//; - - if (project.pbxGroupByName('Plugins').path) - file.path = file.path.replace(r_plugin_dir, ''); - - return file; + return correctForPath(file, project, 'Plugins'); } function correctForResourcesPath(file, project) { - var r_resources_dir = /^Resources\//; - - if (project.pbxGroupByName('Resources').path) - file.path = file.path.replace(r_resources_dir, ''); - - return file; + return correctForPath(file, project, 'Resources'); } function correctForFrameworksPath(file, project) { - var r_resources_dir = /^Frameworks\//; + return correctForPath(file, project, 'Frameworks'); +} + +function correctForPath(file, project, group) { + var r_group_dir = new RegExp('^' + group + '[\\\\/]'); - if (project.pbxGroupByName('Frameworks').path) - file.path = file.path.replace(r_resources_dir, ''); + if (project.pbxGroupByName(group).path) + file.path = file.path.replace(r_group_dir, ''); return file; } function searchPathForFile(file, proj) { + if (file.relativePath) { + return '"\$(SRCROOT)/' + file.relativePath + '\"'; + } + var plugins = proj.pbxGroupByName('Plugins'), pluginsPath = plugins ? plugins.path : null, fileDir = path.dirname(file.path); diff --git a/package.json b/package.json index ff80f6f..2b27495 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "author": "Andrew Lunny ", "name": "xcode", "description": "parser for xcodeproj/project.pbxproj files", - "version": "0.6.7", + "version": "0.8.0", "main":"index.js", "repository": { "url": "https://github.com/alunny/node-xcode.git" diff --git a/test/addBuildPhase.js b/test/addBuildPhase.js new file mode 100644 index 0000000..ee9005e --- /dev/null +++ b/test/addBuildPhase.js @@ -0,0 +1,108 @@ +var fullProject = require('./fixtures/full-project') + fullProjectStr = JSON.stringify(fullProject), + pbx = require('../lib/pbxProject'), + proj = new pbx('.'); + +function cleanHash() { + return JSON.parse(fullProjectStr); +} + +exports.setUp = function (callback) { + proj.hash = cleanHash(); + callback(); +} + +exports.addBuildPhase = { + 'should return a pbxBuildPhase': function (test) { + var buildPhase = proj.addBuildPhase(['file.m'], 'PBXSourcesBuildPhase', 'My build phase'); + + test.ok(typeof buildPhase === 'object'); + test.done() + }, + 'should set a uuid on the pbxBuildPhase': function (test) { + var buildPhase = proj.addBuildPhase(['file.m'], 'PBXSourcesBuildPhase', 'My build phase'); + + test.ok(buildPhase.uuid); + test.done() + }, + 'should add all files to build phase': function (test) { + var buildPhase = proj.addBuildPhase(['file.m', 'assets.bundle'], 'PBXResourcesBuildPhase', 'My build phase').buildPhase; + for (var index = 0; index < buildPhase.files.length; index++) { + var file = buildPhase.files[index]; + test.ok(file.value); + } + + test.done() + }, + 'should add the PBXBuildPhase object correctly': function (test) { + var buildPhase = proj.addBuildPhase(['file.m', 'assets.bundle'], 'PBXResourcesBuildPhase', 'My build phase').buildPhase, + buildPhaseInPbx = proj.buildPhaseObject('PBXResourcesBuildPhase', 'My build phase'); + + test.equal(buildPhaseInPbx, buildPhase); + test.equal(buildPhaseInPbx.isa, 'PBXResourcesBuildPhase'); + test.equal(buildPhaseInPbx.buildActionMask, 2147483647); + test.equal(buildPhaseInPbx.runOnlyForDeploymentPostprocessing, 0); + test.done(); + }, + 'should add each of the files to PBXBuildFile section': function (test) { + var buildPhase = proj.addBuildPhase(['file.m', 'assets.bundle'], 'PBXResourcesBuildPhase', 'My build phase').buildPhase, + buildFileSection = proj.pbxBuildFileSection(); + + for (var index = 0; index < buildPhase.files.length; index++) { + var file = buildPhase.files[index]; + test.ok(buildFileSection[file.value]); + } + + test.done(); + }, + 'should add each of the files to PBXFileReference section': function (test) { + var buildPhase = proj.addBuildPhase(['file.m', 'assets.bundle'], 'PBXResourcesBuildPhase', 'My build phase').buildPhase, + fileRefSection = proj.pbxFileReferenceSection(), + buildFileSection = proj.pbxBuildFileSection(), + fileRefs = []; + + for (var index = 0; index < buildPhase.files.length; index++) { + var file = buildPhase.files[index], + fileRef = buildFileSection[file.value].fileRef; + + test.ok(fileRefSection[fileRef]); + } + + test.done(); + }, + 'should not add files to PBXFileReference section if already added': function (test) { + var fileRefSection = proj.pbxFileReferenceSection(), + initialFileReferenceSectionItemsCount = Object.keys(fileRefSection), + buildPhase = proj.addBuildPhase(['AppDelegate.m', 'main.m'], 'PBXResourcesBuildPhase', 'My build phase').buildPhase, + afterAdditionBuildFileSectionItemsCount = Object.keys(fileRefSection); + + test.deepEqual(initialFileReferenceSectionItemsCount, afterAdditionBuildFileSectionItemsCount); + test.done(); + }, + 'should not add files to PBXBuildFile section if already added': function (test) { + var buildFileSection = proj.pbxBuildFileSection(), + initialBuildFileSectionItemsCount = Object.keys(buildFileSection), + buildPhase = proj.addBuildPhase(['AppDelegate.m', 'main.m'], 'PBXResourcesBuildPhase', 'My build phase').buildPhase, + afterAdditionBuildFileSectionItemsCount = Object.keys(buildFileSection); + + test.deepEqual(initialBuildFileSectionItemsCount, afterAdditionBuildFileSectionItemsCount); + test.done(); + }, + 'should add only missing files to PBXFileReference section': function (test) { + var fileRefSection = proj.pbxFileReferenceSection(), + buildFileSection = proj.pbxBuildFileSection(), + initialFileReferenceSectionItemsCount = Object.keys(fileRefSection), + buildPhase = proj.addBuildPhase(['file.m', 'AppDelegate.m'], 'PBXResourcesBuildPhase', 'My build phase').buildPhase, + afterAdditionBuildFileSectionItemsCount = Object.keys(fileRefSection); + + for (var index = 0; index < buildPhase.files.length; index++) { + var file = buildPhase.files[index], + fileRef = buildFileSection[file.value].fileRef; + + test.ok(fileRefSection[fileRef]); + } + + test.deepEqual(initialFileReferenceSectionItemsCount.length, afterAdditionBuildFileSectionItemsCount.length - 2); + test.done(); + } +} diff --git a/test/addPbxGroup.js b/test/addPbxGroup.js new file mode 100644 index 0000000..433d30e --- /dev/null +++ b/test/addPbxGroup.js @@ -0,0 +1,149 @@ +var fullProject = require('./fixtures/full-project') + fullProjectStr = JSON.stringify(fullProject), + pbx = require('../lib/pbxProject'), + proj = new pbx('.'); + +function cleanHash() { + return JSON.parse(fullProjectStr); +} + +exports.setUp = function (callback) { + proj.hash = cleanHash(); + callback(); +} + +exports.addPbxGroup = { + 'should return a pbxGroup': function (test) { + var pbxGroup = proj.addPbxGroup(['file.m'], 'MyGroup', 'Application', 'Application', '""'); + + test.ok(typeof pbxGroup === 'object'); + test.done() + }, + 'should set a uuid on the pbxGroup': function (test) { + var pbxGroup = proj.addPbxGroup(['file.m'], 'MyGroup', 'Application', 'Application', '""'); + + test.ok(pbxGroup.uuid); + test.done() + }, + 'should add all files to pbxGroup': function (test) { + var pbxGroup = proj.addPbxGroup(['file.m'], 'MyGroup', 'Application', 'Application', '""'); + for (var index = 0; index < pbxGroup.pbxGroup.children.length; index++) { + var file = pbxGroup.pbxGroup.children[index]; + test.ok(file.value); + } + + test.done() + }, + 'should add the PBXGroup object correctly': function (test) { + var pbxGroup = proj.addPbxGroup(['file.m'], 'MyGroup', 'Application', '""'); + pbxGroupInPbx = proj.pbxGroupByName('MyGroup'); + + test.equal(pbxGroupInPbx.children, pbxGroup.pbxGroup.children); + test.equal(pbxGroupInPbx.isa, 'PBXGroup'); + test.equal(pbxGroupInPbx.path, 'Application'); + test.equal(pbxGroupInPbx.sourceTree, '""'); + test.done(); + }, + 'should add sourceTree if no other specified': function (test) { + var pbxGroup = proj.addPbxGroup(['file.m'], 'MyGroup', 'Application'); + pbxGroupInPbx = proj.pbxGroupByName('MyGroup'); + + test.equal(pbxGroupInPbx.sourceTree, '""'); + test.done(); + }, + 'should add each of the files to PBXBuildFile section': function (test) { + var buildFileSection = proj.pbxBuildFileSection(); + for (var key in buildFileSection) { + test.notEqual(buildFileSection[key].fileRef_comment, 'file.m'); + test.notEqual(buildFileSection[key].fileRef_comment, 'assets.bundle'); + } + + var initialBuildFileSectionItemsCount = Object.keys(buildFileSection), + pbxGroup = proj.addPbxGroup(['file.m', 'assets.bundle'], 'MyGroup', 'Application', '""'), + afterAdditionBuildFileSectionItemsCount = Object.keys(buildFileSection); + + // for each file added in the build file section two keyes are added - one for the object and one for the comment + test.equal(initialBuildFileSectionItemsCount.length, afterAdditionBuildFileSectionItemsCount.length - 4); + test.done(); + }, + 'should not add any of the files to PBXBuildFile section if already added': function (test) { + var buildFileSection = proj.pbxBuildFileSection(), + initialBuildFileSectionItemsCount = Object.keys(buildFileSection), + pbxGroup = proj.addPbxGroup(['AppDelegate.m', 'AppDelegate.h'], 'MyGroup', 'Application', '""'), + afterAdditionBuildFileSectionItemsCount = Object.keys(buildFileSection); + + test.deepEqual(initialBuildFileSectionItemsCount, afterAdditionBuildFileSectionItemsCount); + test.done(); + }, + 'should not add any of the files to PBXBuildFile section when they contain special symbols and are already added': function (test) { + var buildFileSection = proj.pbxBuildFileSection(), + initialBuildFileSectionItemsCount = Object.keys(buildFileSection), + pbxGroup = proj.addPbxGroup(['KitchenSinktablet.app'], 'MyGroup', 'Application', '""'), + afterAdditionBuildFileSectionItemsCount = Object.keys(buildFileSection); + + test.deepEqual(initialBuildFileSectionItemsCount, afterAdditionBuildFileSectionItemsCount); + test.done(); + }, + 'should add all files which are not added and not add files already added to PBXBuildFile section': function (test) { + var buildFileSection = proj.pbxBuildFileSection(); + for (var key in buildFileSection) { + test.notEqual(buildFileSection[key].fileRef_comment, 'file.m'); + test.notEqual(buildFileSection[key].fileRef_comment, 'assets.bundle'); + } + + var initialBuildFileSectionItemsCount = Object.keys(buildFileSection), + pbxGroup = proj.addPbxGroup(['AppDelegate.m', 'AppDelegate.h', 'file.m', 'assets.bundle'], 'MyGroup', 'Application', '""'), + afterAdditionBuildFileSectionItemsCount = Object.keys(buildFileSection); + + // for each file added in the build file section two keyes are added - one for the object and one for the comment + test.equal(initialBuildFileSectionItemsCount.length, afterAdditionBuildFileSectionItemsCount.length - 4); + test.done(); + }, + 'should add each of the files to PBXFileReference section': function (test) { + var fileReference = proj.pbxFileReferenceSection(); + for (var key in fileReference) { + test.notEqual(fileReference[key].fileRef_comment, 'file.m'); + test.notEqual(fileReference[key].fileRef_comment, 'assets.bundle'); + } + var pbxGroup = proj.addPbxGroup(['file.m', 'assets.bundle'], 'MyGroup', 'Application', '""'); + for (var index = 0; index < pbxGroup.pbxGroup.children.length; index++) { + var file = pbxGroup.pbxGroup.children[index]; + test.ok(fileReference[file.value]); + } + + test.done(); + }, + 'should not add any of the files to PBXFileReference section if already added': function (test) { + var fileReference = proj.pbxFileReferenceSection (), + initialBuildFileSectionItemsCount = Object.keys(fileReference), + pbxGroup = proj.addPbxGroup(['AppDelegate.m', 'AppDelegate.h'], 'MyGroup', 'Application', '""'), + afterAdditionBuildFileSectionItemsCount = Object.keys(fileReference); + + test.deepEqual(initialBuildFileSectionItemsCount, afterAdditionBuildFileSectionItemsCount); + test.done(); + }, + 'should not add any of the files to PBXFileReference section when they contain special symbols and are already added': function (test) { + var fileReference = proj.pbxFileReferenceSection (), + initialBuildFileSectionItemsCount = Object.keys(fileReference), + pbxGroup = proj.addPbxGroup(['KitchenSinktablet.app'], 'MyGroup', 'Application', '""'), + afterAdditionBuildFileSectionItemsCount = Object.keys(fileReference); + + test.deepEqual(initialBuildFileSectionItemsCount, afterAdditionBuildFileSectionItemsCount); + test.done(); + }, + 'should add all files which are not added and not add files already added to PBXFileReference section': function (test) { + var fileReference = proj.pbxFileReferenceSection (); + for (var key in fileReference) { + test.notEqual(fileReference[key].fileRef_comment, 'file.m'); + test.notEqual(fileReference[key].fileRef_comment, 'assets.bundle'); + } + + var initialBuildFileSectionItemsCount = Object.keys(fileReference), + pbxGroup = proj.addPbxGroup(['AppDelegate.m', 'AppDelegate.h', 'file.m', 'assets.bundle'], 'MyGroup', 'Application', '""'), + afterAdditionBuildFileSectionItemsCount = Object.keys(fileReference); + + // for each file added in the file reference section two keyes are added - one for the object and one for the comment + test.equal(initialBuildFileSectionItemsCount.length, afterAdditionBuildFileSectionItemsCount.length - 4); + test.done(); + } +} diff --git a/test/addTargetDependency.js b/test/addTargetDependency.js new file mode 100644 index 0000000..d20c790 --- /dev/null +++ b/test/addTargetDependency.js @@ -0,0 +1,146 @@ +var fullProject = require('./fixtures/full-project') + fullProjectStr = JSON.stringify(fullProject), + pbx = require('../lib/pbxProject'), + proj = new pbx('.'); + +function cleanHash() { + return JSON.parse(fullProjectStr); +} + +exports.setUp = function (callback) { + proj.hash = cleanHash(); + callback(); +} + +exports.addTargetDependency = { + 'should return undefined when no target specified': function (test) { + var buildPhase = proj.addTargetDependency(); + + test.ok(typeof buildPhase === 'undefined'); + test.done() + }, + 'should throw when target not found in nativeTargetsSection': function (test) { + test.throws(function() { + proj.addTargetDependency('invalidTarget'); + }); + test.done() + }, + 'should throw when any dependency target not found in nativeTargetsSection': function (test) { + test.throws(function() { + proj.addTargetDependency('1D6058900D05DD3D006BFB54', ['invalidTarget']); + }); + test.done() + }, + 'should return the pbxTarget': function (test) { + var target = proj.addTargetDependency('1D6058900D05DD3D006BFB54', ['1D6058900D05DD3D006BFB54']); + + test.ok(typeof target == 'object'); + test.ok(target.uuid); + test.ok(target.target); + test.done(); + }, + 'should add targetDependencies to target': function (test) { + var targetInPbxProj = proj.pbxNativeTarget()['1D6058900D05DD3D006BFB55']; + test.deepEqual(targetInPbxProj.dependencies, []); + + var target = proj.addTargetDependency('1D6058900D05DD3D006BFB55', ['1D6058900D05DD3D006BFB54', '1D6058900D05DD3D006BFB55']).target; + test.deepEqual(targetInPbxProj.dependencies, target.dependencies) + test.done() + }, + 'should create a PBXTargetDependency for each dependency target': function (test) { + var pbxTargetDependencySection = proj.hash.project.objects['PBXTargetDependency'], + target = proj.addTargetDependency('1D6058900D05DD3D006BFB54', ['1D6058900D05DD3D006BFB54', '1D6058900D05DD3D006BFB55']).target; + + for (var index = 0; index < target.dependencies.length; index++) { + var dependency = target.dependencies[index].value; + test.ok(pbxTargetDependencySection[dependency]); + } + + test.done() + }, + 'should set right comment for each dependency target': function (test) { + var pbxTargetDependencySection = proj.hash.project.objects['PBXTargetDependency'], + target = proj.addTargetDependency('1D6058900D05DD3D006BFB54', ['1D6058900D05DD3D006BFB54', '1D6058900D05DD3D006BFB55']).target; + + for (var index = 0; index < target.dependencies.length; index++) { + var dependencyCommentKey = target.dependencies[index].value + '_comment'; + test.equal(pbxTargetDependencySection[dependencyCommentKey], 'PBXTargetDependency'); + } + + test.done() + }, + 'should create a PBXContainerItemProxy for each PBXTargetDependency': function (test) { + var pbxTargetDependencySection = proj.hash.project.objects['PBXTargetDependency'], + pbxContainerItemProxySection = proj.hash.project.objects['PBXContainerItemProxy'], + target = proj.addTargetDependency('1D6058900D05DD3D006BFB54', ['1D6058900D05DD3D006BFB54', '1D6058900D05DD3D006BFB55']).target; + + for (var index = 0; index < target.dependencies.length; index++) { + var dependency = target.dependencies[index].value, + targetProxy = pbxTargetDependencySection[dependency]['targetProxy']; + + test.ok(pbxContainerItemProxySection[targetProxy]); + } + + test.done() + }, + 'should set each PBXContainerItemProxy`s remoteGlobalIDString correctly': function (test) { + var pbxTargetDependencySection = proj.hash.project.objects['PBXTargetDependency'], + pbxContainerItemProxySection = proj.hash.project.objects['PBXContainerItemProxy'], + target = proj.addTargetDependency('1D6058900D05DD3D006BFB55', ['1D6058900D05DD3D006BFB54', '1D6058900D05DD3D006BFB55']).target, + remoteGlobalIDStrings = []; + + for (var index = 0; index < target.dependencies.length; index++) { + var dependency = target.dependencies[index].value, + targetProxy = pbxTargetDependencySection[dependency]['targetProxy']; + + remoteGlobalIDStrings.push(pbxContainerItemProxySection[targetProxy]['remoteGlobalIDString']); + } + + test.deepEqual(remoteGlobalIDStrings, ['1D6058900D05DD3D006BFB54', '1D6058900D05DD3D006BFB55']); + test.done() + }, + 'should set each PBXContainerItemProxy`s remoteInfo correctly': function (test) { + var pbxTargetDependencySection = proj.hash.project.objects['PBXTargetDependency'], + pbxContainerItemProxySection = proj.hash.project.objects['PBXContainerItemProxy'], + target = proj.addTargetDependency('1D6058900D05DD3D006BFB55', ['1D6058900D05DD3D006BFB54', '1D6058900D05DD3D006BFB55']).target, + remoteInfoArray = []; + + for (var index = 0; index < target.dependencies.length; index++) { + var dependency = target.dependencies[index].value, + targetProxy = pbxTargetDependencySection[dependency]['targetProxy']; + + remoteInfoArray.push(pbxContainerItemProxySection[targetProxy]['remoteInfo']); + } + + test.deepEqual(remoteInfoArray, ['"KitchenSinktablet"', '"TestApp"']); + test.done() + }, + 'should set each PBXContainerItemProxy`s containerPortal correctly': function (test) { + var pbxTargetDependencySection = proj.hash.project.objects['PBXTargetDependency'], + pbxContainerItemProxySection = proj.hash.project.objects['PBXContainerItemProxy'], + target = proj.addTargetDependency('1D6058900D05DD3D006BFB55', ['1D6058900D05DD3D006BFB54', '1D6058900D05DD3D006BFB55']).target; + + for (var index = 0; index < target.dependencies.length; index++) { + var dependency = target.dependencies[index].value, + targetProxy = pbxTargetDependencySection[dependency]['targetProxy']; + + test.equal(pbxContainerItemProxySection[targetProxy]['containerPortal'], proj.hash.project['rootObject']); + } + + test.done() + }, + 'should set each PBXContainerItemProxy`s proxyType correctly': function (test) { + var pbxTargetDependencySection = proj.hash.project.objects['PBXTargetDependency'], + pbxContainerItemProxySection = proj.hash.project.objects['PBXContainerItemProxy'], + target = proj.addTargetDependency('1D6058900D05DD3D006BFB55', ['1D6058900D05DD3D006BFB54', '1D6058900D05DD3D006BFB55']).target; + + for (var index = 0; index < target.dependencies.length; index++) { + var dependency = target.dependencies[index].value, + targetProxy = pbxTargetDependencySection[dependency]['targetProxy']; + + test.equal(pbxContainerItemProxySection[targetProxy]['proxyType'], 1); + } + + test.done() + } +} diff --git a/test/addToPbxFileReferenceSection.js b/test/addToPbxFileReferenceSection.js new file mode 100644 index 0000000..a3319a7 --- /dev/null +++ b/test/addToPbxFileReferenceSection.js @@ -0,0 +1,62 @@ +var jsonProject = require('./fixtures/full-project') + fullProjectStr = JSON.stringify(jsonProject), + pbx = require('../lib/pbxProject'), + pbxFile = require('../lib/pbxFile'), + myProj = new pbx('.'); + +function cleanHash() { + return JSON.parse(fullProjectStr); +} + +exports.setUp = function (callback) { + myProj.hash = cleanHash(); + callback(); +} + +exports['addToPbxFileReferenceSection function'] = { + 'should add file and comment to fileReferenceSection': function (test) { + var file = new pbxFile('file.m'); + file.fileRef = myProj.generateUuid(); + + myProj.addToPbxFileReferenceSection(file) + + test.equal(myProj.pbxFileReferenceSection()[file.fileRef].isa, 'PBXFileReference'); + test.equal(myProj.pbxFileReferenceSection()[file.fileRef].lastKnownFileType, 'sourcecode.c.objc'); + test.equal(myProj.pbxFileReferenceSection()[file.fileRef].name, '"file.m"'); + test.equal(myProj.pbxFileReferenceSection()[file.fileRef].path, '"file.m"'); + test.equal(myProj.pbxFileReferenceSection()[file.fileRef].sourceTree, '""'); + test.equal(myProj.pbxFileReferenceSection()[file.fileRef].fileEncoding, 4); + test.equal(myProj.pbxFileReferenceSection()[file.fileRef + "_comment"], 'file.m'); + test.done(); + }, + 'should add file with preset explicitFileType to fileReferenceSection correctly': function (test) { + var appexFile = { fileRef: myProj.generateUuid(), isa: 'PBXFileReference', explicitFileType: '"wrapper.app-extension"', path: "WatchKit Extension.appex"}; + + myProj.addToPbxFileReferenceSection(appexFile) + + test.equal(myProj.pbxFileReferenceSection()[appexFile.fileRef].isa, 'PBXFileReference'); + test.equal(myProj.pbxFileReferenceSection()[appexFile.fileRef].explicitFileType, '"wrapper.app-extension"'); + test.equal(myProj.pbxFileReferenceSection()[appexFile.fileRef].path, '"WatchKit Extension.appex"'); + test.done(); + }, + 'should add file with preset includeInIndex to fileReferenceSection correctly': function (test) { + var appexFile = { fileRef: myProj.generateUuid(), isa: 'PBXFileReference', includeInIndex: 0, path: "WatchKit Extension.appex"}; + + myProj.addToPbxFileReferenceSection(appexFile) + + test.equal(myProj.pbxFileReferenceSection()[appexFile.fileRef].isa, 'PBXFileReference'); + test.equal(myProj.pbxFileReferenceSection()[appexFile.fileRef].includeInIndex, 0); + test.equal(myProj.pbxFileReferenceSection()[appexFile.fileRef].path, '"WatchKit Extension.appex"'); + test.done(); + }, + 'should add file with preset sourceTree to fileReferenceSection correctly': function (test) { + var appexFile = { fileRef: myProj.generateUuid(), isa: 'PBXFileReference', sourceTree: 'BUILT_PRODUCTS_DIR', path: "WatchKit Extension.appex"}; + + myProj.addToPbxFileReferenceSection(appexFile) + + test.equal(myProj.pbxFileReferenceSection()[appexFile.fileRef].isa, 'PBXFileReference'); + test.equal(myProj.pbxFileReferenceSection()[appexFile.fileRef].sourceTree, 'BUILT_PRODUCTS_DIR'); + test.equal(myProj.pbxFileReferenceSection()[appexFile.fileRef].path, '"WatchKit Extension.appex"'); + test.done(); + } +} \ No newline at end of file diff --git a/test/addXCConfigurationList.js b/test/addXCConfigurationList.js new file mode 100644 index 0000000..9ebe2a2 --- /dev/null +++ b/test/addXCConfigurationList.js @@ -0,0 +1,115 @@ +var fullProject = require('./fixtures/full-project') + fullProjectStr = JSON.stringify(fullProject), + pbx = require('../lib/pbxProject'), + proj = new pbx('.'), + debugConfiguration = { + isa: 'XCBuildConfiguration', + buildSettings: { + GCC_PREPROCESSOR_DEFINITIONS: [ + '"DEBUG=1"', + '"$(inherited)"', + ], + INFOPLIST_FILE: "Info.Plist", + LD_RUNPATH_SEARCH_PATHS: '"$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"', + PRODUCT_NAME: '"${TARGET_NAME}"', + SKIP_INSTALL: 'YES' + }, + name: 'Debug' + }, + releaseConfiguration = { + isa: 'XCBuildConfiguration', + buildSettings: { + INFOPLIST_FILE: "Info.Plist", + LD_RUNPATH_SEARCH_PATHS: '"$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"', + PRODUCT_NAME: '"${TARGET_NAME}"', + SKIP_INSTALL: 'YES' + }, + name: 'Release' + }; + +function cleanHash() { + return JSON.parse(fullProjectStr); +} + +exports.setUp = function (callback) { + proj.hash = cleanHash(); + callback(); +} + +exports.addXCConfigurationList = { + 'should return an XCConfigurationList': function (test) { + var myProj = new pbx('test/parser/projects/full.pbxproj').parseSync(), + xcConfigurationList = myProj.addXCConfigurationList([debugConfiguration, releaseConfiguration], 'Release', 'XCConfigurationList Comment'); + + test.ok(typeof xcConfigurationList === 'object'); + test.done(); + }, + 'should set a uuid on the XCConfigurationList': function (test) { + var myProj = new pbx('test/parser/projects/full.pbxproj').parseSync(), + xcConfigurationList = myProj.addXCConfigurationList([debugConfiguration, releaseConfiguration], 'Release', 'XCConfigurationList Comment'); + + test.ok(xcConfigurationList.uuid); + test.done(); + }, + 'should add configurations to pbxBuildConfigurationSection': function (test) { + var myProj = new pbx('test/parser/projects/full.pbxproj').parseSync(), + pbxBuildConfigurationSection = myProj.pbxXCBuildConfigurationSection(), + xcConfigurationList = myProj.addXCConfigurationList([debugConfiguration, releaseConfiguration], 'Release', 'XCConfigurationList Comment'), + xcConfigurationListConfigurations = xcConfigurationList.xcConfigurationList.buildConfigurations; + + for (var index = 0; index < xcConfigurationListConfigurations.length; index++) { + var configuration = xcConfigurationListConfigurations[index]; + test.ok(pbxBuildConfigurationSection[configuration.value]); + } + + test.done(); + }, + 'should add XCConfigurationList to pbxXCConfigurationListSection': function (test) { + var myProj = new pbx('test/parser/projects/full.pbxproj').parseSync(), + pbxXCConfigurationListSection = myProj.pbxXCConfigurationList(); + xcConfigurationList = myProj.addXCConfigurationList([debugConfiguration, releaseConfiguration], 'Release', 'XCConfigurationList Comment'); + + test.ok(pbxXCConfigurationListSection[xcConfigurationList.uuid]); + test.done(); + }, + 'should add XCConfigurationList object correctly': function (test) { + var myProj = new pbx('test/parser/projects/full.pbxproj').parseSync(), + pbxXCConfigurationListSection = myProj.pbxXCConfigurationList(); + xcConfigurationList = myProj.addXCConfigurationList([debugConfiguration, releaseConfiguration], 'Release', 'XCConfigurationList Comment'), + xcConfigurationListInPbx = pbxXCConfigurationListSection[xcConfigurationList.uuid]; + + test.deepEqual(xcConfigurationListInPbx, xcConfigurationList.xcConfigurationList); + test.done(); + }, + 'should add correct configurations to XCConfigurationList and to pbxBuildConfigurationSection': function (test) { + var myProj = new pbx('test/parser/projects/full.pbxproj').parseSync(), + pbxXCConfigurationListSection = myProj.pbxXCConfigurationList(); + pbxBuildConfigurationSection = myProj.pbxXCBuildConfigurationSection(), + xcConfigurationList = myProj.addXCConfigurationList([debugConfiguration, releaseConfiguration], 'Release', 'XCConfigurationList Comment'), + xcConfigurationListConfigurations = xcConfigurationList.xcConfigurationList.buildConfigurations, + expectedConfigurations = [], + xcConfigurationListInPbx = pbxXCConfigurationListSection[xcConfigurationList.uuid]; + + for (var index = 0; index < xcConfigurationListConfigurations.length; index++) { + var configuration = xcConfigurationListConfigurations[index]; + expectedConfigurations.push(pbxBuildConfigurationSection[configuration.value]); + } + + test.deepEqual(expectedConfigurations, [debugConfiguration, releaseConfiguration]); + test.deepEqual(xcConfigurationListInPbx.buildConfigurations, xcConfigurationListConfigurations); + test.done(); + }, + 'should set comments for pbxBuildConfigurations': function (test) { + var myProj = new pbx('test/parser/projects/full.pbxproj').parseSync(), + pbxBuildConfigurationSection = myProj.pbxXCBuildConfigurationSection(), + xcConfigurationList = myProj.addXCConfigurationList([debugConfiguration, releaseConfiguration], 'Release', 'XCConfigurationList Comment'), + xcConfigurationListConfigurations = xcConfigurationList.xcConfigurationList.buildConfigurations; + + for (var index = 0; index < xcConfigurationListConfigurations.length; index++) { + var configuration = xcConfigurationListConfigurations[index]; + test.ok(pbxBuildConfigurationSection[configuration.value + '_comment']); + } + + test.done(); + } +} diff --git a/test/fixtures/full-project.json b/test/fixtures/full-project.json index a66b359..ae4a5a7 100644 --- a/test/fixtures/full-project.json +++ b/test/fixtures/full-project.json @@ -1 +1 @@ -{"project":{"archiveVersion":1,"classes":{},"objectVersion":45,"objects":{"PBXBuildFile":{"1D3623260D0F684500981E51":{"isa":"PBXBuildFile","fileRef":"1D3623250D0F684500981E51","fileRef_comment":"AppDelegate.m"},"1D3623260D0F684500981E51_comment":"AppDelegate.m in Sources","1D60589B0D05DD56006BFB54":{"isa":"PBXBuildFile","fileRef":"29B97316FDCFA39411CA2CEA","fileRef_comment":"main.m"},"1D60589B0D05DD56006BFB54_comment":"main.m in Sources","1D60589F0D05DD5A006BFB54":{"isa":"PBXBuildFile","fileRef":"1D30AB110D05D00D00671497","fileRef_comment":"Foundation.framework"},"1D60589F0D05DD5A006BFB54_comment":"Foundation.framework in Frameworks","1DF5F4E00D08C38300B7A737":{"isa":"PBXBuildFile","fileRef":"1DF5F4DF0D08C38300B7A737","fileRef_comment":"UIKit.framework","settings":{"ATTRIBUTES":["Weak"]}},"1DF5F4E00D08C38300B7A737_comment":"UIKit.framework in Frameworks","1F766FE113BBADB100FB74C0":{"isa":"PBXBuildFile","fileRef":"1F766FDC13BBADB100FB74C0","fileRef_comment":"Localizable.strings"},"1F766FE113BBADB100FB74C0_comment":"Localizable.strings in Resources","1F766FE213BBADB100FB74C0":{"isa":"PBXBuildFile","fileRef":"1F766FDF13BBADB100FB74C0","fileRef_comment":"Localizable.strings"},"1F766FE213BBADB100FB74C0_comment":"Localizable.strings in Resources","288765FD0DF74451002DB57D":{"isa":"PBXBuildFile","fileRef":"288765FC0DF74451002DB57D","fileRef_comment":"CoreGraphics.framework"},"288765FD0DF74451002DB57D_comment":"CoreGraphics.framework in Frameworks","301BF552109A68D80062928A":{"isa":"PBXBuildFile","fileRef":"301BF535109A57CC0062928A","fileRef_comment":"libPhoneGap.a"},"301BF552109A68D80062928A_comment":"libPhoneGap.a in Frameworks","301BF570109A69640062928A":{"isa":"PBXBuildFile","fileRef":"301BF56E109A69640062928A","fileRef_comment":"www"},"301BF570109A69640062928A_comment":"www in Resources","301BF5B5109A6A2B0062928A":{"isa":"PBXBuildFile","fileRef":"301BF5B4109A6A2B0062928A","fileRef_comment":"AddressBook.framework"},"301BF5B5109A6A2B0062928A_comment":"AddressBook.framework in Frameworks","301BF5B7109A6A2B0062928A":{"isa":"PBXBuildFile","fileRef":"301BF5B6109A6A2B0062928A","fileRef_comment":"AddressBookUI.framework"},"301BF5B7109A6A2B0062928A_comment":"AddressBookUI.framework in Frameworks","301BF5B9109A6A2B0062928A":{"isa":"PBXBuildFile","fileRef":"301BF5B8109A6A2B0062928A","fileRef_comment":"AudioToolbox.framework"},"301BF5B9109A6A2B0062928A_comment":"AudioToolbox.framework in Frameworks","301BF5BB109A6A2B0062928A":{"isa":"PBXBuildFile","fileRef":"301BF5BA109A6A2B0062928A","fileRef_comment":"AVFoundation.framework","settings":{"ATTRIBUTES":["Weak"]}},"301BF5BB109A6A2B0062928A_comment":"AVFoundation.framework in Frameworks","301BF5BD109A6A2B0062928A":{"isa":"PBXBuildFile","fileRef":"301BF5BC109A6A2B0062928A","fileRef_comment":"CFNetwork.framework"},"301BF5BD109A6A2B0062928A_comment":"CFNetwork.framework in Frameworks","301BF5BF109A6A2B0062928A":{"isa":"PBXBuildFile","fileRef":"301BF5BE109A6A2B0062928A","fileRef_comment":"CoreLocation.framework"},"301BF5BF109A6A2B0062928A_comment":"CoreLocation.framework in Frameworks","301BF5C1109A6A2B0062928A":{"isa":"PBXBuildFile","fileRef":"301BF5C0109A6A2B0062928A","fileRef_comment":"MediaPlayer.framework"},"301BF5C1109A6A2B0062928A_comment":"MediaPlayer.framework in Frameworks","301BF5C3109A6A2B0062928A":{"isa":"PBXBuildFile","fileRef":"301BF5C2109A6A2B0062928A","fileRef_comment":"QuartzCore.framework"},"301BF5C3109A6A2B0062928A_comment":"QuartzCore.framework in Frameworks","301BF5C5109A6A2B0062928A":{"isa":"PBXBuildFile","fileRef":"301BF5C4109A6A2B0062928A","fileRef_comment":"SystemConfiguration.framework"},"301BF5C5109A6A2B0062928A_comment":"SystemConfiguration.framework in Frameworks","3053AC6F109B7857006FCFE7":{"isa":"PBXBuildFile","fileRef":"3053AC6E109B7857006FCFE7","fileRef_comment":"VERSION"},"3053AC6F109B7857006FCFE7_comment":"VERSION in Resources","305D5FD1115AB8F900A74A75":{"isa":"PBXBuildFile","fileRef":"305D5FD0115AB8F900A74A75","fileRef_comment":"MobileCoreServices.framework"},"305D5FD1115AB8F900A74A75_comment":"MobileCoreServices.framework in Frameworks","3072F99713A8081B00425683":{"isa":"PBXBuildFile","fileRef":"3072F99613A8081B00425683","fileRef_comment":"Capture.bundle"},"3072F99713A8081B00425683_comment":"Capture.bundle in Resources","307D28A2123043360040C0FA":{"isa":"PBXBuildFile","fileRef":"307D28A1123043350040C0FA","fileRef_comment":"PhoneGapBuildSettings.xcconfig"},"307D28A2123043360040C0FA_comment":"PhoneGapBuildSettings.xcconfig in Resources","308D05371370CCF300D202BF":{"isa":"PBXBuildFile","fileRef":"308D052E1370CCF300D202BF","fileRef_comment":"icon-72.png"},"308D05371370CCF300D202BF_comment":"icon-72.png in Resources","308D05381370CCF300D202BF":{"isa":"PBXBuildFile","fileRef":"308D052F1370CCF300D202BF","fileRef_comment":"icon.png"},"308D05381370CCF300D202BF_comment":"icon.png in Resources","308D05391370CCF300D202BF":{"isa":"PBXBuildFile","fileRef":"308D05301370CCF300D202BF","fileRef_comment":"icon@2x.png"},"308D05391370CCF300D202BF_comment":"icon@2x.png in Resources","308D053C1370CCF300D202BF":{"isa":"PBXBuildFile","fileRef":"308D05341370CCF300D202BF","fileRef_comment":"Default.png"},"308D053C1370CCF300D202BF_comment":"Default.png in Resources","308D053D1370CCF300D202BF":{"isa":"PBXBuildFile","fileRef":"308D05351370CCF300D202BF","fileRef_comment":"Default@2x.png"},"308D053D1370CCF300D202BF_comment":"Default@2x.png in Resources","30E1352710E2C1420031B30D":{"isa":"PBXBuildFile","fileRef":"30E1352610E2C1420031B30D","fileRef_comment":"PhoneGap.plist"},"30E1352710E2C1420031B30D_comment":"PhoneGap.plist in Resources","30E5649213A7FCAF007403D8":{"isa":"PBXBuildFile","fileRef":"30E5649113A7FCAF007403D8","fileRef_comment":"CoreMedia.framework","settings":{"ATTRIBUTES":["Weak"]}},"30E5649213A7FCAF007403D8_comment":"CoreMedia.framework in Frameworks"},"PBXContainerItemProxy":{"301BF534109A57CC0062928A":{"isa":"PBXContainerItemProxy","containerPortal":"301BF52D109A57CC0062928A","containerPortal_comment":"PhoneGapLib.xcodeproj","proxyType":2,"remoteGlobalIDString":"D2AAC07E0554694100DB518D","remoteInfo":"PhoneGapLib"},"301BF534109A57CC0062928A_comment":"PBXContainerItemProxy","301BF550109A68C00062928A":{"isa":"PBXContainerItemProxy","containerPortal":"301BF52D109A57CC0062928A","containerPortal_comment":"PhoneGapLib.xcodeproj","proxyType":1,"remoteGlobalIDString":"D2AAC07D0554694100DB518D","remoteInfo":"PhoneGapLib"},"301BF550109A68C00062928A_comment":"PBXContainerItemProxy","30E47BC2136F595F00DBB853":{"isa":"PBXContainerItemProxy","containerPortal":"301BF52D109A57CC0062928A","containerPortal_comment":"PhoneGapLib.xcodeproj","proxyType":2,"remoteGlobalIDString":"303258D8136B2C9400982B63","remoteInfo":"PhoneGap"},"30E47BC2136F595F00DBB853_comment":"PBXContainerItemProxy"},"PBXFileReference":{"1D30AB110D05D00D00671497":{"isa":"PBXFileReference","lastKnownFileType":"wrapper.framework","name":"Foundation.framework","path":"System/Library/Frameworks/Foundation.framework","sourceTree":"SDKROOT"},"1D30AB110D05D00D00671497_comment":"Foundation.framework","1D3623240D0F684500981E51":{"isa":"PBXFileReference","fileEncoding":4,"lastKnownFileType":"sourcecode.c.h","path":"AppDelegate.h","sourceTree":"\"\""},"1D3623240D0F684500981E51_comment":"AppDelegate.h","1D3623250D0F684500981E51":{"isa":"PBXFileReference","fileEncoding":4,"lastKnownFileType":"sourcecode.c.objc","path":"AppDelegate.m","sourceTree":"\"\""},"1D3623250D0F684500981E51_comment":"AppDelegate.m","1D6058910D05DD3D006BFB54":{"isa":"PBXFileReference","explicitFileType":"wrapper.application","includeInIndex":0,"path":"\"KitchenSinktablet.app\"","sourceTree":"BUILT_PRODUCTS_DIR"},"1D6058910D05DD3D006BFB54_comment":"KitchenSinktablet.app","1DF5F4DF0D08C38300B7A737":{"isa":"PBXFileReference","lastKnownFileType":"wrapper.framework","name":"UIKit.framework","path":"System/Library/Frameworks/UIKit.framework","sourceTree":"SDKROOT"},"1DF5F4DF0D08C38300B7A737_comment":"UIKit.framework","1F766FDD13BBADB100FB74C0":{"isa":"PBXFileReference","lastKnownFileType":"text.plist.strings","name":"en","path":"Localizable.strings","sourceTree":"\"\""},"1F766FDD13BBADB100FB74C0_comment":"en","1F766FE013BBADB100FB74C0":{"isa":"PBXFileReference","lastKnownFileType":"text.plist.strings","name":"es","path":"Localizable.strings","sourceTree":"\"\""},"1F766FE013BBADB100FB74C0_comment":"es","288765FC0DF74451002DB57D":{"isa":"PBXFileReference","lastKnownFileType":"wrapper.framework","name":"CoreGraphics.framework","path":"System/Library/Frameworks/CoreGraphics.framework","sourceTree":"SDKROOT"},"288765FC0DF74451002DB57D_comment":"CoreGraphics.framework","29B97316FDCFA39411CA2CEA":{"isa":"PBXFileReference","fileEncoding":4,"lastKnownFileType":"sourcecode.c.objc","path":"main.m","sourceTree":"\"\""},"29B97316FDCFA39411CA2CEA_comment":"main.m","301BF52D109A57CC0062928A":{"isa":"PBXFileReference","lastKnownFileType":"\"wrapper.pb-project\"","path":"PhoneGapLib.xcodeproj","sourceTree":"PHONEGAPLIB"},"301BF52D109A57CC0062928A_comment":"PhoneGapLib.xcodeproj","301BF56E109A69640062928A":{"isa":"PBXFileReference","lastKnownFileType":"folder","path":"www","sourceTree":"SOURCE_ROOT"},"301BF56E109A69640062928A_comment":"www","301BF5B4109A6A2B0062928A":{"isa":"PBXFileReference","lastKnownFileType":"wrapper.framework","name":"AddressBook.framework","path":"System/Library/Frameworks/AddressBook.framework","sourceTree":"SDKROOT"},"301BF5B4109A6A2B0062928A_comment":"AddressBook.framework","301BF5B6109A6A2B0062928A":{"isa":"PBXFileReference","lastKnownFileType":"wrapper.framework","name":"AddressBookUI.framework","path":"System/Library/Frameworks/AddressBookUI.framework","sourceTree":"SDKROOT"},"301BF5B6109A6A2B0062928A_comment":"AddressBookUI.framework","301BF5B8109A6A2B0062928A":{"isa":"PBXFileReference","lastKnownFileType":"wrapper.framework","name":"AudioToolbox.framework","path":"System/Library/Frameworks/AudioToolbox.framework","sourceTree":"SDKROOT"},"301BF5B8109A6A2B0062928A_comment":"AudioToolbox.framework","301BF5BA109A6A2B0062928A":{"isa":"PBXFileReference","lastKnownFileType":"wrapper.framework","name":"AVFoundation.framework","path":"System/Library/Frameworks/AVFoundation.framework","sourceTree":"SDKROOT"},"301BF5BA109A6A2B0062928A_comment":"AVFoundation.framework","301BF5BC109A6A2B0062928A":{"isa":"PBXFileReference","lastKnownFileType":"wrapper.framework","name":"CFNetwork.framework","path":"System/Library/Frameworks/CFNetwork.framework","sourceTree":"SDKROOT"},"301BF5BC109A6A2B0062928A_comment":"CFNetwork.framework","301BF5BE109A6A2B0062928A":{"isa":"PBXFileReference","lastKnownFileType":"wrapper.framework","name":"CoreLocation.framework","path":"System/Library/Frameworks/CoreLocation.framework","sourceTree":"SDKROOT"},"301BF5BE109A6A2B0062928A_comment":"CoreLocation.framework","301BF5C0109A6A2B0062928A":{"isa":"PBXFileReference","lastKnownFileType":"wrapper.framework","name":"MediaPlayer.framework","path":"System/Library/Frameworks/MediaPlayer.framework","sourceTree":"SDKROOT"},"301BF5C0109A6A2B0062928A_comment":"MediaPlayer.framework","301BF5C2109A6A2B0062928A":{"isa":"PBXFileReference","lastKnownFileType":"wrapper.framework","name":"QuartzCore.framework","path":"System/Library/Frameworks/QuartzCore.framework","sourceTree":"SDKROOT"},"301BF5C2109A6A2B0062928A_comment":"QuartzCore.framework","301BF5C4109A6A2B0062928A":{"isa":"PBXFileReference","lastKnownFileType":"wrapper.framework","name":"SystemConfiguration.framework","path":"System/Library/Frameworks/SystemConfiguration.framework","sourceTree":"SDKROOT"},"301BF5C4109A6A2B0062928A_comment":"SystemConfiguration.framework","3053AC6E109B7857006FCFE7":{"isa":"PBXFileReference","fileEncoding":4,"lastKnownFileType":"text","path":"VERSION","sourceTree":"PHONEGAPLIB"},"3053AC6E109B7857006FCFE7_comment":"VERSION","305D5FD0115AB8F900A74A75":{"isa":"PBXFileReference","lastKnownFileType":"wrapper.framework","name":"MobileCoreServices.framework","path":"System/Library/Frameworks/MobileCoreServices.framework","sourceTree":"SDKROOT"},"305D5FD0115AB8F900A74A75_comment":"MobileCoreServices.framework","3072F99613A8081B00425683":{"isa":"PBXFileReference","lastKnownFileType":"\"wrapper.plug-in\"","name":"Capture.bundle","path":"Resources/Capture.bundle","sourceTree":"\"\""},"3072F99613A8081B00425683_comment":"Capture.bundle","307D28A1123043350040C0FA":{"isa":"PBXFileReference","fileEncoding":4,"lastKnownFileType":"text.xcconfig","path":"PhoneGapBuildSettings.xcconfig","sourceTree":"\"\""},"307D28A1123043350040C0FA_comment":"PhoneGapBuildSettings.xcconfig","308D052E1370CCF300D202BF":{"isa":"PBXFileReference","lastKnownFileType":"image.png","path":"\"icon-72.png\"","sourceTree":"\"\""},"308D052E1370CCF300D202BF_comment":"icon-72.png","308D052F1370CCF300D202BF":{"isa":"PBXFileReference","lastKnownFileType":"image.png","path":"icon.png","sourceTree":"\"\""},"308D052F1370CCF300D202BF_comment":"icon.png","308D05301370CCF300D202BF":{"isa":"PBXFileReference","lastKnownFileType":"image.png","path":"\"icon@2x.png\"","sourceTree":"\"\""},"308D05301370CCF300D202BF_comment":"icon@2x.png","308D05341370CCF300D202BF":{"isa":"PBXFileReference","lastKnownFileType":"image.png","path":"Default.png","sourceTree":"\"\""},"308D05341370CCF300D202BF_comment":"Default.png","308D05351370CCF300D202BF":{"isa":"PBXFileReference","lastKnownFileType":"image.png","path":"\"Default@2x.png\"","sourceTree":"\"\""},"308D05351370CCF300D202BF_comment":"Default@2x.png","30E1352610E2C1420031B30D":{"isa":"PBXFileReference","fileEncoding":4,"lastKnownFileType":"text.plist.xml","path":"PhoneGap.plist","sourceTree":"\"\""},"30E1352610E2C1420031B30D_comment":"PhoneGap.plist","30E5649113A7FCAF007403D8":{"isa":"PBXFileReference","lastKnownFileType":"wrapper.framework","name":"CoreMedia.framework","path":"System/Library/Frameworks/CoreMedia.framework","sourceTree":"SDKROOT"},"30E5649113A7FCAF007403D8_comment":"CoreMedia.framework","32CA4F630368D1EE00C91783":{"isa":"PBXFileReference","fileEncoding":4,"lastKnownFileType":"sourcecode.c.h","path":"\"KitchenSinktablet-Prefix.pch\"","sourceTree":"\"\""},"32CA4F630368D1EE00C91783_comment":"KitchenSinktablet-Prefix.pch","8D1107310486CEB800E47090":{"isa":"PBXFileReference","fileEncoding":4,"lastKnownFileType":"text.plist.xml","path":"\"KitchenSinktablet-Info.plist\"","plistStructureDefinitionIdentifier":"\"com.apple.xcode.plist.structure-definition.iphone.info-plist\"","sourceTree":"\"\""},"8D1107310486CEB800E47090_comment":"KitchenSinktablet-Info.plist"},"PBXFrameworksBuildPhase":{"1D60588F0D05DD3D006BFB54":{"isa":"PBXFrameworksBuildPhase","buildActionMask":2147483647,"files":[{"value":"301BF552109A68D80062928A","comment":"libPhoneGap.a in Frameworks"},{"value":"1D60589F0D05DD5A006BFB54","comment":"Foundation.framework in Frameworks"},{"value":"1DF5F4E00D08C38300B7A737","comment":"UIKit.framework in Frameworks"},{"value":"288765FD0DF74451002DB57D","comment":"CoreGraphics.framework in Frameworks"},{"value":"301BF5B5109A6A2B0062928A","comment":"AddressBook.framework in Frameworks"},{"value":"301BF5B7109A6A2B0062928A","comment":"AddressBookUI.framework in Frameworks"},{"value":"301BF5B9109A6A2B0062928A","comment":"AudioToolbox.framework in Frameworks"},{"value":"301BF5BB109A6A2B0062928A","comment":"AVFoundation.framework in Frameworks"},{"value":"301BF5BD109A6A2B0062928A","comment":"CFNetwork.framework in Frameworks"},{"value":"301BF5BF109A6A2B0062928A","comment":"CoreLocation.framework in Frameworks"},{"value":"301BF5C1109A6A2B0062928A","comment":"MediaPlayer.framework in Frameworks"},{"value":"301BF5C3109A6A2B0062928A","comment":"QuartzCore.framework in Frameworks"},{"value":"301BF5C5109A6A2B0062928A","comment":"SystemConfiguration.framework in Frameworks"},{"value":"305D5FD1115AB8F900A74A75","comment":"MobileCoreServices.framework in Frameworks"},{"value":"30E5649213A7FCAF007403D8","comment":"CoreMedia.framework in Frameworks"}],"runOnlyForDeploymentPostprocessing":0},"1D60588F0D05DD3D006BFB54_comment":"Frameworks"},"PBXGroup":{"080E96DDFE201D6D7F000001":{"isa":"PBXGroup","children":[{"value":"1D3623240D0F684500981E51","comment":"AppDelegate.h"},{"value":"1D3623250D0F684500981E51","comment":"AppDelegate.m"}],"path":"Classes","sourceTree":"SOURCE_ROOT"},"080E96DDFE201D6D7F000001_comment":"Classes","19C28FACFE9D520D11CA2CBB":{"isa":"PBXGroup","children":[{"value":"1D6058910D05DD3D006BFB54","comment":"KitchenSinktablet.app"}],"name":"Products","sourceTree":"\"\""},"19C28FACFE9D520D11CA2CBB_comment":"Products","1F766FDB13BBADB100FB74C0":{"isa":"PBXGroup","children":[{"value":"1F766FDC13BBADB100FB74C0","comment":"Localizable.strings"}],"name":"en.lproj","path":"Resources/en.lproj","sourceTree":"\"\""},"1F766FDB13BBADB100FB74C0_comment":"en.lproj","1F766FDE13BBADB100FB74C0":{"isa":"PBXGroup","children":[{"value":"1F766FDF13BBADB100FB74C0","comment":"Localizable.strings"}],"name":"es.lproj","path":"Resources/es.lproj","sourceTree":"\"\""},"1F766FDE13BBADB100FB74C0_comment":"es.lproj","29B97314FDCFA39411CA2CEA":{"isa":"PBXGroup","children":[{"value":"301BF56E109A69640062928A","comment":"www"},{"value":"301BF52D109A57CC0062928A","comment":"PhoneGapLib.xcodeproj"},{"value":"080E96DDFE201D6D7F000001","comment":"Classes"},{"value":"307C750510C5A3420062BCA9","comment":"Plugins"},{"value":"29B97315FDCFA39411CA2CEA","comment":"Other Sources"},{"value":"29B97317FDCFA39411CA2CEA","comment":"Resources"},{"value":"29B97323FDCFA39411CA2CEA","comment":"Frameworks"},{"value":"19C28FACFE9D520D11CA2CBB","comment":"Products"}],"name":"CustomTemplate","sourceTree":"\"\""},"29B97314FDCFA39411CA2CEA_comment":"CustomTemplate","29B97315FDCFA39411CA2CEA":{"isa":"PBXGroup","children":[{"value":"32CA4F630368D1EE00C91783","comment":"KitchenSinktablet-Prefix.pch"},{"value":"29B97316FDCFA39411CA2CEA","comment":"main.m"}],"name":"\"Other Sources\"","sourceTree":"\"\""},"29B97315FDCFA39411CA2CEA_comment":"Other Sources","29B97317FDCFA39411CA2CEA":{"isa":"PBXGroup","children":[{"value":"1F766FDB13BBADB100FB74C0","comment":"en.lproj"},{"value":"1F766FDE13BBADB100FB74C0","comment":"es.lproj"},{"value":"3072F99613A8081B00425683","comment":"Capture.bundle"},{"value":"308D052D1370CCF300D202BF","comment":"icons"},{"value":"308D05311370CCF300D202BF","comment":"splash"},{"value":"30E1352610E2C1420031B30D","comment":"PhoneGap.plist"},{"value":"3053AC6E109B7857006FCFE7","comment":"VERSION"},{"value":"8D1107310486CEB800E47090","comment":"KitchenSinktablet-Info.plist"},{"value":"307D28A1123043350040C0FA","comment":"PhoneGapBuildSettings.xcconfig"}],"name":"Resources","sourceTree":"\"\""},"29B97317FDCFA39411CA2CEA_comment":"Resources","29B97323FDCFA39411CA2CEA":{"isa":"PBXGroup","children":[{"value":"1DF5F4DF0D08C38300B7A737","comment":"UIKit.framework"},{"value":"1D30AB110D05D00D00671497","comment":"Foundation.framework"},{"value":"288765FC0DF74451002DB57D","comment":"CoreGraphics.framework"},{"value":"301BF5B4109A6A2B0062928A","comment":"AddressBook.framework"},{"value":"301BF5B6109A6A2B0062928A","comment":"AddressBookUI.framework"},{"value":"301BF5B8109A6A2B0062928A","comment":"AudioToolbox.framework"},{"value":"301BF5BA109A6A2B0062928A","comment":"AVFoundation.framework"},{"value":"301BF5BC109A6A2B0062928A","comment":"CFNetwork.framework"},{"value":"301BF5BE109A6A2B0062928A","comment":"CoreLocation.framework"},{"value":"301BF5C0109A6A2B0062928A","comment":"MediaPlayer.framework"},{"value":"301BF5C2109A6A2B0062928A","comment":"QuartzCore.framework"},{"value":"301BF5C4109A6A2B0062928A","comment":"SystemConfiguration.framework"},{"value":"305D5FD0115AB8F900A74A75","comment":"MobileCoreServices.framework"},{"value":"30E5649113A7FCAF007403D8","comment":"CoreMedia.framework"}],"name":"Frameworks","sourceTree":"\"\""},"29B97323FDCFA39411CA2CEA_comment":"Frameworks","301BF52E109A57CC0062928A":{"isa":"PBXGroup","children":[{"value":"301BF535109A57CC0062928A","comment":"libPhoneGap.a"},{"value":"30E47BC3136F595F00DBB853","comment":"PhoneGap.framework"}],"name":"Products","sourceTree":"\"\""},"301BF52E109A57CC0062928A_comment":"Products","307C750510C5A3420062BCA9":{"isa":"PBXGroup","children":[],"path":"Plugins","sourceTree":"SOURCE_ROOT"},"307C750510C5A3420062BCA9_comment":"Plugins","308D052D1370CCF300D202BF":{"isa":"PBXGroup","children":[{"value":"308D052E1370CCF300D202BF","comment":"icon-72.png"},{"value":"308D052F1370CCF300D202BF","comment":"icon.png"},{"value":"308D05301370CCF300D202BF","comment":"icon@2x.png"}],"name":"icons","path":"Resources/icons","sourceTree":"\"\""},"308D052D1370CCF300D202BF_comment":"icons","308D05311370CCF300D202BF":{"isa":"PBXGroup","children":[{"value":"308D05341370CCF300D202BF","comment":"Default.png"},{"value":"308D05351370CCF300D202BF","comment":"Default@2x.png"}],"name":"splash","path":"Resources/splash","sourceTree":"\"\""},"308D05311370CCF300D202BF_comment":"splash"},"PBXNativeTarget":{"1D6058900D05DD3D006BFB54":{"isa":"PBXNativeTarget","buildConfigurationList":"1D6058960D05DD3E006BFB54","buildConfigurationList_comment":"Build configuration list for PBXNativeTarget \"KitchenSinktablet\"","buildPhases":[{"value":"304B58A110DAC018002A0835","comment":"Touch www folder"},{"value":"1D60588D0D05DD3D006BFB54","comment":"Resources"},{"value":"1D60588E0D05DD3D006BFB54","comment":"Sources"},{"value":"1D60588F0D05DD3D006BFB54","comment":"Frameworks"}],"buildRules":[],"dependencies":[{"value":"301BF551109A68C00062928A","comment":"PBXTargetDependency"}],"name":"\"KitchenSinktablet\"","productName":"\"KitchenSinktablet\"","productReference":"1D6058910D05DD3D006BFB54","productReference_comment":"KitchenSinktablet.app","productType":"\"com.apple.product-type.application\""},"1D6058900D05DD3D006BFB54_comment":"KitchenSinktablet"},"PBXProject":{"29B97313FDCFA39411CA2CEA":{"isa":"PBXProject","buildConfigurationList":"C01FCF4E08A954540054247B","buildConfigurationList_comment":"Build configuration list for PBXProject \"KitchenSinktablet\"","compatibilityVersion":"\"Xcode 3.1\"","developmentRegion":"English","hasScannedForEncodings":1,"knownRegions":["English","Japanese","French","German","en","es"],"mainGroup":"29B97314FDCFA39411CA2CEA","mainGroup_comment":"CustomTemplate","projectDirPath":"\"\"","projectReferences":[{"ProductGroup":"301BF52E109A57CC0062928A","ProductGroup_comment":"Products","ProjectRef":"301BF52D109A57CC0062928A","ProjectRef_comment":"PhoneGapLib.xcodeproj"}],"projectRoot":"\"\"","targets":[{"value":"1D6058900D05DD3D006BFB54","comment":"KitchenSinktablet"}]},"29B97313FDCFA39411CA2CEA_comment":"Project object"},"PBXReferenceProxy":{"301BF535109A57CC0062928A":{"isa":"PBXReferenceProxy","fileType":"archive.ar","path":"libPhoneGap.a","remoteRef":"301BF534109A57CC0062928A","remoteRef_comment":"PBXContainerItemProxy","sourceTree":"BUILT_PRODUCTS_DIR"},"301BF535109A57CC0062928A_comment":"libPhoneGap.a","30E47BC3136F595F00DBB853":{"isa":"PBXReferenceProxy","fileType":"wrapper.cfbundle","path":"PhoneGap.framework","remoteRef":"30E47BC2136F595F00DBB853","remoteRef_comment":"PBXContainerItemProxy","sourceTree":"BUILT_PRODUCTS_DIR"},"30E47BC3136F595F00DBB853_comment":"PhoneGap.framework"},"PBXResourcesBuildPhase":{"1D60588D0D05DD3D006BFB54":{"isa":"PBXResourcesBuildPhase","buildActionMask":2147483647,"files":[{"value":"301BF570109A69640062928A","comment":"www in Resources"},{"value":"3053AC6F109B7857006FCFE7","comment":"VERSION in Resources"},{"value":"30E1352710E2C1420031B30D","comment":"PhoneGap.plist in Resources"},{"value":"307D28A2123043360040C0FA","comment":"PhoneGapBuildSettings.xcconfig in Resources"},{"value":"308D05371370CCF300D202BF","comment":"icon-72.png in Resources"},{"value":"308D05381370CCF300D202BF","comment":"icon.png in Resources"},{"value":"308D05391370CCF300D202BF","comment":"icon@2x.png in Resources"},{"value":"308D053C1370CCF300D202BF","comment":"Default.png in Resources"},{"value":"308D053D1370CCF300D202BF","comment":"Default@2x.png in Resources"},{"value":"3072F99713A8081B00425683","comment":"Capture.bundle in Resources"},{"value":"1F766FE113BBADB100FB74C0","comment":"Localizable.strings in Resources"},{"value":"1F766FE213BBADB100FB74C0","comment":"Localizable.strings in Resources"}],"runOnlyForDeploymentPostprocessing":0},"1D60588D0D05DD3D006BFB54_comment":"Resources"},"PBXShellScriptBuildPhase":{"304B58A110DAC018002A0835":{"isa":"PBXShellScriptBuildPhase","buildActionMask":2147483647,"files":[],"inputPaths":[],"name":"\"Touch www folder\"","outputPaths":[],"runOnlyForDeploymentPostprocessing":0,"shellPath":"/bin/sh","shellScript":"\"touch -cm ${PROJECT_DIR}/www\""},"304B58A110DAC018002A0835_comment":"Touch www folder"},"PBXSourcesBuildPhase":{"1D60588E0D05DD3D006BFB54":{"isa":"PBXSourcesBuildPhase","buildActionMask":2147483647,"files":[{"value":"1D60589B0D05DD56006BFB54","comment":"main.m in Sources"},{"value":"1D3623260D0F684500981E51","comment":"AppDelegate.m in Sources"}],"runOnlyForDeploymentPostprocessing":0},"1D60588E0D05DD3D006BFB54_comment":"Sources"},"PBXTargetDependency":{"301BF551109A68C00062928A":{"isa":"PBXTargetDependency","name":"PhoneGapLib","targetProxy":"301BF550109A68C00062928A","targetProxy_comment":"PBXContainerItemProxy"},"301BF551109A68C00062928A_comment":"PBXTargetDependency"},"PBXVariantGroup":{"1F766FDC13BBADB100FB74C0":{"isa":"PBXVariantGroup","children":[{"value":"1F766FDD13BBADB100FB74C0","comment":"en"}],"name":"Localizable.strings","sourceTree":"\"\""},"1F766FDC13BBADB100FB74C0_comment":"Localizable.strings","1F766FDF13BBADB100FB74C0":{"isa":"PBXVariantGroup","children":[{"value":"1F766FE013BBADB100FB74C0","comment":"es"}],"name":"Localizable.strings","sourceTree":"\"\""},"1F766FDF13BBADB100FB74C0_comment":"Localizable.strings"},"XCBuildConfiguration":{"1D6058940D05DD3E006BFB54":{"isa":"XCBuildConfiguration","buildSettings":{"ALWAYS_SEARCH_USER_PATHS":"NO","ARCHS":["armv6","armv7"],"COPY_PHASE_STRIP":"NO","GCC_DYNAMIC_NO_PIC":"NO","GCC_OPTIMIZATION_LEVEL":0,"GCC_PRECOMPILE_PREFIX_HEADER":"YES","GCC_PREFIX_HEADER":"\"KitchenSinktablet-Prefix.pch\"","INFOPLIST_FILE":"\"KitchenSinktablet-Info.plist\"","IPHONEOS_DEPLOYMENT_TARGET":"3.0","ONLY_ACTIVE_ARCH":"NO","PRODUCT_NAME":"\"KitchenSinktablet\"","TARGETED_DEVICE_FAMILY":"\"1,2\""},"name":"Debug"},"1D6058940D05DD3E006BFB54_comment":"Debug","1D6058950D05DD3E006BFB54":{"isa":"XCBuildConfiguration","buildSettings":{"ALWAYS_SEARCH_USER_PATHS":"NO","ARCHS":["armv6","armv7"],"COPY_PHASE_STRIP":"YES","GCC_PRECOMPILE_PREFIX_HEADER":"YES","GCC_PREFIX_HEADER":"\"KitchenSinktablet-Prefix.pch\"","INFOPLIST_FILE":"\"KitchenSinktablet-Info.plist\"","IPHONEOS_DEPLOYMENT_TARGET":"3.0","ONLY_ACTIVE_ARCH":"NO","PRODUCT_NAME":"\"KitchenSinktablet\"","TARGETED_DEVICE_FAMILY":"\"1,2\""},"name":"Release"},"1D6058950D05DD3E006BFB54_comment":"Release","C01FCF4F08A954540054247B":{"isa":"XCBuildConfiguration","baseConfigurationReference":"307D28A1123043350040C0FA","baseConfigurationReference_comment":"PhoneGapBuildSettings.xcconfig","buildSettings":{"ARCHS":"\"$(ARCHS_STANDARD_32_BIT)\"","\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\"":"\"iPhone Distribution\"","GCC_C_LANGUAGE_STANDARD":"c99","GCC_VERSION":"com.apple.compilers.llvmgcc42","GCC_WARN_ABOUT_RETURN_TYPE":"YES","GCC_WARN_UNUSED_VARIABLE":"YES","IPHONEOS_DEPLOYMENT_TARGET":"3.0","OTHER_LDFLAGS":["\"-weak_framework\"","UIKit","\"-weak_framework\"","AVFoundation","\"-weak_framework\"","CoreMedia","\"-weak_library\"","/usr/lib/libSystem.B.dylib","\"-all_load\"","\"-Obj-C\""],"PREBINDING":"NO","SDKROOT":"iphoneos","SKIP_INSTALL":"NO","USER_HEADER_SEARCH_PATHS":"\"\"$(PHONEGAPLIB)/Classes/JSON\" \"$(PHONEGAPLIB)/Classes\"\""},"name":"Debug"},"C01FCF4F08A954540054247B_comment":"Debug","C01FCF5008A954540054247B":{"isa":"XCBuildConfiguration","baseConfigurationReference":"307D28A1123043350040C0FA","baseConfigurationReference_comment":"PhoneGapBuildSettings.xcconfig","buildSettings":{"ARCHS":"\"$(ARCHS_STANDARD_32_BIT)\"","\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\"":"\"iPhone Distribution\"","GCC_C_LANGUAGE_STANDARD":"c99","GCC_VERSION":"com.apple.compilers.llvmgcc42","GCC_WARN_ABOUT_RETURN_TYPE":"YES","GCC_WARN_UNUSED_VARIABLE":"YES","IPHONEOS_DEPLOYMENT_TARGET":"3.0","OTHER_LDFLAGS":["\"-weak_framework\"","UIKit","\"-weak_framework\"","AVFoundation","\"-weak_framework\"","CoreMedia","\"-weak_library\"","/usr/lib/libSystem.B.dylib","\"-all_load\"","\"-Obj-C\""],"PREBINDING":"NO","SDKROOT":"iphoneos","SKIP_INSTALL":"NO","USER_HEADER_SEARCH_PATHS":"\"\"$(PHONEGAPLIB)/Classes/JSON\" \"$(PHONEGAPLIB)/Classes\"\""},"name":"Release"},"C01FCF5008A954540054247B_comment":"Release"},"XCConfigurationList":{"1D6058960D05DD3E006BFB54":{"isa":"XCConfigurationList","buildConfigurations":[{"value":"1D6058940D05DD3E006BFB54","comment":"Debug"},{"value":"1D6058950D05DD3E006BFB54","comment":"Release"}],"defaultConfigurationIsVisible":0,"defaultConfigurationName":"Release"},"1D6058960D05DD3E006BFB54_comment":"Build configuration list for PBXNativeTarget \"KitchenSinktablet\"","C01FCF4E08A954540054247B":{"isa":"XCConfigurationList","buildConfigurations":[{"value":"C01FCF4F08A954540054247B","comment":"Debug"},{"value":"C01FCF5008A954540054247B","comment":"Release"}],"defaultConfigurationIsVisible":0,"defaultConfigurationName":"Release"},"C01FCF4E08A954540054247B_comment":"Build configuration list for PBXProject \"KitchenSinktablet\""}},"rootObject":"29B97313FDCFA39411CA2CEA","rootObject_comment":"Project object"},"headComment":"!$*UTF8*$!"} +{"project":{"archiveVersion":1,"classes":{},"objectVersion":45,"objects":{"PBXBuildFile":{"1D3623260D0F684500981E51":{"isa":"PBXBuildFile","fileRef":"1D3623250D0F684500981E51","fileRef_comment":"AppDelegate.m"},"1D3623260D0F684500981E51_comment":"AppDelegate.m in Sources","1D60589B0D05DD56006BFB54":{"isa":"PBXBuildFile","fileRef":"29B97316FDCFA39411CA2CEA","fileRef_comment":"main.m"},"1D60589B0D05DD56006BFB54_comment":"main.m in Sources","1D60589F0D05DD5A006BFB54":{"isa":"PBXBuildFile","fileRef":"1D30AB110D05D00D00671497","fileRef_comment":"Foundation.framework"},"1D60589F0D05DD5A006BFB54_comment":"Foundation.framework in Frameworks","1DF5F4E00D08C38300B7A737":{"isa":"PBXBuildFile","fileRef":"1DF5F4DF0D08C38300B7A737","fileRef_comment":"UIKit.framework","settings":{"ATTRIBUTES":["Weak"]}},"1DF5F4E00D08C38300B7A737_comment":"UIKit.framework in Frameworks","1F766FE113BBADB100FB74C0":{"isa":"PBXBuildFile","fileRef":"1F766FDC13BBADB100FB74C0","fileRef_comment":"Localizable.strings"},"1F766FE113BBADB100FB74C0_comment":"Localizable.strings in Resources","1F766FE213BBADB100FB74C0":{"isa":"PBXBuildFile","fileRef":"1F766FDF13BBADB100FB74C0","fileRef_comment":"Localizable.strings"},"1F766FE213BBADB100FB74C0_comment":"Localizable.strings in Resources","288765FD0DF74451002DB57D":{"isa":"PBXBuildFile","fileRef":"288765FC0DF74451002DB57D","fileRef_comment":"CoreGraphics.framework"},"288765FD0DF74451002DB57D_comment":"CoreGraphics.framework in Frameworks","301BF552109A68D80062928A":{"isa":"PBXBuildFile","fileRef":"301BF535109A57CC0062928A","fileRef_comment":"libPhoneGap.a"},"301BF552109A68D80062928A_comment":"libPhoneGap.a in Frameworks","301BF570109A69640062928A":{"isa":"PBXBuildFile","fileRef":"301BF56E109A69640062928A","fileRef_comment":"www"},"301BF570109A69640062928A_comment":"www in Resources","301BF5B5109A6A2B0062928A":{"isa":"PBXBuildFile","fileRef":"301BF5B4109A6A2B0062928A","fileRef_comment":"AddressBook.framework"},"301BF5B5109A6A2B0062928A_comment":"AddressBook.framework in Frameworks","301BF5B7109A6A2B0062928A":{"isa":"PBXBuildFile","fileRef":"301BF5B6109A6A2B0062928A","fileRef_comment":"AddressBookUI.framework"},"301BF5B7109A6A2B0062928A_comment":"AddressBookUI.framework in Frameworks","301BF5B9109A6A2B0062928A":{"isa":"PBXBuildFile","fileRef":"301BF5B8109A6A2B0062928A","fileRef_comment":"AudioToolbox.framework"},"301BF5B9109A6A2B0062928A_comment":"AudioToolbox.framework in Frameworks","301BF5BB109A6A2B0062928A":{"isa":"PBXBuildFile","fileRef":"301BF5BA109A6A2B0062928A","fileRef_comment":"AVFoundation.framework","settings":{"ATTRIBUTES":["Weak"]}},"301BF5BB109A6A2B0062928A_comment":"AVFoundation.framework in Frameworks","301BF5BD109A6A2B0062928A":{"isa":"PBXBuildFile","fileRef":"301BF5BC109A6A2B0062928A","fileRef_comment":"CFNetwork.framework"},"301BF5BD109A6A2B0062928A_comment":"CFNetwork.framework in Frameworks","301BF5BF109A6A2B0062928A":{"isa":"PBXBuildFile","fileRef":"301BF5BE109A6A2B0062928A","fileRef_comment":"CoreLocation.framework"},"301BF5BF109A6A2B0062928A_comment":"CoreLocation.framework in Frameworks","301BF5C1109A6A2B0062928A":{"isa":"PBXBuildFile","fileRef":"301BF5C0109A6A2B0062928A","fileRef_comment":"MediaPlayer.framework"},"301BF5C1109A6A2B0062928A_comment":"MediaPlayer.framework in Frameworks","301BF5C3109A6A2B0062928A":{"isa":"PBXBuildFile","fileRef":"301BF5C2109A6A2B0062928A","fileRef_comment":"QuartzCore.framework"},"301BF5C3109A6A2B0062928A_comment":"QuartzCore.framework in Frameworks","301BF5C5109A6A2B0062928A":{"isa":"PBXBuildFile","fileRef":"301BF5C4109A6A2B0062928A","fileRef_comment":"SystemConfiguration.framework"},"301BF5C5109A6A2B0062928A_comment":"SystemConfiguration.framework in Frameworks","3053AC6F109B7857006FCFE7":{"isa":"PBXBuildFile","fileRef":"3053AC6E109B7857006FCFE7","fileRef_comment":"VERSION"},"3053AC6F109B7857006FCFE7_comment":"VERSION in Resources","305D5FD1115AB8F900A74A75":{"isa":"PBXBuildFile","fileRef":"305D5FD0115AB8F900A74A75","fileRef_comment":"MobileCoreServices.framework"},"305D5FD1115AB8F900A74A75_comment":"MobileCoreServices.framework in Frameworks","3072F99713A8081B00425683":{"isa":"PBXBuildFile","fileRef":"3072F99613A8081B00425683","fileRef_comment":"Capture.bundle"},"3072F99713A8081B00425683_comment":"Capture.bundle in Resources","307D28A2123043360040C0FA":{"isa":"PBXBuildFile","fileRef":"307D28A1123043350040C0FA","fileRef_comment":"PhoneGapBuildSettings.xcconfig"},"307D28A2123043360040C0FA_comment":"PhoneGapBuildSettings.xcconfig in Resources","308D05371370CCF300D202BF":{"isa":"PBXBuildFile","fileRef":"308D052E1370CCF300D202BF","fileRef_comment":"icon-72.png"},"308D05371370CCF300D202BF_comment":"icon-72.png in Resources","308D05381370CCF300D202BF":{"isa":"PBXBuildFile","fileRef":"308D052F1370CCF300D202BF","fileRef_comment":"icon.png"},"308D05381370CCF300D202BF_comment":"icon.png in Resources","308D05391370CCF300D202BF":{"isa":"PBXBuildFile","fileRef":"308D05301370CCF300D202BF","fileRef_comment":"icon@2x.png"},"308D05391370CCF300D202BF_comment":"icon@2x.png in Resources","308D053C1370CCF300D202BF":{"isa":"PBXBuildFile","fileRef":"308D05341370CCF300D202BF","fileRef_comment":"Default.png"},"308D053C1370CCF300D202BF_comment":"Default.png in Resources","308D053D1370CCF300D202BF":{"isa":"PBXBuildFile","fileRef":"308D05351370CCF300D202BF","fileRef_comment":"Default@2x.png"},"308D053D1370CCF300D202BF_comment":"Default@2x.png in Resources","30E1352710E2C1420031B30D":{"isa":"PBXBuildFile","fileRef":"30E1352610E2C1420031B30D","fileRef_comment":"PhoneGap.plist"},"30E1352710E2C1420031B30D_comment":"PhoneGap.plist in Resources","30E5649213A7FCAF007403D8":{"isa":"PBXBuildFile","fileRef":"30E5649113A7FCAF007403D8","fileRef_comment":"CoreMedia.framework","settings":{"ATTRIBUTES":["Weak"]}},"30E5649213A7FCAF007403D8_comment":"CoreMedia.framework in Frameworks"},"PBXContainerItemProxy":{"301BF534109A57CC0062928A":{"isa":"PBXContainerItemProxy","containerPortal":"301BF52D109A57CC0062928A","containerPortal_comment":"PhoneGapLib.xcodeproj","proxyType":2,"remoteGlobalIDString":"D2AAC07E0554694100DB518D","remoteInfo":"PhoneGapLib"},"301BF534109A57CC0062928A_comment":"PBXContainerItemProxy","301BF550109A68C00062928A":{"isa":"PBXContainerItemProxy","containerPortal":"301BF52D109A57CC0062928A","containerPortal_comment":"PhoneGapLib.xcodeproj","proxyType":1,"remoteGlobalIDString":"D2AAC07D0554694100DB518D","remoteInfo":"PhoneGapLib"},"301BF550109A68C00062928A_comment":"PBXContainerItemProxy","30E47BC2136F595F00DBB853":{"isa":"PBXContainerItemProxy","containerPortal":"301BF52D109A57CC0062928A","containerPortal_comment":"PhoneGapLib.xcodeproj","proxyType":2,"remoteGlobalIDString":"303258D8136B2C9400982B63","remoteInfo":"PhoneGap"},"30E47BC2136F595F00DBB853_comment":"PBXContainerItemProxy"},"PBXFileReference":{"1D30AB110D05D00D00671497":{"isa":"PBXFileReference","lastKnownFileType":"wrapper.framework","name":"Foundation.framework","path":"System/Library/Frameworks/Foundation.framework","sourceTree":"SDKROOT"},"1D30AB110D05D00D00671497_comment":"Foundation.framework","1D3623240D0F684500981E51":{"isa":"PBXFileReference","fileEncoding":4,"lastKnownFileType":"sourcecode.c.h","path":"AppDelegate.h","sourceTree":"\"\""},"1D3623240D0F684500981E51_comment":"AppDelegate.h","1D3623250D0F684500981E51":{"isa":"PBXFileReference","fileEncoding":4,"lastKnownFileType":"sourcecode.c.objc","path":"AppDelegate.m","sourceTree":"\"\""},"1D3623250D0F684500981E51_comment":"AppDelegate.m","1D6058910D05DD3D006BFB54":{"isa":"PBXFileReference","explicitFileType":"wrapper.application","includeInIndex":0,"path":"\"KitchenSinktablet.app\"","sourceTree":"BUILT_PRODUCTS_DIR"},"1D6058910D05DD3D006BFB54_comment":"KitchenSinktablet.app","1DF5F4DF0D08C38300B7A737":{"isa":"PBXFileReference","lastKnownFileType":"wrapper.framework","name":"UIKit.framework","path":"System/Library/Frameworks/UIKit.framework","sourceTree":"SDKROOT"},"1DF5F4DF0D08C38300B7A737_comment":"UIKit.framework","1F766FDD13BBADB100FB74C0":{"isa":"PBXFileReference","lastKnownFileType":"text.plist.strings","name":"en","path":"Localizable.strings","sourceTree":"\"\""},"1F766FDD13BBADB100FB74C0_comment":"en","1F766FE013BBADB100FB74C0":{"isa":"PBXFileReference","lastKnownFileType":"text.plist.strings","name":"es","path":"Localizable.strings","sourceTree":"\"\""},"1F766FE013BBADB100FB74C0_comment":"es","288765FC0DF74451002DB57D":{"isa":"PBXFileReference","lastKnownFileType":"wrapper.framework","name":"CoreGraphics.framework","path":"System/Library/Frameworks/CoreGraphics.framework","sourceTree":"SDKROOT"},"288765FC0DF74451002DB57D_comment":"CoreGraphics.framework","29B97316FDCFA39411CA2CEA":{"isa":"PBXFileReference","fileEncoding":4,"lastKnownFileType":"sourcecode.c.objc","path":"main.m","sourceTree":"\"\""},"29B97316FDCFA39411CA2CEA_comment":"main.m","301BF52D109A57CC0062928A":{"isa":"PBXFileReference","lastKnownFileType":"\"wrapper.pb-project\"","path":"PhoneGapLib.xcodeproj","sourceTree":"PHONEGAPLIB"},"301BF52D109A57CC0062928A_comment":"PhoneGapLib.xcodeproj","301BF56E109A69640062928A":{"isa":"PBXFileReference","lastKnownFileType":"folder","path":"www","sourceTree":"SOURCE_ROOT"},"301BF56E109A69640062928A_comment":"www","301BF5B4109A6A2B0062928A":{"isa":"PBXFileReference","lastKnownFileType":"wrapper.framework","name":"AddressBook.framework","path":"System/Library/Frameworks/AddressBook.framework","sourceTree":"SDKROOT"},"301BF5B4109A6A2B0062928A_comment":"AddressBook.framework","301BF5B6109A6A2B0062928A":{"isa":"PBXFileReference","lastKnownFileType":"wrapper.framework","name":"AddressBookUI.framework","path":"System/Library/Frameworks/AddressBookUI.framework","sourceTree":"SDKROOT"},"301BF5B6109A6A2B0062928A_comment":"AddressBookUI.framework","301BF5B8109A6A2B0062928A":{"isa":"PBXFileReference","lastKnownFileType":"wrapper.framework","name":"AudioToolbox.framework","path":"System/Library/Frameworks/AudioToolbox.framework","sourceTree":"SDKROOT"},"301BF5B8109A6A2B0062928A_comment":"AudioToolbox.framework","301BF5BA109A6A2B0062928A":{"isa":"PBXFileReference","lastKnownFileType":"wrapper.framework","name":"AVFoundation.framework","path":"System/Library/Frameworks/AVFoundation.framework","sourceTree":"SDKROOT"},"301BF5BA109A6A2B0062928A_comment":"AVFoundation.framework","301BF5BC109A6A2B0062928A":{"isa":"PBXFileReference","lastKnownFileType":"wrapper.framework","name":"CFNetwork.framework","path":"System/Library/Frameworks/CFNetwork.framework","sourceTree":"SDKROOT"},"301BF5BC109A6A2B0062928A_comment":"CFNetwork.framework","301BF5BE109A6A2B0062928A":{"isa":"PBXFileReference","lastKnownFileType":"wrapper.framework","name":"CoreLocation.framework","path":"System/Library/Frameworks/CoreLocation.framework","sourceTree":"SDKROOT"},"301BF5BE109A6A2B0062928A_comment":"CoreLocation.framework","301BF5C0109A6A2B0062928A":{"isa":"PBXFileReference","lastKnownFileType":"wrapper.framework","name":"MediaPlayer.framework","path":"System/Library/Frameworks/MediaPlayer.framework","sourceTree":"SDKROOT"},"301BF5C0109A6A2B0062928A_comment":"MediaPlayer.framework","301BF5C2109A6A2B0062928A":{"isa":"PBXFileReference","lastKnownFileType":"wrapper.framework","name":"QuartzCore.framework","path":"System/Library/Frameworks/QuartzCore.framework","sourceTree":"SDKROOT"},"301BF5C2109A6A2B0062928A_comment":"QuartzCore.framework","301BF5C4109A6A2B0062928A":{"isa":"PBXFileReference","lastKnownFileType":"wrapper.framework","name":"SystemConfiguration.framework","path":"System/Library/Frameworks/SystemConfiguration.framework","sourceTree":"SDKROOT"},"301BF5C4109A6A2B0062928A_comment":"SystemConfiguration.framework","3053AC6E109B7857006FCFE7":{"isa":"PBXFileReference","fileEncoding":4,"lastKnownFileType":"text","path":"VERSION","sourceTree":"PHONEGAPLIB"},"3053AC6E109B7857006FCFE7_comment":"VERSION","305D5FD0115AB8F900A74A75":{"isa":"PBXFileReference","lastKnownFileType":"wrapper.framework","name":"MobileCoreServices.framework","path":"System/Library/Frameworks/MobileCoreServices.framework","sourceTree":"SDKROOT"},"305D5FD0115AB8F900A74A75_comment":"MobileCoreServices.framework","3072F99613A8081B00425683":{"isa":"PBXFileReference","lastKnownFileType":"\"wrapper.plug-in\"","name":"Capture.bundle","path":"Resources/Capture.bundle","sourceTree":"\"\""},"3072F99613A8081B00425683_comment":"Capture.bundle","307D28A1123043350040C0FA":{"isa":"PBXFileReference","fileEncoding":4,"lastKnownFileType":"text.xcconfig","path":"PhoneGapBuildSettings.xcconfig","sourceTree":"\"\""},"307D28A1123043350040C0FA_comment":"PhoneGapBuildSettings.xcconfig","308D052E1370CCF300D202BF":{"isa":"PBXFileReference","lastKnownFileType":"image.png","path":"\"icon-72.png\"","sourceTree":"\"\""},"308D052E1370CCF300D202BF_comment":"icon-72.png","308D052F1370CCF300D202BF":{"isa":"PBXFileReference","lastKnownFileType":"image.png","path":"icon.png","sourceTree":"\"\""},"308D052F1370CCF300D202BF_comment":"icon.png","308D05301370CCF300D202BF":{"isa":"PBXFileReference","lastKnownFileType":"image.png","path":"\"icon@2x.png\"","sourceTree":"\"\""},"308D05301370CCF300D202BF_comment":"icon@2x.png","308D05341370CCF300D202BF":{"isa":"PBXFileReference","lastKnownFileType":"image.png","path":"Default.png","sourceTree":"\"\""},"308D05341370CCF300D202BF_comment":"Default.png","308D05351370CCF300D202BF":{"isa":"PBXFileReference","lastKnownFileType":"image.png","path":"\"Default@2x.png\"","sourceTree":"\"\""},"308D05351370CCF300D202BF_comment":"Default@2x.png","30E1352610E2C1420031B30D":{"isa":"PBXFileReference","fileEncoding":4,"lastKnownFileType":"text.plist.xml","path":"PhoneGap.plist","sourceTree":"\"\""},"30E1352610E2C1420031B30D_comment":"PhoneGap.plist","30E5649113A7FCAF007403D8":{"isa":"PBXFileReference","lastKnownFileType":"wrapper.framework","name":"CoreMedia.framework","path":"System/Library/Frameworks/CoreMedia.framework","sourceTree":"SDKROOT"},"30E5649113A7FCAF007403D8_comment":"CoreMedia.framework","32CA4F630368D1EE00C91783":{"isa":"PBXFileReference","fileEncoding":4,"lastKnownFileType":"sourcecode.c.h","path":"\"KitchenSinktablet-Prefix.pch\"","sourceTree":"\"\""},"32CA4F630368D1EE00C91783_comment":"KitchenSinktablet-Prefix.pch","8D1107310486CEB800E47090":{"isa":"PBXFileReference","fileEncoding":4,"lastKnownFileType":"text.plist.xml","path":"\"KitchenSinktablet-Info.plist\"","plistStructureDefinitionIdentifier":"\"com.apple.xcode.plist.structure-definition.iphone.info-plist\"","sourceTree":"\"\""},"8D1107310486CEB800E47090_comment":"KitchenSinktablet-Info.plist"},"PBXFrameworksBuildPhase":{"1D60588F0D05DD3D006BFB54":{"isa":"PBXFrameworksBuildPhase","buildActionMask":2147483647,"files":[{"value":"301BF552109A68D80062928A","comment":"libPhoneGap.a in Frameworks"},{"value":"1D60589F0D05DD5A006BFB54","comment":"Foundation.framework in Frameworks"},{"value":"1DF5F4E00D08C38300B7A737","comment":"UIKit.framework in Frameworks"},{"value":"288765FD0DF74451002DB57D","comment":"CoreGraphics.framework in Frameworks"},{"value":"301BF5B5109A6A2B0062928A","comment":"AddressBook.framework in Frameworks"},{"value":"301BF5B7109A6A2B0062928A","comment":"AddressBookUI.framework in Frameworks"},{"value":"301BF5B9109A6A2B0062928A","comment":"AudioToolbox.framework in Frameworks"},{"value":"301BF5BB109A6A2B0062928A","comment":"AVFoundation.framework in Frameworks"},{"value":"301BF5BD109A6A2B0062928A","comment":"CFNetwork.framework in Frameworks"},{"value":"301BF5BF109A6A2B0062928A","comment":"CoreLocation.framework in Frameworks"},{"value":"301BF5C1109A6A2B0062928A","comment":"MediaPlayer.framework in Frameworks"},{"value":"301BF5C3109A6A2B0062928A","comment":"QuartzCore.framework in Frameworks"},{"value":"301BF5C5109A6A2B0062928A","comment":"SystemConfiguration.framework in Frameworks"},{"value":"305D5FD1115AB8F900A74A75","comment":"MobileCoreServices.framework in Frameworks"},{"value":"30E5649213A7FCAF007403D8","comment":"CoreMedia.framework in Frameworks"}],"runOnlyForDeploymentPostprocessing":0},"1D60588F0D05DD3D006BFB54_comment":"Frameworks"},"PBXGroup":{"080E96DDFE201D6D7F000001":{"isa":"PBXGroup","children":[{"value":"1D3623240D0F684500981E51","comment":"AppDelegate.h"},{"value":"1D3623250D0F684500981E51","comment":"AppDelegate.m"}],"path":"Classes","sourceTree":"SOURCE_ROOT"},"080E96DDFE201D6D7F000001_comment":"Classes","19C28FACFE9D520D11CA2CBB":{"isa":"PBXGroup","children":[{"value":"1D6058910D05DD3D006BFB54","comment":"KitchenSinktablet.app"}],"name":"Products","sourceTree":"\"\""},"19C28FACFE9D520D11CA2CBB_comment":"Products","1F766FDB13BBADB100FB74C0":{"isa":"PBXGroup","children":[{"value":"1F766FDC13BBADB100FB74C0","comment":"Localizable.strings"}],"name":"en.lproj","path":"Resources/en.lproj","sourceTree":"\"\""},"1F766FDB13BBADB100FB74C0_comment":"en.lproj","1F766FDE13BBADB100FB74C0":{"isa":"PBXGroup","children":[{"value":"1F766FDF13BBADB100FB74C0","comment":"Localizable.strings"}],"name":"es.lproj","path":"Resources/es.lproj","sourceTree":"\"\""},"1F766FDE13BBADB100FB74C0_comment":"es.lproj","29B97314FDCFA39411CA2CEA":{"isa":"PBXGroup","children":[{"value":"301BF56E109A69640062928A","comment":"www"},{"value":"301BF52D109A57CC0062928A","comment":"PhoneGapLib.xcodeproj"},{"value":"080E96DDFE201D6D7F000001","comment":"Classes"},{"value":"307C750510C5A3420062BCA9","comment":"Plugins"},{"value":"29B97315FDCFA39411CA2CEA","comment":"Other Sources"},{"value":"29B97317FDCFA39411CA2CEA","comment":"Resources"},{"value":"29B97323FDCFA39411CA2CEA","comment":"Frameworks"},{"value":"19C28FACFE9D520D11CA2CBB","comment":"Products"}],"name":"CustomTemplate","sourceTree":"\"\""},"29B97314FDCFA39411CA2CEA_comment":"CustomTemplate","29B97315FDCFA39411CA2CEA":{"isa":"PBXGroup","children":[{"value":"32CA4F630368D1EE00C91783","comment":"KitchenSinktablet-Prefix.pch"},{"value":"29B97316FDCFA39411CA2CEA","comment":"main.m"}],"name":"\"Other Sources\"","sourceTree":"\"\""},"29B97315FDCFA39411CA2CEA_comment":"Other Sources","29B97317FDCFA39411CA2CEA":{"isa":"PBXGroup","children":[{"value":"1F766FDB13BBADB100FB74C0","comment":"en.lproj"},{"value":"1F766FDE13BBADB100FB74C0","comment":"es.lproj"},{"value":"3072F99613A8081B00425683","comment":"Capture.bundle"},{"value":"308D052D1370CCF300D202BF","comment":"icons"},{"value":"308D05311370CCF300D202BF","comment":"splash"},{"value":"30E1352610E2C1420031B30D","comment":"PhoneGap.plist"},{"value":"3053AC6E109B7857006FCFE7","comment":"VERSION"},{"value":"8D1107310486CEB800E47090","comment":"KitchenSinktablet-Info.plist"},{"value":"307D28A1123043350040C0FA","comment":"PhoneGapBuildSettings.xcconfig"}],"name":"Resources","sourceTree":"\"\""},"29B97317FDCFA39411CA2CEA_comment":"Resources","29B97323FDCFA39411CA2CEA":{"isa":"PBXGroup","children":[{"value":"1DF5F4DF0D08C38300B7A737","comment":"UIKit.framework"},{"value":"1D30AB110D05D00D00671497","comment":"Foundation.framework"},{"value":"288765FC0DF74451002DB57D","comment":"CoreGraphics.framework"},{"value":"301BF5B4109A6A2B0062928A","comment":"AddressBook.framework"},{"value":"301BF5B6109A6A2B0062928A","comment":"AddressBookUI.framework"},{"value":"301BF5B8109A6A2B0062928A","comment":"AudioToolbox.framework"},{"value":"301BF5BA109A6A2B0062928A","comment":"AVFoundation.framework"},{"value":"301BF5BC109A6A2B0062928A","comment":"CFNetwork.framework"},{"value":"301BF5BE109A6A2B0062928A","comment":"CoreLocation.framework"},{"value":"301BF5C0109A6A2B0062928A","comment":"MediaPlayer.framework"},{"value":"301BF5C2109A6A2B0062928A","comment":"QuartzCore.framework"},{"value":"301BF5C4109A6A2B0062928A","comment":"SystemConfiguration.framework"},{"value":"305D5FD0115AB8F900A74A75","comment":"MobileCoreServices.framework"},{"value":"30E5649113A7FCAF007403D8","comment":"CoreMedia.framework"}],"name":"Frameworks","sourceTree":"\"\""},"29B97323FDCFA39411CA2CEA_comment":"Frameworks","301BF52E109A57CC0062928A":{"isa":"PBXGroup","children":[{"value":"301BF535109A57CC0062928A","comment":"libPhoneGap.a"},{"value":"30E47BC3136F595F00DBB853","comment":"PhoneGap.framework"}],"name":"Products","sourceTree":"\"\""},"301BF52E109A57CC0062928A_comment":"Products","307C750510C5A3420062BCA9":{"isa":"PBXGroup","children":[],"path":"Plugins","sourceTree":"SOURCE_ROOT"},"307C750510C5A3420062BCA9_comment":"Plugins","308D052D1370CCF300D202BF":{"isa":"PBXGroup","children":[{"value":"308D052E1370CCF300D202BF","comment":"icon-72.png"},{"value":"308D052F1370CCF300D202BF","comment":"icon.png"},{"value":"308D05301370CCF300D202BF","comment":"icon@2x.png"}],"name":"icons","path":"Resources/icons","sourceTree":"\"\""},"308D052D1370CCF300D202BF_comment":"icons","308D05311370CCF300D202BF":{"isa":"PBXGroup","children":[{"value":"308D05341370CCF300D202BF","comment":"Default.png"},{"value":"308D05351370CCF300D202BF","comment":"Default@2x.png"}],"name":"splash","path":"Resources/splash","sourceTree":"\"\""},"308D05311370CCF300D202BF_comment":"splash"},"PBXNativeTarget":{"1D6058900D05DD3D006BFB54":{"isa":"PBXNativeTarget","buildConfigurationList":"1D6058960D05DD3E006BFB54","buildConfigurationList_comment":"Build configuration list for PBXNativeTarget \"KitchenSinktablet\"","buildPhases":[{"value":"304B58A110DAC018002A0835","comment":"Touch www folder"},{"value":"1D60588D0D05DD3D006BFB54","comment":"Resources"},{"value":"1D60588E0D05DD3D006BFB54","comment":"Sources"},{"value":"1D60588F0D05DD3D006BFB54","comment":"Frameworks"}],"buildRules":[],"dependencies":[{"value":"301BF551109A68C00062928A","comment":"PBXTargetDependency"}],"name":"\"KitchenSinktablet\"","productName":"\"KitchenSinktablet\"","productReference":"1D6058910D05DD3D006BFB54","productReference_comment":"KitchenSinktablet.app","productType":"\"com.apple.product-type.application\""},"1D6058900D05DD3D006BFB54_comment":"KitchenSinktablet","1D6058900D05DD3D006BFB55":{"isa":"PBXNativeTarget","buildConfigurationList":"1D6058960D05DD3E006BFB54","buildConfigurationList_comment":"Build configuration list for PBXNativeTarget \"TestApp\"","buildPhases":[{"value":"304B58A110DAC018002A0835","comment":"Touch www folder"},{"value":"1D60588D0D05DD3D006BFB54","comment":"Resources"},{"value":"1D60588E0D05DD3D006BFB54","comment":"Sources"},{"value":"1D60588F0D05DD3D006BFB54","comment":"Frameworks"}],"buildRules":[],"dependencies":[],"name":"\"TestApp\"","productName":"\"TestApp\"","productReference":"1D6058910D05DD3D006BFB54","productReference_comment":"TestApp.app","productType":"\"com.apple.product-type.application\""},"1D6058900D05DD3D006BFB55_comment":"TestApp"},"PBXProject":{"29B97313FDCFA39411CA2CEA":{"isa":"PBXProject","buildConfigurationList":"C01FCF4E08A954540054247B","buildConfigurationList_comment":"Build configuration list for PBXProject \"KitchenSinktablet\"","compatibilityVersion":"\"Xcode 3.1\"","developmentRegion":"English","hasScannedForEncodings":1,"knownRegions":["English","Japanese","French","German","en","es"],"mainGroup":"29B97314FDCFA39411CA2CEA","mainGroup_comment":"CustomTemplate","projectDirPath":"\"\"","projectReferences":[{"ProductGroup":"301BF52E109A57CC0062928A","ProductGroup_comment":"Products","ProjectRef":"301BF52D109A57CC0062928A","ProjectRef_comment":"PhoneGapLib.xcodeproj"}],"projectRoot":"\"\"","targets":[{"value":"1D6058900D05DD3D006BFB54","comment":"KitchenSinktablet"},{"value":"1D6058900D05DD3D006BFB55","comment":"TestApp"}]},"29B97313FDCFA39411CA2CEA_comment":"Project object"},"PBXReferenceProxy":{"301BF535109A57CC0062928A":{"isa":"PBXReferenceProxy","fileType":"archive.ar","path":"libPhoneGap.a","remoteRef":"301BF534109A57CC0062928A","remoteRef_comment":"PBXContainerItemProxy","sourceTree":"BUILT_PRODUCTS_DIR"},"301BF535109A57CC0062928A_comment":"libPhoneGap.a","30E47BC3136F595F00DBB853":{"isa":"PBXReferenceProxy","fileType":"wrapper.cfbundle","path":"PhoneGap.framework","remoteRef":"30E47BC2136F595F00DBB853","remoteRef_comment":"PBXContainerItemProxy","sourceTree":"BUILT_PRODUCTS_DIR"},"30E47BC3136F595F00DBB853_comment":"PhoneGap.framework"},"PBXResourcesBuildPhase":{"1D60588D0D05DD3D006BFB54":{"isa":"PBXResourcesBuildPhase","buildActionMask":2147483647,"files":[{"value":"301BF570109A69640062928A","comment":"www in Resources"},{"value":"3053AC6F109B7857006FCFE7","comment":"VERSION in Resources"},{"value":"30E1352710E2C1420031B30D","comment":"PhoneGap.plist in Resources"},{"value":"307D28A2123043360040C0FA","comment":"PhoneGapBuildSettings.xcconfig in Resources"},{"value":"308D05371370CCF300D202BF","comment":"icon-72.png in Resources"},{"value":"308D05381370CCF300D202BF","comment":"icon.png in Resources"},{"value":"308D05391370CCF300D202BF","comment":"icon@2x.png in Resources"},{"value":"308D053C1370CCF300D202BF","comment":"Default.png in Resources"},{"value":"308D053D1370CCF300D202BF","comment":"Default@2x.png in Resources"},{"value":"3072F99713A8081B00425683","comment":"Capture.bundle in Resources"},{"value":"1F766FE113BBADB100FB74C0","comment":"Localizable.strings in Resources"},{"value":"1F766FE213BBADB100FB74C0","comment":"Localizable.strings in Resources"}],"runOnlyForDeploymentPostprocessing":0},"1D60588D0D05DD3D006BFB54_comment":"Resources"},"PBXShellScriptBuildPhase":{"304B58A110DAC018002A0835":{"isa":"PBXShellScriptBuildPhase","buildActionMask":2147483647,"files":[],"inputPaths":[],"name":"\"Touch www folder\"","outputPaths":[],"runOnlyForDeploymentPostprocessing":0,"shellPath":"/bin/sh","shellScript":"\"touch -cm ${PROJECT_DIR}/www\""},"304B58A110DAC018002A0835_comment":"Touch www folder"},"PBXSourcesBuildPhase":{"1D60588E0D05DD3D006BFB54":{"isa":"PBXSourcesBuildPhase","buildActionMask":2147483647,"files":[{"value":"1D60589B0D05DD56006BFB54","comment":"main.m in Sources"},{"value":"1D3623260D0F684500981E51","comment":"AppDelegate.m in Sources"}],"runOnlyForDeploymentPostprocessing":0},"1D60588E0D05DD3D006BFB54_comment":"Sources"},"PBXTargetDependency":{"301BF551109A68C00062928A":{"isa":"PBXTargetDependency","name":"PhoneGapLib","targetProxy":"301BF550109A68C00062928A","targetProxy_comment":"PBXContainerItemProxy"},"301BF551109A68C00062928A_comment":"PBXTargetDependency"},"PBXVariantGroup":{"1F766FDC13BBADB100FB74C0":{"isa":"PBXVariantGroup","children":[{"value":"1F766FDD13BBADB100FB74C0","comment":"en"}],"name":"Localizable.strings","sourceTree":"\"\""},"1F766FDC13BBADB100FB74C0_comment":"Localizable.strings","1F766FDF13BBADB100FB74C0":{"isa":"PBXVariantGroup","children":[{"value":"1F766FE013BBADB100FB74C0","comment":"es"}],"name":"Localizable.strings","sourceTree":"\"\""},"1F766FDF13BBADB100FB74C0_comment":"Localizable.strings"},"XCBuildConfiguration":{"1D6058940D05DD3E006BFB54":{"isa":"XCBuildConfiguration","buildSettings":{"ALWAYS_SEARCH_USER_PATHS":"NO","ARCHS":["armv6","armv7"],"COPY_PHASE_STRIP":"NO","GCC_DYNAMIC_NO_PIC":"NO","GCC_OPTIMIZATION_LEVEL":0,"GCC_PRECOMPILE_PREFIX_HEADER":"YES","GCC_PREFIX_HEADER":"\"KitchenSinktablet-Prefix.pch\"","INFOPLIST_FILE":"\"KitchenSinktablet-Info.plist\"","IPHONEOS_DEPLOYMENT_TARGET":"3.0","ONLY_ACTIVE_ARCH":"NO","PRODUCT_NAME":"\"KitchenSinktablet\"","TARGETED_DEVICE_FAMILY":"\"1,2\""},"name":"Debug"},"1D6058940D05DD3E006BFB54_comment":"Debug","1D6058950D05DD3E006BFB54":{"isa":"XCBuildConfiguration","buildSettings":{"ALWAYS_SEARCH_USER_PATHS":"NO","ARCHS":["armv6","armv7"],"COPY_PHASE_STRIP":"YES","GCC_PRECOMPILE_PREFIX_HEADER":"YES","GCC_PREFIX_HEADER":"\"KitchenSinktablet-Prefix.pch\"","INFOPLIST_FILE":"\"KitchenSinktablet-Info.plist\"","IPHONEOS_DEPLOYMENT_TARGET":"3.0","ONLY_ACTIVE_ARCH":"NO","PRODUCT_NAME":"\"KitchenSinktablet\"","TARGETED_DEVICE_FAMILY":"\"1,2\""},"name":"Release"},"1D6058950D05DD3E006BFB54_comment":"Release","C01FCF4F08A954540054247B":{"isa":"XCBuildConfiguration","baseConfigurationReference":"307D28A1123043350040C0FA","baseConfigurationReference_comment":"PhoneGapBuildSettings.xcconfig","buildSettings":{"ARCHS":"\"$(ARCHS_STANDARD_32_BIT)\"","\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\"":"\"iPhone Distribution\"","GCC_C_LANGUAGE_STANDARD":"c99","GCC_VERSION":"com.apple.compilers.llvmgcc42","GCC_WARN_ABOUT_RETURN_TYPE":"YES","GCC_WARN_UNUSED_VARIABLE":"YES","IPHONEOS_DEPLOYMENT_TARGET":"3.0","OTHER_LDFLAGS":["\"-weak_framework\"","UIKit","\"-weak_framework\"","AVFoundation","\"-weak_framework\"","CoreMedia","\"-weak_library\"","/usr/lib/libSystem.B.dylib","\"-all_load\"","\"-Obj-C\""],"PREBINDING":"NO","SDKROOT":"iphoneos","SKIP_INSTALL":"NO","USER_HEADER_SEARCH_PATHS":"\"\"$(PHONEGAPLIB)/Classes/JSON\" \"$(PHONEGAPLIB)/Classes\"\""},"name":"Debug"},"C01FCF4F08A954540054247B_comment":"Debug","C01FCF5008A954540054247B":{"isa":"XCBuildConfiguration","baseConfigurationReference":"307D28A1123043350040C0FA","baseConfigurationReference_comment":"PhoneGapBuildSettings.xcconfig","buildSettings":{"ARCHS":"\"$(ARCHS_STANDARD_32_BIT)\"","\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\"":"\"iPhone Distribution\"","GCC_C_LANGUAGE_STANDARD":"c99","GCC_VERSION":"com.apple.compilers.llvmgcc42","GCC_WARN_ABOUT_RETURN_TYPE":"YES","GCC_WARN_UNUSED_VARIABLE":"YES","IPHONEOS_DEPLOYMENT_TARGET":"3.0","OTHER_LDFLAGS":["\"-weak_framework\"","UIKit","\"-weak_framework\"","AVFoundation","\"-weak_framework\"","CoreMedia","\"-weak_library\"","/usr/lib/libSystem.B.dylib","\"-all_load\"","\"-Obj-C\""],"PREBINDING":"NO","SDKROOT":"iphoneos","SKIP_INSTALL":"NO","USER_HEADER_SEARCH_PATHS":"\"\"$(PHONEGAPLIB)/Classes/JSON\" \"$(PHONEGAPLIB)/Classes\"\""},"name":"Release"},"C01FCF5008A954540054247B_comment":"Release"},"XCConfigurationList":{"1D6058960D05DD3E006BFB54":{"isa":"XCConfigurationList","buildConfigurations":[{"value":"1D6058940D05DD3E006BFB54","comment":"Debug"},{"value":"1D6058950D05DD3E006BFB54","comment":"Release"}],"defaultConfigurationIsVisible":0,"defaultConfigurationName":"Release"},"1D6058960D05DD3E006BFB54_comment":"Build configuration list for PBXNativeTarget \"KitchenSinktablet\"","C01FCF4E08A954540054247B":{"isa":"XCConfigurationList","buildConfigurations":[{"value":"C01FCF4F08A954540054247B","comment":"Debug"},{"value":"C01FCF5008A954540054247B","comment":"Release"}],"defaultConfigurationIsVisible":0,"defaultConfigurationName":"Release"},"C01FCF4E08A954540054247B_comment":"Build configuration list for PBXProject \"KitchenSinktablet\""}},"rootObject":"29B97313FDCFA39411CA2CEA","rootObject_comment":"Project object"},"headComment":"!$*UTF8*$!"} diff --git a/test/fixtures/multiple-targets.json b/test/fixtures/multiple-targets.json new file mode 100644 index 0000000..f8a489c --- /dev/null +++ b/test/fixtures/multiple-targets.json @@ -0,0 +1 @@ +{"project":{"archiveVersion":1,"classes":{},"objectVersion":46,"objects":{"PBXBuildFile":{"09536AAE1B0D118800A1D6F8":{"isa":"PBXBuildFile","fileRef":"09536AAD1B0D118800A1D6F8","fileRef_comment":"InterfaceController.m"},"09536AAE1B0D118800A1D6F8_comment":"InterfaceController.m in Sources","09536AB11B0D118800A1D6F8":{"isa":"PBXBuildFile","fileRef":"09536AB01B0D118800A1D6F8","fileRef_comment":"NotificationController.m"},"09536AB11B0D118800A1D6F8_comment":"NotificationController.m in Sources","09536AB31B0D118800A1D6F8":{"isa":"PBXBuildFile","fileRef":"09536AB21B0D118800A1D6F8","fileRef_comment":"Images.xcassets"},"09536AB31B0D118800A1D6F8_comment":"Images.xcassets in Resources","09536AB71B0D118900A1D6F8":{"isa":"PBXBuildFile","fileRef":"09536AB61B0D118900A1D6F8","fileRef_comment":"HelloCordova WatchKit App.app"},"09536AB71B0D118900A1D6F8_comment":"HelloCordova WatchKit App.app in Resources","09536ABF1B0D118900A1D6F8":{"isa":"PBXBuildFile","fileRef":"09536ABD1B0D118900A1D6F8","fileRef_comment":"Interface.storyboard"},"09536ABF1B0D118900A1D6F8_comment":"Interface.storyboard in Resources","09536AC11B0D118900A1D6F8":{"isa":"PBXBuildFile","fileRef":"09536AC01B0D118900A1D6F8","fileRef_comment":"Images.xcassets"},"09536AC11B0D118900A1D6F8_comment":"Images.xcassets in Resources","09536AC41B0D118900A1D6F8":{"isa":"PBXBuildFile","fileRef":"09536AA71B0D118800A1D6F8","fileRef_comment":"HelloCordova WatchKit Extension.appex","settings":{"ATTRIBUTES":["RemoveHeadersOnCopy"]}},"09536AC41B0D118900A1D6F8_comment":"HelloCordova WatchKit Extension.appex in Embed App Extensions","1D3623260D0F684500981E51":{"isa":"PBXBuildFile","fileRef":"1D3623250D0F684500981E51","fileRef_comment":"AppDelegate.m"},"1D3623260D0F684500981E51_comment":"AppDelegate.m in Sources","1D60589B0D05DD56006BFB54":{"isa":"PBXBuildFile","fileRef":"29B97316FDCFA39411CA2CEA","fileRef_comment":"main.m"},"1D60589B0D05DD56006BFB54_comment":"main.m in Sources","288765FD0DF74451002DB57D":{"isa":"PBXBuildFile","fileRef":"288765FC0DF74451002DB57D","fileRef_comment":"CoreGraphics.framework"},"288765FD0DF74451002DB57D_comment":"CoreGraphics.framework in Frameworks","301BF552109A68D80062928A":{"isa":"PBXBuildFile","fileRef":"301BF535109A57CC0062928A","fileRef_comment":"libCordova.a"},"301BF552109A68D80062928A_comment":"libCordova.a in Frameworks","302D95F114D2391D003F00A1":{"isa":"PBXBuildFile","fileRef":"302D95EF14D2391D003F00A1","fileRef_comment":"MainViewController.m"},"302D95F114D2391D003F00A1_comment":"MainViewController.m in Sources","302D95F214D2391D003F00A1":{"isa":"PBXBuildFile","fileRef":"302D95F014D2391D003F00A1","fileRef_comment":"MainViewController.xib"},"302D95F214D2391D003F00A1_comment":"MainViewController.xib in Resources","305D5FD1115AB8F900A74A75":{"isa":"PBXBuildFile","fileRef":"305D5FD0115AB8F900A74A75","fileRef_comment":"MobileCoreServices.framework"},"305D5FD1115AB8F900A74A75_comment":"MobileCoreServices.framework in Frameworks","3088BBBD154F3926009F9C59":{"isa":"PBXBuildFile","fileRef":"3088BBB7154F3926009F9C59","fileRef_comment":"Default-Landscape@2x~ipad.png"},"3088BBBD154F3926009F9C59_comment":"Default-Landscape@2x~ipad.png in Resources","3088BBBE154F3926009F9C59":{"isa":"PBXBuildFile","fileRef":"3088BBB8154F3926009F9C59","fileRef_comment":"Default-Landscape~ipad.png"},"3088BBBE154F3926009F9C59_comment":"Default-Landscape~ipad.png in Resources","3088BBBF154F3926009F9C59":{"isa":"PBXBuildFile","fileRef":"3088BBB9154F3926009F9C59","fileRef_comment":"Default-Portrait@2x~ipad.png"},"3088BBBF154F3926009F9C59_comment":"Default-Portrait@2x~ipad.png in Resources","3088BBC0154F3926009F9C59":{"isa":"PBXBuildFile","fileRef":"3088BBBA154F3926009F9C59","fileRef_comment":"Default-Portrait~ipad.png"},"3088BBC0154F3926009F9C59_comment":"Default-Portrait~ipad.png in Resources","3088BBC1154F3926009F9C59":{"isa":"PBXBuildFile","fileRef":"3088BBBB154F3926009F9C59","fileRef_comment":"Default@2x~iphone.png"},"3088BBC1154F3926009F9C59_comment":"Default@2x~iphone.png in Resources","3088BBC2154F3926009F9C59":{"isa":"PBXBuildFile","fileRef":"3088BBBC154F3926009F9C59","fileRef_comment":"Default~iphone.png"},"3088BBC2154F3926009F9C59_comment":"Default~iphone.png in Resources","308D05371370CCF300D202BF":{"isa":"PBXBuildFile","fileRef":"308D052E1370CCF300D202BF","fileRef_comment":"icon-72.png"},"308D05371370CCF300D202BF_comment":"icon-72.png in Resources","308D05381370CCF300D202BF":{"isa":"PBXBuildFile","fileRef":"308D052F1370CCF300D202BF","fileRef_comment":"icon.png"},"308D05381370CCF300D202BF_comment":"icon.png in Resources","308D05391370CCF300D202BF":{"isa":"PBXBuildFile","fileRef":"308D05301370CCF300D202BF","fileRef_comment":"icon@2x.png"},"308D05391370CCF300D202BF_comment":"icon@2x.png in Resources","30B4F30019D5E07200D9F7D8":{"isa":"PBXBuildFile","fileRef":"30B4F2FD19D5E07200D9F7D8","fileRef_comment":"Default-667h.png"},"30B4F30019D5E07200D9F7D8_comment":"Default-667h.png in Resources","30B4F30119D5E07200D9F7D8":{"isa":"PBXBuildFile","fileRef":"30B4F2FE19D5E07200D9F7D8","fileRef_comment":"Default-736h.png"},"30B4F30119D5E07200D9F7D8_comment":"Default-736h.png in Resources","30B4F30219D5E07200D9F7D8":{"isa":"PBXBuildFile","fileRef":"30B4F2FF19D5E07200D9F7D8","fileRef_comment":"Default-Landscape-736h.png"},"30B4F30219D5E07200D9F7D8_comment":"Default-Landscape-736h.png in Resources","30C1856619D5FC0A00212699":{"isa":"PBXBuildFile","fileRef":"30C1856519D5FC0A00212699","fileRef_comment":"icon-60@3x.png"},"30C1856619D5FC0A00212699_comment":"icon-60@3x.png in Resources","30FC414916E50CA1004E6F35":{"isa":"PBXBuildFile","fileRef":"30FC414816E50CA1004E6F35","fileRef_comment":"icon-72@2x.png"},"30FC414916E50CA1004E6F35_comment":"icon-72@2x.png in Resources","5B1594DD16A7569C00FEF299":{"isa":"PBXBuildFile","fileRef":"5B1594DC16A7569C00FEF299","fileRef_comment":"AssetsLibrary.framework"},"5B1594DD16A7569C00FEF299_comment":"AssetsLibrary.framework in Frameworks","7E7966DE1810823500FA85AD":{"isa":"PBXBuildFile","fileRef":"7E7966D41810823500FA85AD","fileRef_comment":"icon-40.png"},"7E7966DE1810823500FA85AD_comment":"icon-40.png in Resources","7E7966DF1810823500FA85AD":{"isa":"PBXBuildFile","fileRef":"7E7966D51810823500FA85AD","fileRef_comment":"icon-40@2x.png"},"7E7966DF1810823500FA85AD_comment":"icon-40@2x.png in Resources","7E7966E01810823500FA85AD":{"isa":"PBXBuildFile","fileRef":"7E7966D61810823500FA85AD","fileRef_comment":"icon-50.png"},"7E7966E01810823500FA85AD_comment":"icon-50.png in Resources","7E7966E11810823500FA85AD":{"isa":"PBXBuildFile","fileRef":"7E7966D71810823500FA85AD","fileRef_comment":"icon-50@2x.png"},"7E7966E11810823500FA85AD_comment":"icon-50@2x.png in Resources","7E7966E21810823500FA85AD":{"isa":"PBXBuildFile","fileRef":"7E7966D81810823500FA85AD","fileRef_comment":"icon-60.png"},"7E7966E21810823500FA85AD_comment":"icon-60.png in Resources","7E7966E31810823500FA85AD":{"isa":"PBXBuildFile","fileRef":"7E7966D91810823500FA85AD","fileRef_comment":"icon-60@2x.png"},"7E7966E31810823500FA85AD_comment":"icon-60@2x.png in Resources","7E7966E41810823500FA85AD":{"isa":"PBXBuildFile","fileRef":"7E7966DA1810823500FA85AD","fileRef_comment":"icon-76.png"},"7E7966E41810823500FA85AD_comment":"icon-76.png in Resources","7E7966E51810823500FA85AD":{"isa":"PBXBuildFile","fileRef":"7E7966DB1810823500FA85AD","fileRef_comment":"icon-76@2x.png"},"7E7966E51810823500FA85AD_comment":"icon-76@2x.png in Resources","7E7966E61810823500FA85AD":{"isa":"PBXBuildFile","fileRef":"7E7966DC1810823500FA85AD","fileRef_comment":"icon-small.png"},"7E7966E61810823500FA85AD_comment":"icon-small.png in Resources","7E7966E71810823500FA85AD":{"isa":"PBXBuildFile","fileRef":"7E7966DD1810823500FA85AD","fileRef_comment":"icon-small@2x.png"},"7E7966E71810823500FA85AD_comment":"icon-small@2x.png in Resources","D4A0D8761607E02300AEF8BB":{"isa":"PBXBuildFile","fileRef":"D4A0D8751607E02300AEF8BB","fileRef_comment":"Default-568h@2x~iphone.png"},"D4A0D8761607E02300AEF8BB_comment":"Default-568h@2x~iphone.png in Resources","BA0D8677B2654B4BB7146A16":{"isa":"PBXBuildFile","fileRef":"BF861BABA0714F35A28C9CE1","fileRef_comment":"CDVLogger.m"},"BA0D8677B2654B4BB7146A16_comment":"CDVLogger.m in Sources"},"PBXContainerItemProxy":{"09536AB81B0D118900A1D6F8":{"isa":"PBXContainerItemProxy","containerPortal":"29B97313FDCFA39411CA2CEA","containerPortal_comment":"Project object","proxyType":1,"remoteGlobalIDString":"09536AB51B0D118900A1D6F8","remoteInfo":"\"HelloCordova WatchKit App\""},"09536AB81B0D118900A1D6F8_comment":"PBXContainerItemProxy","09536AC21B0D118900A1D6F8":{"isa":"PBXContainerItemProxy","containerPortal":"29B97313FDCFA39411CA2CEA","containerPortal_comment":"Project object","proxyType":1,"remoteGlobalIDString":"09536AA61B0D118800A1D6F8","remoteInfo":"\"HelloCordova WatchKit Extension\""},"09536AC21B0D118900A1D6F8_comment":"PBXContainerItemProxy","301BF534109A57CC0062928A":{"isa":"PBXContainerItemProxy","containerPortal":"301BF52D109A57CC0062928A","containerPortal_comment":"CordovaLib.xcodeproj","proxyType":2,"remoteGlobalIDString":"D2AAC07E0554694100DB518D","remoteInfo":"CordovaLib"},"301BF534109A57CC0062928A_comment":"PBXContainerItemProxy","301BF550109A68C00062928A":{"isa":"PBXContainerItemProxy","containerPortal":"301BF52D109A57CC0062928A","containerPortal_comment":"CordovaLib.xcodeproj","proxyType":1,"remoteGlobalIDString":"D2AAC07D0554694100DB518D","remoteInfo":"CordovaLib"},"301BF550109A68C00062928A_comment":"PBXContainerItemProxy"},"PBXCopyFilesBuildPhase":{"09536ACB1B0D118900A1D6F8":{"isa":"PBXCopyFilesBuildPhase","buildActionMask":2147483647,"dstPath":"\"\"","dstSubfolderSpec":13,"files":[{"value":"09536AC41B0D118900A1D6F8","comment":"HelloCordova WatchKit Extension.appex in Embed App Extensions"}],"name":"\"Embed App Extensions\"","runOnlyForDeploymentPostprocessing":0},"09536ACB1B0D118900A1D6F8_comment":"Embed App Extensions"},"PBXFileReference":{"09536AA71B0D118800A1D6F8":{"isa":"PBXFileReference","explicitFileType":"\"wrapper.app-extension\"","includeInIndex":0,"path":"\"HelloCordova WatchKit Extension.appex\"","sourceTree":"BUILT_PRODUCTS_DIR"},"09536AA71B0D118800A1D6F8_comment":"HelloCordova WatchKit Extension.appex","09536AAA1B0D118800A1D6F8":{"isa":"PBXFileReference","lastKnownFileType":"text.plist.xml","path":"Info.plist","sourceTree":"\"\""},"09536AAA1B0D118800A1D6F8_comment":"Info.plist","09536AAB1B0D118800A1D6F8":{"isa":"PBXFileReference","lastKnownFileType":"text","path":"PushNotificationPayload.apns","sourceTree":"\"\""},"09536AAB1B0D118800A1D6F8_comment":"PushNotificationPayload.apns","09536AAC1B0D118800A1D6F8":{"isa":"PBXFileReference","lastKnownFileType":"sourcecode.c.h","path":"InterfaceController.h","sourceTree":"\"\""},"09536AAC1B0D118800A1D6F8_comment":"InterfaceController.h","09536AAD1B0D118800A1D6F8":{"isa":"PBXFileReference","lastKnownFileType":"sourcecode.c.objc","path":"InterfaceController.m","sourceTree":"\"\""},"09536AAD1B0D118800A1D6F8_comment":"InterfaceController.m","09536AAF1B0D118800A1D6F8":{"isa":"PBXFileReference","lastKnownFileType":"sourcecode.c.h","path":"NotificationController.h","sourceTree":"\"\""},"09536AAF1B0D118800A1D6F8_comment":"NotificationController.h","09536AB01B0D118800A1D6F8":{"isa":"PBXFileReference","lastKnownFileType":"sourcecode.c.objc","path":"NotificationController.m","sourceTree":"\"\""},"09536AB01B0D118800A1D6F8_comment":"NotificationController.m","09536AB21B0D118800A1D6F8":{"isa":"PBXFileReference","lastKnownFileType":"folder.assetcatalog","path":"Images.xcassets","sourceTree":"\"\""},"09536AB21B0D118800A1D6F8_comment":"Images.xcassets","09536AB61B0D118900A1D6F8":{"isa":"PBXFileReference","explicitFileType":"wrapper.application","includeInIndex":0,"path":"\"HelloCordova WatchKit App.app\"","sourceTree":"BUILT_PRODUCTS_DIR"},"09536AB61B0D118900A1D6F8_comment":"HelloCordova WatchKit App.app","09536ABC1B0D118900A1D6F8":{"isa":"PBXFileReference","lastKnownFileType":"text.plist.xml","path":"Info.plist","sourceTree":"\"\""},"09536ABC1B0D118900A1D6F8_comment":"Info.plist","09536ABE1B0D118900A1D6F8":{"isa":"PBXFileReference","lastKnownFileType":"file.storyboard","name":"Base","path":"Base.lproj/Interface.storyboard","sourceTree":"\"\""},"09536ABE1B0D118900A1D6F8_comment":"Base","09536AC01B0D118900A1D6F8":{"isa":"PBXFileReference","lastKnownFileType":"folder.assetcatalog","path":"Images.xcassets","sourceTree":"\"\""},"09536AC01B0D118900A1D6F8_comment":"Images.xcassets","1D3623240D0F684500981E51":{"isa":"PBXFileReference","fileEncoding":4,"lastKnownFileType":"sourcecode.c.h","path":"AppDelegate.h","sourceTree":"\"\""},"1D3623240D0F684500981E51_comment":"AppDelegate.h","1D3623250D0F684500981E51":{"isa":"PBXFileReference","fileEncoding":4,"lastKnownFileType":"sourcecode.c.objc","path":"AppDelegate.m","sourceTree":"\"\""},"1D3623250D0F684500981E51_comment":"AppDelegate.m","1D6058910D05DD3D006BFB54":{"isa":"PBXFileReference","explicitFileType":"wrapper.application","includeInIndex":0,"path":"HelloCordova.app","sourceTree":"BUILT_PRODUCTS_DIR"},"1D6058910D05DD3D006BFB54_comment":"HelloCordova.app","288765FC0DF74451002DB57D":{"isa":"PBXFileReference","lastKnownFileType":"wrapper.framework","name":"CoreGraphics.framework","path":"System/Library/Frameworks/CoreGraphics.framework","sourceTree":"SDKROOT"},"288765FC0DF74451002DB57D_comment":"CoreGraphics.framework","29B97316FDCFA39411CA2CEA":{"isa":"PBXFileReference","fileEncoding":4,"lastKnownFileType":"sourcecode.c.objc","path":"main.m","sourceTree":"\"\""},"29B97316FDCFA39411CA2CEA_comment":"main.m","301BF52D109A57CC0062928A":{"isa":"PBXFileReference","lastKnownFileType":"\"wrapper.pb-project\"","name":"CordovaLib.xcodeproj","path":"CordovaLib/CordovaLib.xcodeproj","sourceTree":"\"\""},"301BF52D109A57CC0062928A_comment":"CordovaLib.xcodeproj","301BF56E109A69640062928A":{"isa":"PBXFileReference","lastKnownFileType":"folder","path":"www","sourceTree":"SOURCE_ROOT"},"301BF56E109A69640062928A_comment":"www","302D95EE14D2391D003F00A1":{"isa":"PBXFileReference","fileEncoding":4,"lastKnownFileType":"sourcecode.c.h","path":"MainViewController.h","sourceTree":"\"\""},"302D95EE14D2391D003F00A1_comment":"MainViewController.h","302D95EF14D2391D003F00A1":{"isa":"PBXFileReference","fileEncoding":4,"lastKnownFileType":"sourcecode.c.objc","path":"MainViewController.m","sourceTree":"\"\""},"302D95EF14D2391D003F00A1_comment":"MainViewController.m","302D95F014D2391D003F00A1":{"isa":"PBXFileReference","fileEncoding":4,"lastKnownFileType":"file.xib","path":"MainViewController.xib","sourceTree":"\"\""},"302D95F014D2391D003F00A1_comment":"MainViewController.xib","305D5FD0115AB8F900A74A75":{"isa":"PBXFileReference","lastKnownFileType":"wrapper.framework","name":"MobileCoreServices.framework","path":"System/Library/Frameworks/MobileCoreServices.framework","sourceTree":"SDKROOT"},"305D5FD0115AB8F900A74A75_comment":"MobileCoreServices.framework","3088BBB7154F3926009F9C59":{"isa":"PBXFileReference","lastKnownFileType":"image.png","path":"\"Default-Landscape@2x~ipad.png\"","sourceTree":"\"\""},"3088BBB7154F3926009F9C59_comment":"Default-Landscape@2x~ipad.png","3088BBB8154F3926009F9C59":{"isa":"PBXFileReference","lastKnownFileType":"image.png","path":"\"Default-Landscape~ipad.png\"","sourceTree":"\"\""},"3088BBB8154F3926009F9C59_comment":"Default-Landscape~ipad.png","3088BBB9154F3926009F9C59":{"isa":"PBXFileReference","lastKnownFileType":"image.png","path":"\"Default-Portrait@2x~ipad.png\"","sourceTree":"\"\""},"3088BBB9154F3926009F9C59_comment":"Default-Portrait@2x~ipad.png","3088BBBA154F3926009F9C59":{"isa":"PBXFileReference","lastKnownFileType":"image.png","path":"\"Default-Portrait~ipad.png\"","sourceTree":"\"\""},"3088BBBA154F3926009F9C59_comment":"Default-Portrait~ipad.png","3088BBBB154F3926009F9C59":{"isa":"PBXFileReference","lastKnownFileType":"image.png","path":"\"Default@2x~iphone.png\"","sourceTree":"\"\""},"3088BBBB154F3926009F9C59_comment":"Default@2x~iphone.png","3088BBBC154F3926009F9C59":{"isa":"PBXFileReference","lastKnownFileType":"image.png","path":"\"Default~iphone.png\"","sourceTree":"\"\""},"3088BBBC154F3926009F9C59_comment":"Default~iphone.png","308D052E1370CCF300D202BF":{"isa":"PBXFileReference","lastKnownFileType":"image.png","path":"\"icon-72.png\"","sourceTree":"\"\""},"308D052E1370CCF300D202BF_comment":"icon-72.png","308D052F1370CCF300D202BF":{"isa":"PBXFileReference","lastKnownFileType":"image.png","path":"icon.png","sourceTree":"\"\""},"308D052F1370CCF300D202BF_comment":"icon.png","308D05301370CCF300D202BF":{"isa":"PBXFileReference","lastKnownFileType":"image.png","path":"\"icon@2x.png\"","sourceTree":"\"\""},"308D05301370CCF300D202BF_comment":"icon@2x.png","30B4F2FD19D5E07200D9F7D8":{"isa":"PBXFileReference","lastKnownFileType":"image.png","path":"\"Default-667h.png\"","sourceTree":"\"\""},"30B4F2FD19D5E07200D9F7D8_comment":"Default-667h.png","30B4F2FE19D5E07200D9F7D8":{"isa":"PBXFileReference","lastKnownFileType":"image.png","path":"\"Default-736h.png\"","sourceTree":"\"\""},"30B4F2FE19D5E07200D9F7D8_comment":"Default-736h.png","30B4F2FF19D5E07200D9F7D8":{"isa":"PBXFileReference","lastKnownFileType":"image.png","path":"\"Default-Landscape-736h.png\"","sourceTree":"\"\""},"30B4F2FF19D5E07200D9F7D8_comment":"Default-Landscape-736h.png","30C1856519D5FC0A00212699":{"isa":"PBXFileReference","lastKnownFileType":"image.png","path":"\"icon-60@3x.png\"","sourceTree":"\"\""},"30C1856519D5FC0A00212699_comment":"icon-60@3x.png","30FC414816E50CA1004E6F35":{"isa":"PBXFileReference","lastKnownFileType":"image.png","path":"\"icon-72@2x.png\"","sourceTree":"\"\""},"30FC414816E50CA1004E6F35_comment":"icon-72@2x.png","32CA4F630368D1EE00C91783":{"isa":"PBXFileReference","fileEncoding":4,"lastKnownFileType":"sourcecode.c.h","path":"\"HelloCordova-Prefix.pch\"","sourceTree":"\"\""},"32CA4F630368D1EE00C91783_comment":"HelloCordova-Prefix.pch","5B1594DC16A7569C00FEF299":{"isa":"PBXFileReference","lastKnownFileType":"wrapper.framework","name":"AssetsLibrary.framework","path":"System/Library/Frameworks/AssetsLibrary.framework","sourceTree":"SDKROOT"},"5B1594DC16A7569C00FEF299_comment":"AssetsLibrary.framework","7E7966D41810823500FA85AD":{"isa":"PBXFileReference","lastKnownFileType":"image.png","path":"\"icon-40.png\"","sourceTree":"\"\""},"7E7966D41810823500FA85AD_comment":"icon-40.png","7E7966D51810823500FA85AD":{"isa":"PBXFileReference","lastKnownFileType":"image.png","path":"\"icon-40@2x.png\"","sourceTree":"\"\""},"7E7966D51810823500FA85AD_comment":"icon-40@2x.png","7E7966D61810823500FA85AD":{"isa":"PBXFileReference","lastKnownFileType":"image.png","path":"\"icon-50.png\"","sourceTree":"\"\""},"7E7966D61810823500FA85AD_comment":"icon-50.png","7E7966D71810823500FA85AD":{"isa":"PBXFileReference","lastKnownFileType":"image.png","path":"\"icon-50@2x.png\"","sourceTree":"\"\""},"7E7966D71810823500FA85AD_comment":"icon-50@2x.png","7E7966D81810823500FA85AD":{"isa":"PBXFileReference","lastKnownFileType":"image.png","path":"\"icon-60.png\"","sourceTree":"\"\""},"7E7966D81810823500FA85AD_comment":"icon-60.png","7E7966D91810823500FA85AD":{"isa":"PBXFileReference","lastKnownFileType":"image.png","path":"\"icon-60@2x.png\"","sourceTree":"\"\""},"7E7966D91810823500FA85AD_comment":"icon-60@2x.png","7E7966DA1810823500FA85AD":{"isa":"PBXFileReference","lastKnownFileType":"image.png","path":"\"icon-76.png\"","sourceTree":"\"\""},"7E7966DA1810823500FA85AD_comment":"icon-76.png","7E7966DB1810823500FA85AD":{"isa":"PBXFileReference","lastKnownFileType":"image.png","path":"\"icon-76@2x.png\"","sourceTree":"\"\""},"7E7966DB1810823500FA85AD_comment":"icon-76@2x.png","7E7966DC1810823500FA85AD":{"isa":"PBXFileReference","lastKnownFileType":"image.png","path":"\"icon-small.png\"","sourceTree":"\"\""},"7E7966DC1810823500FA85AD_comment":"icon-small.png","7E7966DD1810823500FA85AD":{"isa":"PBXFileReference","lastKnownFileType":"image.png","path":"\"icon-small@2x.png\"","sourceTree":"\"\""},"7E7966DD1810823500FA85AD_comment":"icon-small@2x.png","8D1107310486CEB800E47090":{"isa":"PBXFileReference","fileEncoding":4,"lastKnownFileType":"text.plist.xml","name":"\"HelloCordova-Info.plist\"","path":"\"../HelloCordova-Info.plist\"","plistStructureDefinitionIdentifier":"\"com.apple.xcode.plist.structure-definition.iphone.info-plist\"","sourceTree":"\"\""},"8D1107310486CEB800E47090_comment":"HelloCordova-Info.plist","D4A0D8751607E02300AEF8BB":{"isa":"PBXFileReference","lastKnownFileType":"image.png","path":"\"Default-568h@2x~iphone.png\"","sourceTree":"\"\""},"D4A0D8751607E02300AEF8BB_comment":"Default-568h@2x~iphone.png","EB87FDF21871DA7A0020F90C":{"isa":"PBXFileReference","lastKnownFileType":"folder","name":"merges","path":"../../merges","sourceTree":"\"\""},"EB87FDF21871DA7A0020F90C_comment":"merges","EB87FDF31871DA8E0020F90C":{"isa":"PBXFileReference","lastKnownFileType":"folder","name":"www","path":"../../www","sourceTree":"\"\""},"EB87FDF31871DA8E0020F90C_comment":"www","EB87FDF41871DAF40020F90C":{"isa":"PBXFileReference","lastKnownFileType":"text.xml","name":"config.xml","path":"../../config.xml","sourceTree":"\"\""},"EB87FDF41871DAF40020F90C_comment":"config.xml","F840E1F0165FE0F500CFE078":{"isa":"PBXFileReference","lastKnownFileType":"text.xml","name":"config.xml","path":"HelloCordova/config.xml","sourceTree":"\"\""},"F840E1F0165FE0F500CFE078_comment":"config.xml","BF861BABA0714F35A28C9CE1":{"isa":"PBXFileReference","lastKnownFileType":"sourcecode.c.objc","name":"\"CDVLogger.m\"","path":"\"cordova-plugin-console/CDVLogger.m\"","sourceTree":"\"\"","fileEncoding":4},"BF861BABA0714F35A28C9CE1_comment":"CDVLogger.m","E9EE9AB5900F4BDAA302BBF4":{"isa":"PBXFileReference","lastKnownFileType":"sourcecode.c.h","name":"\"CDVLogger.h\"","path":"\"cordova-plugin-console/CDVLogger.h\"","sourceTree":"\"\"","fileEncoding":4},"E9EE9AB5900F4BDAA302BBF4_comment":"CDVLogger.h"},"PBXFrameworksBuildPhase":{"09536AA41B0D118800A1D6F8":{"isa":"PBXFrameworksBuildPhase","buildActionMask":2147483647,"files":[],"runOnlyForDeploymentPostprocessing":0},"09536AA41B0D118800A1D6F8_comment":"Frameworks","1D60588F0D05DD3D006BFB54":{"isa":"PBXFrameworksBuildPhase","buildActionMask":2147483647,"files":[{"value":"5B1594DD16A7569C00FEF299","comment":"AssetsLibrary.framework in Frameworks"},{"value":"301BF552109A68D80062928A","comment":"libCordova.a in Frameworks"},{"value":"288765FD0DF74451002DB57D","comment":"CoreGraphics.framework in Frameworks"},{"value":"305D5FD1115AB8F900A74A75","comment":"MobileCoreServices.framework in Frameworks"}],"runOnlyForDeploymentPostprocessing":0},"1D60588F0D05DD3D006BFB54_comment":"Frameworks"},"PBXGroup":{"080E96DDFE201D6D7F000001":{"isa":"PBXGroup","children":[{"value":"302D95EE14D2391D003F00A1","comment":"MainViewController.h"},{"value":"302D95EF14D2391D003F00A1","comment":"MainViewController.m"},{"value":"302D95F014D2391D003F00A1","comment":"MainViewController.xib"},{"value":"1D3623240D0F684500981E51","comment":"AppDelegate.h"},{"value":"1D3623250D0F684500981E51","comment":"AppDelegate.m"}],"name":"Classes","path":"HelloCordova/Classes","sourceTree":"SOURCE_ROOT"},"080E96DDFE201D6D7F000001_comment":"Classes","09536AA81B0D118800A1D6F8":{"isa":"PBXGroup","children":[{"value":"09536AAC1B0D118800A1D6F8","comment":"InterfaceController.h"},{"value":"09536AAD1B0D118800A1D6F8","comment":"InterfaceController.m"},{"value":"09536AAF1B0D118800A1D6F8","comment":"NotificationController.h"},{"value":"09536AB01B0D118800A1D6F8","comment":"NotificationController.m"},{"value":"09536AB21B0D118800A1D6F8","comment":"Images.xcassets"},{"value":"09536AA91B0D118800A1D6F8","comment":"Supporting Files"}],"path":"\"HelloCordova WatchKit Extension\"","sourceTree":"\"\""},"09536AA81B0D118800A1D6F8_comment":"HelloCordova WatchKit Extension","09536AA91B0D118800A1D6F8":{"isa":"PBXGroup","children":[{"value":"09536AAA1B0D118800A1D6F8","comment":"Info.plist"},{"value":"09536AAB1B0D118800A1D6F8","comment":"PushNotificationPayload.apns"}],"name":"\"Supporting Files\"","sourceTree":"\"\""},"09536AA91B0D118800A1D6F8_comment":"Supporting Files","09536ABA1B0D118900A1D6F8":{"isa":"PBXGroup","children":[{"value":"09536ABD1B0D118900A1D6F8","comment":"Interface.storyboard"},{"value":"09536AC01B0D118900A1D6F8","comment":"Images.xcassets"},{"value":"09536ABB1B0D118900A1D6F8","comment":"Supporting Files"}],"path":"\"HelloCordova WatchKit App\"","sourceTree":"\"\""},"09536ABA1B0D118900A1D6F8_comment":"HelloCordova WatchKit App","09536ABB1B0D118900A1D6F8":{"isa":"PBXGroup","children":[{"value":"09536ABC1B0D118900A1D6F8","comment":"Info.plist"}],"name":"\"Supporting Files\"","sourceTree":"\"\""},"09536ABB1B0D118900A1D6F8_comment":"Supporting Files","19C28FACFE9D520D11CA2CBB":{"isa":"PBXGroup","children":[{"value":"1D6058910D05DD3D006BFB54","comment":"HelloCordova.app"},{"value":"09536AA71B0D118800A1D6F8","comment":"HelloCordova WatchKit Extension.appex"},{"value":"09536AB61B0D118900A1D6F8","comment":"HelloCordova WatchKit App.app"}],"name":"Products","sourceTree":"\"\""},"19C28FACFE9D520D11CA2CBB_comment":"Products","29B97314FDCFA39411CA2CEA":{"isa":"PBXGroup","children":[{"value":"EB87FDF41871DAF40020F90C","comment":"config.xml"},{"value":"EB87FDF31871DA8E0020F90C","comment":"www"},{"value":"EB87FDF21871DA7A0020F90C","comment":"merges"},{"value":"EB87FDF11871DA420020F90C","comment":"Staging"},{"value":"301BF52D109A57CC0062928A","comment":"CordovaLib.xcodeproj"},{"value":"080E96DDFE201D6D7F000001","comment":"Classes"},{"value":"307C750510C5A3420062BCA9","comment":"Plugins"},{"value":"29B97315FDCFA39411CA2CEA","comment":"Other Sources"},{"value":"29B97317FDCFA39411CA2CEA","comment":"Resources"},{"value":"09536AA81B0D118800A1D6F8","comment":"HelloCordova WatchKit Extension"},{"value":"09536ABA1B0D118900A1D6F8","comment":"HelloCordova WatchKit App"},{"value":"29B97323FDCFA39411CA2CEA","comment":"Frameworks"},{"value":"19C28FACFE9D520D11CA2CBB","comment":"Products"}],"name":"CustomTemplate","sourceTree":"\"\""},"29B97314FDCFA39411CA2CEA_comment":"CustomTemplate","29B97315FDCFA39411CA2CEA":{"isa":"PBXGroup","children":[{"value":"32CA4F630368D1EE00C91783","comment":"HelloCordova-Prefix.pch"},{"value":"29B97316FDCFA39411CA2CEA","comment":"main.m"}],"name":"\"Other Sources\"","path":"HelloCordova","sourceTree":"\"\""},"29B97315FDCFA39411CA2CEA_comment":"Other Sources","29B97317FDCFA39411CA2CEA":{"isa":"PBXGroup","children":[{"value":"308D052D1370CCF300D202BF","comment":"icons"},{"value":"308D05311370CCF300D202BF","comment":"splash"},{"value":"8D1107310486CEB800E47090","comment":"HelloCordova-Info.plist"}],"name":"Resources","path":"HelloCordova/Resources","sourceTree":"\"\""},"29B97317FDCFA39411CA2CEA_comment":"Resources","29B97323FDCFA39411CA2CEA":{"isa":"PBXGroup","children":[{"value":"5B1594DC16A7569C00FEF299","comment":"AssetsLibrary.framework"},{"value":"288765FC0DF74451002DB57D","comment":"CoreGraphics.framework"},{"value":"305D5FD0115AB8F900A74A75","comment":"MobileCoreServices.framework"}],"name":"Frameworks","sourceTree":"\"\""},"29B97323FDCFA39411CA2CEA_comment":"Frameworks","301BF52E109A57CC0062928A":{"isa":"PBXGroup","children":[{"value":"301BF535109A57CC0062928A","comment":"libCordova.a"}],"name":"Products","sourceTree":"\"\""},"301BF52E109A57CC0062928A_comment":"Products","307C750510C5A3420062BCA9":{"isa":"PBXGroup","children":[{"value":"BF861BABA0714F35A28C9CE1","comment":"CDVLogger.m"},{"value":"E9EE9AB5900F4BDAA302BBF4","comment":"CDVLogger.h"}],"name":"Plugins","path":"HelloCordova/Plugins","sourceTree":"SOURCE_ROOT"},"307C750510C5A3420062BCA9_comment":"Plugins","308D052D1370CCF300D202BF":{"isa":"PBXGroup","children":[{"value":"30C1856519D5FC0A00212699","comment":"icon-60@3x.png"},{"value":"7E7966D41810823500FA85AD","comment":"icon-40.png"},{"value":"7E7966D51810823500FA85AD","comment":"icon-40@2x.png"},{"value":"7E7966D61810823500FA85AD","comment":"icon-50.png"},{"value":"7E7966D71810823500FA85AD","comment":"icon-50@2x.png"},{"value":"7E7966D81810823500FA85AD","comment":"icon-60.png"},{"value":"7E7966D91810823500FA85AD","comment":"icon-60@2x.png"},{"value":"7E7966DA1810823500FA85AD","comment":"icon-76.png"},{"value":"7E7966DB1810823500FA85AD","comment":"icon-76@2x.png"},{"value":"7E7966DC1810823500FA85AD","comment":"icon-small.png"},{"value":"7E7966DD1810823500FA85AD","comment":"icon-small@2x.png"},{"value":"30FC414816E50CA1004E6F35","comment":"icon-72@2x.png"},{"value":"308D052E1370CCF300D202BF","comment":"icon-72.png"},{"value":"308D052F1370CCF300D202BF","comment":"icon.png"},{"value":"308D05301370CCF300D202BF","comment":"icon@2x.png"}],"path":"icons","sourceTree":"\"\""},"308D052D1370CCF300D202BF_comment":"icons","308D05311370CCF300D202BF":{"isa":"PBXGroup","children":[{"value":"30B4F2FD19D5E07200D9F7D8","comment":"Default-667h.png"},{"value":"30B4F2FE19D5E07200D9F7D8","comment":"Default-736h.png"},{"value":"30B4F2FF19D5E07200D9F7D8","comment":"Default-Landscape-736h.png"},{"value":"D4A0D8751607E02300AEF8BB","comment":"Default-568h@2x~iphone.png"},{"value":"3088BBB7154F3926009F9C59","comment":"Default-Landscape@2x~ipad.png"},{"value":"3088BBB8154F3926009F9C59","comment":"Default-Landscape~ipad.png"},{"value":"3088BBB9154F3926009F9C59","comment":"Default-Portrait@2x~ipad.png"},{"value":"3088BBBA154F3926009F9C59","comment":"Default-Portrait~ipad.png"},{"value":"3088BBBB154F3926009F9C59","comment":"Default@2x~iphone.png"},{"value":"3088BBBC154F3926009F9C59","comment":"Default~iphone.png"}],"path":"splash","sourceTree":"\"\""},"308D05311370CCF300D202BF_comment":"splash","EB87FDF11871DA420020F90C":{"isa":"PBXGroup","children":[{"value":"F840E1F0165FE0F500CFE078","comment":"config.xml"},{"value":"301BF56E109A69640062928A","comment":"www"}],"name":"Staging","sourceTree":"\"\""},"EB87FDF11871DA420020F90C_comment":"Staging"},"PBXNativeTarget":{"09536AA61B0D118800A1D6F8":{"isa":"PBXNativeTarget","buildConfigurationList":"09536ACA1B0D118900A1D6F8","buildConfigurationList_comment":"Build configuration list for PBXNativeTarget \"HelloCordova WatchKit Extension\"","buildPhases":[{"value":"09536AA31B0D118800A1D6F8","comment":"Sources"},{"value":"09536AA41B0D118800A1D6F8","comment":"Frameworks"},{"value":"09536AA51B0D118800A1D6F8","comment":"Resources"}],"buildRules":[],"dependencies":[{"value":"09536AB91B0D118900A1D6F8","comment":"PBXTargetDependency"}],"name":"\"HelloCordova WatchKit Extension\"","productName":"\"HelloCordova WatchKit Extension\"","productReference":"09536AA71B0D118800A1D6F8","productReference_comment":"HelloCordova WatchKit Extension.appex","productType":"\"com.apple.product-type.watchkit-extension\""},"09536AA61B0D118800A1D6F8_comment":"HelloCordova WatchKit Extension","09536AB51B0D118900A1D6F8":{"isa":"PBXNativeTarget","buildConfigurationList":"09536AC91B0D118900A1D6F8","buildConfigurationList_comment":"Build configuration list for PBXNativeTarget \"HelloCordova WatchKit App\"","buildPhases":[{"value":"09536AB41B0D118900A1D6F8","comment":"Resources"}],"buildRules":[],"dependencies":[],"name":"\"HelloCordova WatchKit App\"","productName":"\"HelloCordova WatchKit App\"","productReference":"09536AB61B0D118900A1D6F8","productReference_comment":"HelloCordova WatchKit App.app","productType":"\"com.apple.product-type.application.watchapp\""},"09536AB51B0D118900A1D6F8_comment":"HelloCordova WatchKit App","1D6058900D05DD3D006BFB54":{"isa":"PBXNativeTarget","buildConfigurationList":"1D6058960D05DD3E006BFB54","buildConfigurationList_comment":"Build configuration list for PBXNativeTarget \"HelloCordova\"","buildPhases":[{"value":"304B58A110DAC018002A0835","comment":"Copy www directory"},{"value":"1D60588D0D05DD3D006BFB54","comment":"Resources"},{"value":"1D60588E0D05DD3D006BFB54","comment":"Sources"},{"value":"1D60588F0D05DD3D006BFB54","comment":"Frameworks"},{"value":"09536ACB1B0D118900A1D6F8","comment":"Embed App Extensions"}],"buildRules":[],"dependencies":[{"value":"301BF551109A68C00062928A","comment":"PBXTargetDependency"},{"value":"09536AC31B0D118900A1D6F8","comment":"PBXTargetDependency"}],"name":"HelloCordova","productName":"HelloCordova","productReference":"1D6058910D05DD3D006BFB54","productReference_comment":"HelloCordova.app","productType":"\"com.apple.product-type.application\""},"1D6058900D05DD3D006BFB54_comment":"HelloCordova"},"PBXProject":{"29B97313FDCFA39411CA2CEA":{"isa":"PBXProject","attributes":{"LastUpgradeCheck":510,"TargetAttributes":{"09536AA61B0D118800A1D6F8":{"CreatedOnToolsVersion":"6.3.1"},"09536AB51B0D118900A1D6F8":{"CreatedOnToolsVersion":"6.3.1"}}},"buildConfigurationList":"C01FCF4E08A954540054247B","buildConfigurationList_comment":"Build configuration list for PBXProject \"HelloCordova\"","compatibilityVersion":"\"Xcode 3.2\"","developmentRegion":"English","hasScannedForEncodings":1,"knownRegions":["English","Japanese","French","German","en","es","de","se","Base"],"mainGroup":"29B97314FDCFA39411CA2CEA","mainGroup_comment":"CustomTemplate","projectDirPath":"\"\"","projectReferences":[{"ProductGroup":"301BF52E109A57CC0062928A","ProductGroup_comment":"Products","ProjectRef":"301BF52D109A57CC0062928A","ProjectRef_comment":"CordovaLib.xcodeproj"}],"projectRoot":"\"\"","targets":[{"value":"1D6058900D05DD3D006BFB54","comment":"HelloCordova"},{"value":"09536AA61B0D118800A1D6F8","comment":"HelloCordova WatchKit Extension"},{"value":"09536AB51B0D118900A1D6F8","comment":"HelloCordova WatchKit App"}]},"29B97313FDCFA39411CA2CEA_comment":"Project object"},"PBXReferenceProxy":{"301BF535109A57CC0062928A":{"isa":"PBXReferenceProxy","fileType":"archive.ar","path":"libCordova.a","remoteRef":"301BF534109A57CC0062928A","remoteRef_comment":"PBXContainerItemProxy","sourceTree":"BUILT_PRODUCTS_DIR"},"301BF535109A57CC0062928A_comment":"libCordova.a"},"PBXResourcesBuildPhase":{"09536AA51B0D118800A1D6F8":{"isa":"PBXResourcesBuildPhase","buildActionMask":2147483647,"files":[{"value":"09536AB71B0D118900A1D6F8","comment":"HelloCordova WatchKit App.app in Resources"},{"value":"09536AB31B0D118800A1D6F8","comment":"Images.xcassets in Resources"}],"runOnlyForDeploymentPostprocessing":0},"09536AA51B0D118800A1D6F8_comment":"Resources","09536AB41B0D118900A1D6F8":{"isa":"PBXResourcesBuildPhase","buildActionMask":2147483647,"files":[{"value":"09536ABF1B0D118900A1D6F8","comment":"Interface.storyboard in Resources"},{"value":"09536AC11B0D118900A1D6F8","comment":"Images.xcassets in Resources"}],"runOnlyForDeploymentPostprocessing":0},"09536AB41B0D118900A1D6F8_comment":"Resources","1D60588D0D05DD3D006BFB54":{"isa":"PBXResourcesBuildPhase","buildActionMask":2147483647,"files":[{"value":"7E7966E41810823500FA85AD","comment":"icon-76.png in Resources"},{"value":"7E7966DF1810823500FA85AD","comment":"icon-40@2x.png in Resources"},{"value":"308D05371370CCF300D202BF","comment":"icon-72.png in Resources"},{"value":"30B4F30119D5E07200D9F7D8","comment":"Default-736h.png in Resources"},{"value":"308D05381370CCF300D202BF","comment":"icon.png in Resources"},{"value":"308D05391370CCF300D202BF","comment":"icon@2x.png in Resources"},{"value":"302D95F214D2391D003F00A1","comment":"MainViewController.xib in Resources"},{"value":"7E7966E01810823500FA85AD","comment":"icon-50.png in Resources"},{"value":"7E7966E31810823500FA85AD","comment":"icon-60@2x.png in Resources"},{"value":"7E7966E61810823500FA85AD","comment":"icon-small.png in Resources"},{"value":"3088BBBD154F3926009F9C59","comment":"Default-Landscape@2x~ipad.png in Resources"},{"value":"3088BBBE154F3926009F9C59","comment":"Default-Landscape~ipad.png in Resources"},{"value":"3088BBBF154F3926009F9C59","comment":"Default-Portrait@2x~ipad.png in Resources"},{"value":"7E7966E71810823500FA85AD","comment":"icon-small@2x.png in Resources"},{"value":"3088BBC0154F3926009F9C59","comment":"Default-Portrait~ipad.png in Resources"},{"value":"30B4F30019D5E07200D9F7D8","comment":"Default-667h.png in Resources"},{"value":"7E7966DE1810823500FA85AD","comment":"icon-40.png in Resources"},{"value":"3088BBC1154F3926009F9C59","comment":"Default@2x~iphone.png in Resources"},{"value":"7E7966E21810823500FA85AD","comment":"icon-60.png in Resources"},{"value":"3088BBC2154F3926009F9C59","comment":"Default~iphone.png in Resources"},{"value":"D4A0D8761607E02300AEF8BB","comment":"Default-568h@2x~iphone.png in Resources"},{"value":"30B4F30219D5E07200D9F7D8","comment":"Default-Landscape-736h.png in Resources"},{"value":"30C1856619D5FC0A00212699","comment":"icon-60@3x.png in Resources"},{"value":"7E7966E11810823500FA85AD","comment":"icon-50@2x.png in Resources"},{"value":"7E7966E51810823500FA85AD","comment":"icon-76@2x.png in Resources"},{"value":"30FC414916E50CA1004E6F35","comment":"icon-72@2x.png in Resources"}],"runOnlyForDeploymentPostprocessing":0},"1D60588D0D05DD3D006BFB54_comment":"Resources"},"PBXShellScriptBuildPhase":{"304B58A110DAC018002A0835":{"isa":"PBXShellScriptBuildPhase","buildActionMask":2147483647,"files":[],"inputPaths":[],"name":"\"Copy www directory\"","outputPaths":[],"runOnlyForDeploymentPostprocessing":0,"shellPath":"/bin/sh","shellScript":"\"cordova/lib/copy-www-build-step.sh\"","showEnvVarsInLog":0},"304B58A110DAC018002A0835_comment":"Copy www directory"},"PBXSourcesBuildPhase":{"09536AA31B0D118800A1D6F8":{"isa":"PBXSourcesBuildPhase","buildActionMask":2147483647,"files":[{"value":"09536AB11B0D118800A1D6F8","comment":"NotificationController.m in Sources"},{"value":"09536AAE1B0D118800A1D6F8","comment":"InterfaceController.m in Sources"}],"runOnlyForDeploymentPostprocessing":0},"09536AA31B0D118800A1D6F8_comment":"Sources","1D60588E0D05DD3D006BFB54":{"isa":"PBXSourcesBuildPhase","buildActionMask":2147483647,"files":[{"value":"1D60589B0D05DD56006BFB54","comment":"main.m in Sources"},{"value":"1D3623260D0F684500981E51","comment":"AppDelegate.m in Sources"},{"value":"302D95F114D2391D003F00A1","comment":"MainViewController.m in Sources"},{"value":"88C7083B33E54340BFE0484F","comment":"CDVLogger.m in Sources"},{"value":"BA0D8677B2654B4BB7146A16","comment":"CDVLogger.m in Sources"}],"runOnlyForDeploymentPostprocessing":0},"1D60588E0D05DD3D006BFB54_comment":"Sources"},"PBXTargetDependency":{"09536AB91B0D118900A1D6F8":{"isa":"PBXTargetDependency","target":"09536AB51B0D118900A1D6F8","target_comment":"HelloCordova WatchKit App","targetProxy":"09536AB81B0D118900A1D6F8","targetProxy_comment":"PBXContainerItemProxy"},"09536AB91B0D118900A1D6F8_comment":"PBXTargetDependency","09536AC31B0D118900A1D6F8":{"isa":"PBXTargetDependency","target":"09536AA61B0D118800A1D6F8","target_comment":"HelloCordova WatchKit Extension","targetProxy":"09536AC21B0D118900A1D6F8","targetProxy_comment":"PBXContainerItemProxy"},"09536AC31B0D118900A1D6F8_comment":"PBXTargetDependency","301BF551109A68C00062928A":{"isa":"PBXTargetDependency","name":"CordovaLib","targetProxy":"301BF550109A68C00062928A","targetProxy_comment":"PBXContainerItemProxy"},"301BF551109A68C00062928A_comment":"PBXTargetDependency"},"PBXVariantGroup":{"09536ABD1B0D118900A1D6F8":{"isa":"PBXVariantGroup","children":[{"value":"09536ABE1B0D118900A1D6F8","comment":"Base"}],"name":"Interface.storyboard","sourceTree":"\"\""},"09536ABD1B0D118900A1D6F8_comment":"Interface.storyboard"},"XCBuildConfiguration":{"09536AC51B0D118900A1D6F8":{"isa":"XCBuildConfiguration","buildSettings":{"ALWAYS_SEARCH_USER_PATHS":"NO","CLANG_CXX_LANGUAGE_STANDARD":"\"gnu++0x\"","CLANG_CXX_LIBRARY":"\"libc++\"","CLANG_ENABLE_MODULES":"YES","CLANG_WARN_DIRECT_OBJC_ISA_USAGE":"YES_ERROR","CLANG_WARN_OBJC_ROOT_CLASS":"YES_ERROR","CLANG_WARN_UNREACHABLE_CODE":"YES","COPY_PHASE_STRIP":"NO","DEBUG_INFORMATION_FORMAT":"\"dwarf-with-dsym\"","ENABLE_STRICT_OBJC_MSGSEND":"YES","GCC_C_LANGUAGE_STANDARD":"gnu99","GCC_DYNAMIC_NO_PIC":"NO","GCC_NO_COMMON_BLOCKS":"YES","GCC_OPTIMIZATION_LEVEL":0,"GCC_PREPROCESSOR_DEFINITIONS":["\"DEBUG=1\"","\"$(inherited)\""],"GCC_SYMBOLS_PRIVATE_EXTERN":"NO","GCC_WARN_64_TO_32_BIT_CONVERSION":"YES","GCC_WARN_ABOUT_RETURN_TYPE":"YES_ERROR","GCC_WARN_UNINITIALIZED_AUTOS":"YES_AGGRESSIVE","INFOPLIST_FILE":"\"HelloCordova WatchKit Extension/Info.plist\"","IPHONEOS_DEPLOYMENT_TARGET":"8.3","LD_RUNPATH_SEARCH_PATHS":"\"$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks\"","MTL_ENABLE_DEBUG_INFO":"YES","PRODUCT_NAME":"\"${TARGET_NAME}\"","SKIP_INSTALL":"YES"},"name":"Debug"},"09536AC51B0D118900A1D6F8_comment":"Debug","09536AC61B0D118900A1D6F8":{"isa":"XCBuildConfiguration","buildSettings":{"ALWAYS_SEARCH_USER_PATHS":"NO","CLANG_CXX_LANGUAGE_STANDARD":"\"gnu++0x\"","CLANG_CXX_LIBRARY":"\"libc++\"","CLANG_ENABLE_MODULES":"YES","CLANG_WARN_DIRECT_OBJC_ISA_USAGE":"YES_ERROR","CLANG_WARN_OBJC_ROOT_CLASS":"YES_ERROR","CLANG_WARN_UNREACHABLE_CODE":"YES","COPY_PHASE_STRIP":"NO","DEBUG_INFORMATION_FORMAT":"\"dwarf-with-dsym\"","ENABLE_NS_ASSERTIONS":"NO","ENABLE_STRICT_OBJC_MSGSEND":"YES","GCC_C_LANGUAGE_STANDARD":"gnu99","GCC_NO_COMMON_BLOCKS":"YES","GCC_WARN_64_TO_32_BIT_CONVERSION":"YES","GCC_WARN_ABOUT_RETURN_TYPE":"YES_ERROR","GCC_WARN_UNINITIALIZED_AUTOS":"YES_AGGRESSIVE","INFOPLIST_FILE":"\"HelloCordova WatchKit Extension/Info.plist\"","IPHONEOS_DEPLOYMENT_TARGET":"8.3","LD_RUNPATH_SEARCH_PATHS":"\"$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks\"","MTL_ENABLE_DEBUG_INFO":"NO","PRODUCT_NAME":"\"${TARGET_NAME}\"","SKIP_INSTALL":"YES","VALIDATE_PRODUCT":"YES"},"name":"Release"},"09536AC61B0D118900A1D6F8_comment":"Release","09536AC71B0D118900A1D6F8":{"isa":"XCBuildConfiguration","buildSettings":{"ALWAYS_SEARCH_USER_PATHS":"NO","ASSETCATALOG_COMPILER_APPICON_NAME":"AppIcon","CLANG_CXX_LANGUAGE_STANDARD":"\"gnu++0x\"","CLANG_CXX_LIBRARY":"\"libc++\"","CLANG_ENABLE_MODULES":"YES","CLANG_WARN_DIRECT_OBJC_ISA_USAGE":"YES_ERROR","CLANG_WARN_OBJC_ROOT_CLASS":"YES_ERROR","CLANG_WARN_UNREACHABLE_CODE":"YES","COPY_PHASE_STRIP":"NO","DEBUG_INFORMATION_FORMAT":"\"dwarf-with-dsym\"","ENABLE_STRICT_OBJC_MSGSEND":"YES","GCC_C_LANGUAGE_STANDARD":"gnu99","GCC_DYNAMIC_NO_PIC":"NO","GCC_NO_COMMON_BLOCKS":"YES","GCC_OPTIMIZATION_LEVEL":0,"GCC_PREPROCESSOR_DEFINITIONS":["\"DEBUG=1\"","\"$(inherited)\""],"GCC_SYMBOLS_PRIVATE_EXTERN":"NO","GCC_WARN_64_TO_32_BIT_CONVERSION":"YES","GCC_WARN_ABOUT_RETURN_TYPE":"YES_ERROR","GCC_WARN_UNINITIALIZED_AUTOS":"YES_AGGRESSIVE","IBSC_MODULE":"HelloCordova_WatchKit_Extension","INFOPLIST_FILE":"\"HelloCordova WatchKit App/Info.plist\"","IPHONEOS_DEPLOYMENT_TARGET":"8.3","MTL_ENABLE_DEBUG_INFO":"YES","PRODUCT_NAME":"\"$(TARGET_NAME)\"","SKIP_INSTALL":"YES","TARGETED_DEVICE_FAMILY":4,"\"TARGETED_DEVICE_FAMILY[sdk=iphonesimulator*]\"":"\"1,4\""},"name":"Debug"},"09536AC71B0D118900A1D6F8_comment":"Debug","09536AC81B0D118900A1D6F8":{"isa":"XCBuildConfiguration","buildSettings":{"ALWAYS_SEARCH_USER_PATHS":"NO","ASSETCATALOG_COMPILER_APPICON_NAME":"AppIcon","CLANG_CXX_LANGUAGE_STANDARD":"\"gnu++0x\"","CLANG_CXX_LIBRARY":"\"libc++\"","CLANG_ENABLE_MODULES":"YES","CLANG_WARN_DIRECT_OBJC_ISA_USAGE":"YES_ERROR","CLANG_WARN_OBJC_ROOT_CLASS":"YES_ERROR","CLANG_WARN_UNREACHABLE_CODE":"YES","COPY_PHASE_STRIP":"NO","DEBUG_INFORMATION_FORMAT":"\"dwarf-with-dsym\"","ENABLE_NS_ASSERTIONS":"NO","ENABLE_STRICT_OBJC_MSGSEND":"YES","GCC_C_LANGUAGE_STANDARD":"gnu99","GCC_NO_COMMON_BLOCKS":"YES","GCC_WARN_64_TO_32_BIT_CONVERSION":"YES","GCC_WARN_ABOUT_RETURN_TYPE":"YES_ERROR","GCC_WARN_UNINITIALIZED_AUTOS":"YES_AGGRESSIVE","IBSC_MODULE":"HelloCordova_WatchKit_Extension","INFOPLIST_FILE":"\"HelloCordova WatchKit App/Info.plist\"","IPHONEOS_DEPLOYMENT_TARGET":"8.3","MTL_ENABLE_DEBUG_INFO":"NO","PRODUCT_NAME":"\"$(TARGET_NAME)\"","SKIP_INSTALL":"YES","TARGETED_DEVICE_FAMILY":4,"\"TARGETED_DEVICE_FAMILY[sdk=iphonesimulator*]\"":"\"1,4\"","VALIDATE_PRODUCT":"YES"},"name":"Release"},"09536AC81B0D118900A1D6F8_comment":"Release","1D6058940D05DD3E006BFB54":{"isa":"XCBuildConfiguration","buildSettings":{"ALWAYS_SEARCH_USER_PATHS":"NO","CLANG_ENABLE_OBJC_ARC":"YES","COPY_PHASE_STRIP":"NO","GCC_DYNAMIC_NO_PIC":"NO","GCC_OPTIMIZATION_LEVEL":0,"GCC_PRECOMPILE_PREFIX_HEADER":"YES","GCC_PREFIX_HEADER":"\"HelloCordova/HelloCordova-Prefix.pch\"","GCC_THUMB_SUPPORT":"NO","GCC_VERSION":"\"\"","INFOPLIST_FILE":"\"HelloCordova/HelloCordova-Info.plist\"","IPHONEOS_DEPLOYMENT_TARGET":"6.0","OTHER_LDFLAGS":["\"-weak_framework\"","CoreFoundation","\"-weak_framework\"","UIKit","\"-weak_framework\"","AVFoundation","\"-weak_framework\"","CoreMedia","\"-weak-lSystem\"","\"-ObjC\""],"PRODUCT_NAME":"HelloCordova","TARGETED_DEVICE_FAMILY":"\"1,2\""},"name":"Debug"},"1D6058940D05DD3E006BFB54_comment":"Debug","1D6058950D05DD3E006BFB54":{"isa":"XCBuildConfiguration","buildSettings":{"ALWAYS_SEARCH_USER_PATHS":"NO","CLANG_ENABLE_OBJC_ARC":"YES","COPY_PHASE_STRIP":"YES","GCC_PRECOMPILE_PREFIX_HEADER":"YES","GCC_PREFIX_HEADER":"\"HelloCordova/HelloCordova-Prefix.pch\"","GCC_THUMB_SUPPORT":"NO","GCC_VERSION":"\"\"","INFOPLIST_FILE":"\"HelloCordova/HelloCordova-Info.plist\"","IPHONEOS_DEPLOYMENT_TARGET":"6.0","OTHER_LDFLAGS":["\"-weak_framework\"","CoreFoundation","\"-weak_framework\"","UIKit","\"-weak_framework\"","AVFoundation","\"-weak_framework\"","CoreMedia","\"-weak-lSystem\"","\"-ObjC\""],"PRODUCT_NAME":"HelloCordova","TARGETED_DEVICE_FAMILY":"\"1,2\""},"name":"Release"},"1D6058950D05DD3E006BFB54_comment":"Release","C01FCF4F08A954540054247B":{"isa":"XCBuildConfiguration","buildSettings":{"CLANG_ENABLE_OBJC_ARC":"YES","CLANG_WARN_BOOL_CONVERSION":"YES","CLANG_WARN_CONSTANT_CONVERSION":"YES","CLANG_WARN_EMPTY_BODY":"YES","CLANG_WARN_ENUM_CONVERSION":"YES","CLANG_WARN_INT_CONVERSION":"YES","CLANG_WARN__DUPLICATE_METHOD_MATCH":"YES","\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\"":"\"iPhone Developer\"","GCC_C_LANGUAGE_STANDARD":"c99","GCC_THUMB_SUPPORT":"NO","GCC_VERSION":"\"\"","GCC_WARN_ABOUT_RETURN_TYPE":"YES","GCC_WARN_UNDECLARED_SELECTOR":"YES","GCC_WARN_UNINITIALIZED_AUTOS":"YES","GCC_WARN_UNUSED_FUNCTION":"YES","GCC_WARN_UNUSED_VARIABLE":"YES","HEADER_SEARCH_PATHS":["\"\\\"$(TARGET_BUILD_DIR)/usr/local/lib/include\\\"\"","\"\\\"$(OBJROOT)/UninstalledProducts/include\\\"\"","\"\\\"$(BUILT_PRODUCTS_DIR)\\\"\""],"IPHONEOS_DEPLOYMENT_TARGET":"6.0","ONLY_ACTIVE_ARCH":"YES","OTHER_LDFLAGS":["\"-weak_framework\"","CoreFoundation","\"-weak_framework\"","UIKit","\"-weak_framework\"","AVFoundation","\"-weak_framework\"","CoreMedia","\"-weak-lSystem\"","\"-ObjC\""],"SDKROOT":"iphoneos","SKIP_INSTALL":"NO","USER_HEADER_SEARCH_PATHS":"\"\""},"name":"Debug"},"C01FCF4F08A954540054247B_comment":"Debug","C01FCF5008A954540054247B":{"isa":"XCBuildConfiguration","buildSettings":{"CLANG_ENABLE_OBJC_ARC":"YES","CLANG_WARN_BOOL_CONVERSION":"YES","CLANG_WARN_CONSTANT_CONVERSION":"YES","CLANG_WARN_EMPTY_BODY":"YES","CLANG_WARN_ENUM_CONVERSION":"YES","CLANG_WARN_INT_CONVERSION":"YES","CLANG_WARN__DUPLICATE_METHOD_MATCH":"YES","\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\"":"\"iPhone Developer\"","GCC_C_LANGUAGE_STANDARD":"c99","GCC_THUMB_SUPPORT":"NO","GCC_VERSION":"\"\"","GCC_WARN_ABOUT_RETURN_TYPE":"YES","GCC_WARN_UNDECLARED_SELECTOR":"YES","GCC_WARN_UNINITIALIZED_AUTOS":"YES","GCC_WARN_UNUSED_FUNCTION":"YES","GCC_WARN_UNUSED_VARIABLE":"YES","HEADER_SEARCH_PATHS":["\"\\\"$(TARGET_BUILD_DIR)/usr/local/lib/include\\\"\"","\"\\\"$(OBJROOT)/UninstalledProducts/include\\\"\"","\"\\\"$(BUILT_PRODUCTS_DIR)\\\"\""],"IPHONEOS_DEPLOYMENT_TARGET":"6.0","OTHER_LDFLAGS":["\"-weak_framework\"","CoreFoundation","\"-weak_framework\"","UIKit","\"-weak_framework\"","AVFoundation","\"-weak_framework\"","CoreMedia","\"-weak-lSystem\"","\"-ObjC\""],"SDKROOT":"iphoneos","SKIP_INSTALL":"NO","USER_HEADER_SEARCH_PATHS":"\"\""},"name":"Release"},"C01FCF5008A954540054247B_comment":"Release"},"XCConfigurationList":{"09536AC91B0D118900A1D6F8":{"isa":"XCConfigurationList","buildConfigurations":[{"value":"09536AC71B0D118900A1D6F8","comment":"Debug"},{"value":"09536AC81B0D118900A1D6F8","comment":"Release"}],"defaultConfigurationIsVisible":0,"defaultConfigurationName":"Release"},"09536AC91B0D118900A1D6F8_comment":"Build configuration list for PBXNativeTarget \"HelloCordova WatchKit App\"","09536ACA1B0D118900A1D6F8":{"isa":"XCConfigurationList","buildConfigurations":[{"value":"09536AC51B0D118900A1D6F8","comment":"Debug"},{"value":"09536AC61B0D118900A1D6F8","comment":"Release"}],"defaultConfigurationIsVisible":0,"defaultConfigurationName":"Release"},"09536ACA1B0D118900A1D6F8_comment":"Build configuration list for PBXNativeTarget \"HelloCordova WatchKit Extension\"","1D6058960D05DD3E006BFB54":{"isa":"XCConfigurationList","buildConfigurations":[{"value":"1D6058940D05DD3E006BFB54","comment":"Debug"},{"value":"1D6058950D05DD3E006BFB54","comment":"Release"}],"defaultConfigurationIsVisible":0,"defaultConfigurationName":"Release"},"1D6058960D05DD3E006BFB54_comment":"Build configuration list for PBXNativeTarget \"HelloCordova\"","C01FCF4E08A954540054247B":{"isa":"XCConfigurationList","buildConfigurations":[{"value":"C01FCF4F08A954540054247B","comment":"Debug"},{"value":"C01FCF5008A954540054247B","comment":"Release"}],"defaultConfigurationIsVisible":0,"defaultConfigurationName":"Release"},"C01FCF4E08A954540054247B_comment":"Build configuration list for PBXProject \"HelloCordova\""}},"rootObject":"29B97313FDCFA39411CA2CEA","rootObject_comment":"Project object"},"headComment":"!$*UTF8*$!"} diff --git a/test/multipleTargets.js b/test/multipleTargets.js new file mode 100644 index 0000000..2ef3d4b --- /dev/null +++ b/test/multipleTargets.js @@ -0,0 +1,153 @@ +var fullProject = require('./fixtures/multiple-targets') + fullProjectStr = JSON.stringify(fullProject), + pbx = require('../lib/pbxProject'), + pbxFile = require('../lib/pbxFile'), + proj = new pbx('.'); + +function cleanHash() { + return JSON.parse(fullProjectStr); +} + +exports.setUp = function (callback) { + proj.hash = cleanHash(); + callback(); +} + +exports.addFilesToTarget = { + 'should add the file to a proper target': function (test) { + + var target = "1D6058900D05DD3D006BFB54"; + var filename = "file.m"; + + var opt = { target : target }; + var newFile = proj.addSourceFile(filename,opt); + + test.equal(newFile.constructor, pbxFile); + + var sources = proj.pbxSourcesBuildPhaseObj(target); + test.equal(sources.files[5].comment, filename+" in Sources"); + + test.done(); + }, + 'should remove the file from the proper target': function (test) { + + var target = "1D6058900D05DD3D006BFB54"; + var filename = "file.m"; + + var opt = { target : target }; + var newFile = proj.addSourceFile(filename,opt); + + test.equal(newFile.constructor, pbxFile); + + var sources = proj.pbxSourcesBuildPhaseObj(target); + test.equal(sources.files[5].comment, filename+" in Sources"); + var l = sources.files.length; + + proj.removeSourceFile(filename,opt); + var sources = proj.pbxSourcesBuildPhaseObj(target); + test.equal(sources.files.length,l-1); + + test.done(); + }, + 'should fail when specifying an invalid target': function (test) { + + var target = "XXXXX"; + var filename = "file.m"; + + var opt = { target : target }; + test.throws(function(){ + proj.addSourceFile(filename,opt); + }); + + + test.done(); + }, + 'should add the library to a proper target': function (test) { + + var target = "1D6058900D05DD3D006BFB54"; + var filename = "library.lib"; + + var opt = { target : target }; + var newFile = proj.addStaticLibrary(filename,opt); + + test.equal(newFile.constructor, pbxFile); + + var libraries = proj.pbxFrameworksBuildPhaseObj(target); + test.equal(libraries.files[4].comment, filename+" in Resources"); + + test.done(); + }, + 'should remove the library to a proper target': function (test) { + + var target = "1D6058900D05DD3D006BFB54"; + var filename = "library.lib"; + + var opt = { target : target }; + var newFile = proj.addStaticLibrary(filename,opt); + + test.equal(newFile.constructor, pbxFile); + + var libraries = proj.pbxFrameworksBuildPhaseObj(target); + test.equal(libraries.files[4].comment, filename+" in Resources"); + var l = libraries.files.length; + + proj.removeFramework(filename,opt); + var libraries = proj.pbxFrameworksBuildPhaseObj(target); + test.equal(libraries.files.length,l-1); + + test.done(); + + }, + 'should add the framework to a proper target': function (test) { + + var target = "1D6058900D05DD3D006BFB54"; + var filename = "delta.framework"; + + var opt = { target : target }; + var newFile = proj.addFramework(filename,opt); + + test.equal(newFile.constructor, pbxFile); + + var frameworks = proj.pbxFrameworksBuildPhaseObj(target); + test.equal(frameworks.files[4].comment, filename+" in Frameworks"); + + test.done(); + }, + 'should add a ressource fileto a proper target': function (test) { + + var target = "1D6058900D05DD3D006BFB54"; + var filename = "delta.png"; + + var opt = { target : target }; + var newFile = proj.addResourceFile(filename,opt); + + test.equal(newFile.constructor, pbxFile); + + var resources = proj.pbxResourcesBuildPhaseObj(target); + test.equal(resources.files[26].comment, filename+" in Resources"); + + test.done(); + }, + 'should remove a ressource file from a proper target': function (test) { + + var target = "1D6058900D05DD3D006BFB54"; + var filename = "delta.png"; + + var opt = { target : target }; + var newFile = proj.addResourceFile(filename,opt); + + test.equal(newFile.constructor, pbxFile); + + var resources = proj.pbxResourcesBuildPhaseObj(target); + test.equal(resources.files[26].comment, filename+" in Resources"); + + var l = resources.files.length; + + proj.removeResourceFile(filename,opt); + var resources = proj.pbxResourcesBuildPhaseObj(target); + test.equal(resources.files.length,l-1); + + test.done(); + }, +} + diff --git a/test/parser/projects/expected/with_array_expected.pbxproj b/test/parser/projects/expected/with_array_expected.pbxproj new file mode 100644 index 0000000..efa5e47 --- /dev/null +++ b/test/parser/projects/expected/with_array_expected.pbxproj @@ -0,0 +1,25 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + empties = ( + ); + ARCHS = ( + armv6, + armv7, + ); + files = ( + 1D60589B0D05DD56006BFB54 /* main.m in Sources */, + 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */, + ); + LIBS = ( + "$(SRCROOT)/bestgame/libs/**", + ); + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/bestgame/libs/**", + ); + objectVersion = 45; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/test/parser/projects/section-split.pbxproj b/test/parser/projects/section-split.pbxproj new file mode 100644 index 0000000..7b7f2df --- /dev/null +++ b/test/parser/projects/section-split.pbxproj @@ -0,0 +1,25 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 45; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; + objects = { +/* Begin PBXTargetDependency section */ + 301BF551109A68C00062928A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = PhoneGapLib; + targetProxy = 301BF550109A68C00062928A /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXTargetDependency section */ + 45FDD1944D304A9F96DF3AC6 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = SecondLib; + targetProxy = 301BF550109A68C00062928A /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + }; +} diff --git a/test/parser/projects/with_array.pbxproj b/test/parser/projects/with_array.pbxproj index bdd7247..2c876f2 100644 --- a/test/parser/projects/with_array.pbxproj +++ b/test/parser/projects/with_array.pbxproj @@ -13,6 +13,13 @@ 1D60589B0D05DD56006BFB54 /* main.m in Sources */, 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */, ); + LIBS = ( + "$(SRCROOT)/bestgame/libs/**" + ); + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/bestgame/libs/**" + ); objectVersion = 45; rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; } diff --git a/test/parser/section-split.js b/test/parser/section-split.js new file mode 100644 index 0000000..ea6bf1d --- /dev/null +++ b/test/parser/section-split.js @@ -0,0 +1,35 @@ +var PEG = require('pegjs'), + fs = require('fs'), + pbx = fs.readFileSync('test/parser/projects/section-split.pbxproj', 'utf-8'), + grammar = fs.readFileSync('lib/parser/pbxproj.pegjs', 'utf-8'), + parser = PEG.buildParser(grammar), + rawProj = parser.parse(pbx), + project = rawProj.project; + +exports['should have a PBXTargetDependency section'] = function (test) { + test.ok(project.objects['PBXTargetDependency']); + test.done(); +} + +exports['should have the right child of PBXTargetDependency section'] = function (test) { + test.ok(project.objects['PBXTargetDependency']['301BF551109A68C00062928A']); + test.done(); +} + +exports['should have the right properties on the dependency'] = function (test) { + var dependency = project.objects['PBXTargetDependency']['301BF551109A68C00062928A']; + + test.equal(dependency.isa, 'PBXTargetDependency') + test.equal(dependency.name, 'PhoneGapLib') + test.equal(dependency.targetProxy, '301BF550109A68C00062928A') + test.equal(dependency['targetProxy_comment'], 'PBXContainerItemProxy') + + test.done(); +} + +exports['should merge two PBXTargetDependency sections'] = function (test) { + test.ok(project.objects['PBXTargetDependency']['301BF551109A68C00062928A']); + test.ok(project.objects['PBXTargetDependency']['45FDD1944D304A9F96DF3AC6']); + test.done(); +} + diff --git a/test/pbxFile.js b/test/pbxFile.js index 2760403..0e3c4ee 100644 --- a/test/pbxFile.js +++ b/test/pbxFile.js @@ -43,6 +43,13 @@ exports['lastType'] = { test.done(); }, + 'should detect that a .framework/.a path means archive.ar': function (test) { + var sourceFile = new pbxFile('MessageUI.framework/libGoogleAnalytics.a'); + + test.equal('archive.ar', sourceFile.lastType); + test.done(); + }, + 'should detect that a .a path means archive.ar': function (test) { var sourceFile = new pbxFile('libGoogleAnalytics.a'); @@ -195,9 +202,9 @@ exports['settings'] = { 'should be {COMPILER_FLAGS:"blah"} if compiler flags specified': function (test) { var sourceFile = new pbxFile('Plugins/BarcodeScanner.m', - { compilerFlags: "-fno-objc-arc" }); + { compilerFlags: "-std=c++11 -fno-objc-arc" }); - test.deepEqual({COMPILER_FLAGS:"-fno-objc-arc"}, sourceFile.settings); + test.deepEqual({COMPILER_FLAGS:'"-std=c++11 -fno-objc-arc"'}, sourceFile.settings); test.done(); } } diff --git a/test/pbxItemByComment.js b/test/pbxItemByComment.js new file mode 100644 index 0000000..d5d2146 --- /dev/null +++ b/test/pbxItemByComment.js @@ -0,0 +1,50 @@ +var fullProject = require('./fixtures/full-project') + fullProjectStr = JSON.stringify(fullProject), + pbx = require('../lib/pbxProject'), + proj = new pbx('.'); + +function cleanHash() { + return JSON.parse(fullProjectStr); +} + +exports.setUp = function (callback) { + proj.hash = cleanHash(); + callback(); +} + +exports.pbxItemByComment = { + 'should return PBXTargetDependency': function (test) { + var pbxItem = proj.pbxItemByComment('PBXTargetDependency', 'PBXTargetDependency'); + + test.ok(pbxItem); + test.equals(pbxItem.isa, 'PBXTargetDependency'); + test.done() + }, + 'should return PBXContainerItemProxy': function (test) { + var pbxItem = proj.pbxItemByComment('libPhoneGap.a', 'PBXReferenceProxy'); + + test.ok(pbxItem); + test.equals(pbxItem.isa, 'PBXReferenceProxy'); + test.done() + }, + 'should return PBXResourcesBuildPhase': function (test) { + var pbxItem = proj.pbxItemByComment('Resources', 'PBXResourcesBuildPhase'); + + test.ok(pbxItem); + test.equals(pbxItem.isa, 'PBXResourcesBuildPhase'); + test.done() + }, + 'should return PBXShellScriptBuildPhase': function (test) { + var pbxItem = proj.pbxItemByComment('Touch www folder', 'PBXShellScriptBuildPhase'); + + test.ok(pbxItem); + test.equals(pbxItem.isa, 'PBXShellScriptBuildPhase'); + test.done() + }, + 'should return null when PBXNativeTarget not found': function (test) { + var pbxItem = proj.pbxItemByComment('Invalid', 'PBXTargetDependency'); + + test.equal(pbxItem, null); + test.done() + } +} diff --git a/test/pbxProject.js b/test/pbxProject.js index 4d3ab9b..644ad90 100644 --- a/test/pbxProject.js +++ b/test/pbxProject.js @@ -169,6 +169,9 @@ exports['updateBuildProperty function'] = { myProj.updateBuildProperty('TARGETED_DEVICE_FAMILY', '"arm"'); var newContents = myProj.writeSync(); test.ok(newContents.match(/TARGETED_DEVICE_FAMILY\s*=\s*"arm"/)); + myProj.updateBuildProperty('OTHER_LDFLAGS', ['T','E','S','T']); + newContents = myProj.writeSync(); + test.ok(newContents.match(/OTHER_LDFLAGS\s*=\s*\(\s*T,\s*E,\s*S,\s*T,\s*\)/)) test.done(); }); } @@ -184,6 +187,28 @@ exports['productName field'] = { } } +exports['addPluginFile function'] = { + 'should strip the Plugin path prefix': function (test) { + var myProj = new pbx('test/parser/projects/full.pbxproj'); + + myProj.parse(function (err, hash) { + test.equal(myProj.addPluginFile('Plugins/testMac.m').path, 'testMac.m'); + test.equal(myProj.addPluginFile('Plugins\\testWin.m').path, 'testWin.m'); + test.done(); + }); + }, + 'should add files to the .pbxproj file using the / path seperator': function (test) { + var myProj = new pbx('test/parser/projects/full.pbxproj'); + + myProj.parse(function (err, hash) { + var file = myProj.addPluginFile('myPlugin\\newFile.m'); + + test.equal(myProj.pbxFileReferenceSection()[file.fileRef].path, '"myPlugin/newFile.m"'); + test.done(); + }); + } +} + exports['hasFile'] = { 'should return true if the file is in the project': function (test) { var newProj = new pbx('.'); diff --git a/test/pbxTargetByName.js b/test/pbxTargetByName.js new file mode 100644 index 0000000..a51cb74 --- /dev/null +++ b/test/pbxTargetByName.js @@ -0,0 +1,29 @@ +var fullProject = require('./fixtures/full-project') + fullProjectStr = JSON.stringify(fullProject), + pbx = require('../lib/pbxProject'), + proj = new pbx('.'); + +function cleanHash() { + return JSON.parse(fullProjectStr); +} + +exports.setUp = function (callback) { + proj.hash = cleanHash(); + callback(); +} + +exports.pbxTargetByName = { + 'should return PBXNativeTarget': function (test) { + var pbxTarget = proj.pbxTargetByName('KitchenSinktablet'); + + test.ok(pbxTarget); + test.equals(pbxTarget.isa, 'PBXNativeTarget'); + test.done() + }, + 'should return null when PBXNativeTarget not found': function (test) { + var pbxTarget = proj.pbxTargetByName('Invalid'); + + test.equal(pbxTarget, null); + test.done() + } +} diff --git a/test/pbxWriter.js b/test/pbxWriter.js index 982019f..d3b49e8 100644 --- a/test/pbxWriter.js +++ b/test/pbxWriter.js @@ -2,10 +2,15 @@ var pbx = require('../lib/pbxProject'), fs = require('fs'), myProj; -function testProjectContents(filename, test) { - var myProj = new pbx(filename), - content = fs.readFileSync(filename, 'utf-8'); +function testProjectContents(filename, test, expectedFilename) { + var myProj = new pbx(filename); + var content; + if (expectedFilename) { + content = fs.readFileSync(expectedFilename, 'utf-8'); + } else { + content = fs.readFileSync(filename, 'utf-8'); + } // normalize tabs vs strings content = content.replace(/ /g, '\t'); @@ -46,7 +51,10 @@ exports.writeSync = { testProjectContents('test/parser/projects/hash.pbxproj', test); }, 'should write out the "with_array" test': function (test) { - testProjectContents('test/parser/projects/with_array.pbxproj', test); + // Special case in that the originating project does not have a trailing comma for all of its array entries. + // This is definitely possibly. + // But when we write/read it out again during testing, the trailing commas are introduced by our library. + testProjectContents('test/parser/projects/with_array.pbxproj', test, 'test/parser/projects/expected/with_array_expected.pbxproj'); }, 'should write out the "section" test': function (test) { testProjectContents('test/parser/projects/section.pbxproj', test); diff --git a/test/removeSourceFile.js b/test/removeSourceFile.js index 63c4dfd..e31e727 100644 --- a/test/removeSourceFile.js +++ b/test/removeSourceFile.js @@ -126,6 +126,21 @@ exports.removeSourceFile = { test.ok(!sourceObj); test.done(); + }, + 'should remove file from PBXFileReference after modified by Xcode': function(test) { + var fileRef = proj.addSourceFile('Plugins/file.m').fileRef; + + // Simulate Xcode's behaviour of stripping quotes around path and name + // properties. + var entry = proj.pbxFileReferenceSection()[fileRef]; + entry.name = entry.name.replace(/^"(.*)"$/, "$1"); + entry.path = entry.path.replace(/^"(.*)"$/, "$1"); + + var newFile = proj.removeSourceFile('Plugins/file.m'); + + test.ok(newFile.uuid); + test.ok(!proj.pbxFileReferenceSection()[fileRef]); + test.done(); } }