@@ -15838,6 +15838,9 @@ function _insertBefore(parent, node, child, _inDocumentAssertion) {
1583815838 }
1583915839 do{
1584015840 newFirst.parentNode = parent;
15841+ // Update ownerDocument for each node being inserted
15842+ var targetDoc = parent.ownerDocument || parent;
15843+ _updateOwnerDocument(newFirst, targetDoc);
1584115844 }while(newFirst !== newLast && (newFirst= newFirst.nextSibling))
1584215845 _onUpdateChild(parent.ownerDocument||parent, parent);
1584315846 //console.log(parent.lastChild.nextSibling == null)
@@ -15847,6 +15850,37 @@ function _insertBefore(parent, node, child, _inDocumentAssertion) {
1584715850 return node;
1584815851}
1584915852
15853+ /**
15854+ * Recursively updates the ownerDocument property for a node and all its descendants
15855+ * @param {Node} node
15856+ * @param {Document} newOwnerDocument
15857+ * @private
15858+ */
15859+ function _updateOwnerDocument(node, newOwnerDocument) {
15860+ if (node.ownerDocument === newOwnerDocument) {
15861+ return;
15862+ }
15863+
15864+ node.ownerDocument = newOwnerDocument;
15865+
15866+ // Update attributes if this is an element
15867+ if (node.nodeType === ELEMENT_NODE && node.attributes) {
15868+ for (var i = 0; i < node.attributes.length; i++) {
15869+ var attr = node.attributes.item(i);
15870+ if (attr) {
15871+ attr.ownerDocument = newOwnerDocument;
15872+ }
15873+ }
15874+ }
15875+
15876+ // Recursively update child nodes
15877+ var child = node.firstChild;
15878+ while (child) {
15879+ _updateOwnerDocument(child, newOwnerDocument);
15880+ child = child.nextSibling;
15881+ }
15882+ }
15883+
1585015884/**
1585115885 * Appends `newChild` to `parentNode`.
1585215886 * If `newChild` is already connected to a `parentNode` it is first removed from it.
@@ -15872,6 +15906,11 @@ function _appendSingleChild (parentNode, newChild) {
1587215906 }
1587315907 parentNode.lastChild = newChild;
1587415908 _onUpdateChild(parentNode.ownerDocument, parentNode, newChild);
15909+
15910+ // Update ownerDocument for the new child and all its descendants
15911+ var targetDoc = parentNode.ownerDocument || parentNode;
15912+ _updateOwnerDocument(newChild, targetDoc);
15913+
1587515914 return newChild;
1587615915}
1587715916
@@ -15900,7 +15939,7 @@ Document.prototype = {
1590015939 return newChild;
1590115940 }
1590215941 _insertBefore(this, newChild, refChild);
15903- newChild.ownerDocument = this;
15942+ _updateOwnerDocument( newChild, this) ;
1590415943 if (this.documentElement === null && newChild.nodeType === ELEMENT_NODE) {
1590515944 this.documentElement = newChild;
1590615945 }
@@ -15916,7 +15955,7 @@ Document.prototype = {
1591615955 replaceChild: function (newChild, oldChild) {
1591715956 //raises
1591815957 _insertBefore(this, newChild, oldChild, assertPreReplacementValidityInDocument);
15919- newChild.ownerDocument = this;
15958+ _updateOwnerDocument( newChild, this) ;
1592015959 if (oldChild) {
1592115960 this.removeChild(oldChild);
1592215961 }
@@ -58449,7 +58488,7 @@ async function GetProjectDetails(credential, xcodeVersion) {
5844958488 core.debug(`Files found during search: ${files.join(', ')}`);
5845058489 const excludedProjects = ['GameAssembly', 'UnityFramework', 'Pods'];
5845158490 for (const file of files) {
58452- if (file.endsWith('.xcodeproj')) {
58491+ if (file.endsWith('.xcodeproj') && !file.includes('DerivedData') ) {
5845358492 const projectBaseName = path.basename(file, '.xcodeproj');
5845458493 if (excludedProjects.includes(projectBaseName)) {
5845558494 continue;
@@ -61570,14 +61609,11 @@ const main = async () => {
6157061609 const match = line.match(/(\d+\.\d+(\s\w+)?)/);
6157161610 return match ? match[1] : null;
6157261611 }).filter(Boolean);
61573- core.debug(`Installed Xcode versions:\n ${installedXcodeVersions.join('\n')}`);
61612+ core.info(`Installed Xcode versions:`);
61613+ installedXcodeVersions.forEach(version => core.info(` > ${version}`));
6157461614 if (installedXcodeVersions.length === 0 || !xcodeVersionString.includes('latest')) {
6157561615 if (installedXcodeVersions.length === 0 || !installedXcodeVersions.includes(xcodeVersionString)) {
61576- core.info(`Downloading missing Xcode version ${xcodeVersionString}...`);
61577- const installExitCode = await exec.exec('xcodes', ['install', xcodeVersionString, '--select']);
61578- if (installExitCode !== 0) {
61579- throw new Error(`Failed to install Xcode version ${xcodeVersionString}!`);
61580- }
61616+ throw new Error(`Xcode version ${xcodeVersionString} is not installed! You will need to install this is a step before this one.`);
6158161617 }
6158261618 else {
6158361619 core.info(`Selecting installed Xcode version ${xcodeVersionString}...`);
0 commit comments