cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Austin France (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CB-13383) resource-file in config.xml add resource to ios project each time build is run causing failures
Date Tue, 03 Oct 2017 16:23:00 GMT

     [ https://issues.apache.org/jira/browse/CB-13383?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Austin France updated CB-13383:
-------------------------------
    Description: 
In config.xml I have

{code:xml}
<resource-file src="GoogleService-Info.plist" />
{code}
And GoogleService-Info.plist exists in the same directory as config.xml

Running cordova build ios will then add GoogleService-Info.plist to the project, both copying
the file to platforms/ios/<AppName>/Resources and adding it to xcodeproj

The trouble is, it does this EVERY time cordova build ios is run.  This means we end up with
the resource duplicated in the project file.  This then, intermittently (about 50% of the
time) causes cordova build ios to fail with errors like

error: failed to remove /Users/adf/Library/Developer/Xcode/DerivedData/RMCv2dev-azdfkixnsmcojlhkzhmfjdrtncns/Build/Intermediates.noindex/ArchiveIntermediates/RMCv2dev/InstallationBuildProductsLocation/Applications/RMCv2dev.app/GoogleService-Info.plist:
“GoogleService-Info.plist” couldn’t be removed.

I am guessing the multiple CopyPListFile(s) cause Xcode to trip over itself.

If I manually remove the duplicates, the project will build.  But obviously that's not the
solution.

I confirmed this behaviour by doing

{code}
$ grep GoogleService-Info platform/ios/*/*.xcodeproj/*
$ cordova build ios
$ grep GoogleService-Info platform/ios/*/*.xcodeproj/*
{code}

Output from first grep:

		BA868EDCEA5F4849860C3466 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile;
fileRef = FACACB566C33400482A88432 /* GoogleService-Info.plist */; };
		FACACB566C33400482A88432 /* GoogleService-Info.plist */ = {isa = PBXFileReference; name
= "GoogleService-Info.plist"; path = "GoogleService-Info.plist"; sourceTree = "<group>";
fileEncoding = 4; lastKnownFileType = text.plist.xml; explicitFileType = undefined; includeInIndex
= 0; };
				FACACB566C33400482A88432 /* GoogleService-Info.plist */,
				BA868EDCEA5F4849860C3466 /* GoogleService-Info.plist in Resources */,

Output from second grep:

		BA868EDCEA5F4849860C3466 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile;
fileRef = FACACB566C33400482A88432 /* GoogleService-Info.plist */; };
		CBE3E71F15FA43BBACC4F1CB /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile;
fileRef = 50343613D6BC4DF19028EDA1 /* GoogleService-Info.plist */; };
		FACACB566C33400482A88432 /* GoogleService-Info.plist */ = {isa = PBXFileReference; name
= "GoogleService-Info.plist"; path = "GoogleService-Info.plist"; sourceTree = "<group>";
fileEncoding = 4; lastKnownFileType = text.plist.xml; explicitFileType = undefined; includeInIndex
= 0; };
		50343613D6BC4DF19028EDA1 /* GoogleService-Info.plist */ = {isa = PBXFileReference; name
= "GoogleService-Info.plist"; path = "GoogleService-Info.plist"; sourceTree = "<group>";
fileEncoding = 4; lastKnownFileType = text.plist.xml; explicitFileType = undefined; includeInIndex
= 0; };
				FACACB566C33400482A88432 /* GoogleService-Info.plist */,
				50343613D6BC4DF19028EDA1 /* GoogleService-Info.plist */,
				BA868EDCEA5F4849860C3466 /* GoogleService-Info.plist in Resources */,
				CBE3E71F15FA43BBACC4F1CB /* GoogleService-Info.plist in Resources */,

Originally asked question here, before I determined this would appear to be a bug.

https://stackoverflow.com/questions/46548213/cordova-ios-triplicating-plist-resource

  was:
In config.xml I have

  <resource-file src="GoogleService-Info.plist" />

And GoogleService-Info.plist exists in the same directory as config.xml

Running cordova build ios will then add GoogleService-Info.plist to the project, both copying
the file to platforms/ios/<AppName>/Resources and adding it to xcodeproj

The trouble is, it does this EVERY time cordova build ios is run.  This means we end up with
the resource duplicated in the project file.  This then, intermittently (about 50% of the
time) causes cordova build ios to fail with errors like

error: failed to remove /Users/adf/Library/Developer/Xcode/DerivedData/RMCv2dev-azdfkixnsmcojlhkzhmfjdrtncns/Build/Intermediates.noindex/ArchiveIntermediates/RMCv2dev/InstallationBuildProductsLocation/Applications/RMCv2dev.app/GoogleService-Info.plist:
“GoogleService-Info.plist” couldn’t be removed.

I am guessing the multiple CopyPListFile(s) cause Xcode to trip over itself.

If I manually remove the duplicates, the project will build.  But obviously that's not the
solution.

I confirmed this behaviour by doing

{code:bash}
$ grep GoogleService-Info platform/ios/*/*.xcodeproj/*
$ cordova build ios
$ grep GoogleService-Info platform/ios/*/*.xcodeproj/*
{code}

Output from first grep:

		BA868EDCEA5F4849860C3466 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile;
fileRef = FACACB566C33400482A88432 /* GoogleService-Info.plist */; };
		FACACB566C33400482A88432 /* GoogleService-Info.plist */ = {isa = PBXFileReference; name
= "GoogleService-Info.plist"; path = "GoogleService-Info.plist"; sourceTree = "<group>";
fileEncoding = 4; lastKnownFileType = text.plist.xml; explicitFileType = undefined; includeInIndex
= 0; };
				FACACB566C33400482A88432 /* GoogleService-Info.plist */,
				BA868EDCEA5F4849860C3466 /* GoogleService-Info.plist in Resources */,

Output from second grep:

		BA868EDCEA5F4849860C3466 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile;
fileRef = FACACB566C33400482A88432 /* GoogleService-Info.plist */; };
		CBE3E71F15FA43BBACC4F1CB /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile;
fileRef = 50343613D6BC4DF19028EDA1 /* GoogleService-Info.plist */; };
		FACACB566C33400482A88432 /* GoogleService-Info.plist */ = {isa = PBXFileReference; name
= "GoogleService-Info.plist"; path = "GoogleService-Info.plist"; sourceTree = "<group>";
fileEncoding = 4; lastKnownFileType = text.plist.xml; explicitFileType = undefined; includeInIndex
= 0; };
		50343613D6BC4DF19028EDA1 /* GoogleService-Info.plist */ = {isa = PBXFileReference; name
= "GoogleService-Info.plist"; path = "GoogleService-Info.plist"; sourceTree = "<group>";
fileEncoding = 4; lastKnownFileType = text.plist.xml; explicitFileType = undefined; includeInIndex
= 0; };
				FACACB566C33400482A88432 /* GoogleService-Info.plist */,
				50343613D6BC4DF19028EDA1 /* GoogleService-Info.plist */,
				BA868EDCEA5F4849860C3466 /* GoogleService-Info.plist in Resources */,
				CBE3E71F15FA43BBACC4F1CB /* GoogleService-Info.plist in Resources */,

Originally asked question here, before I determined this would appear to be a bug.

https://stackoverflow.com/questions/46548213/cordova-ios-triplicating-plist-resource


> resource-file in config.xml add resource to ios project each time build is run causing
failures
> -----------------------------------------------------------------------------------------------
>
>                 Key: CB-13383
>                 URL: https://issues.apache.org/jira/browse/CB-13383
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-ios
>    Affects Versions: 7.0.1
>         Environment: macOS Sierra
>            Reporter: Austin France
>            Assignee: Shazron Abdullah
>            Priority: Blocker
>              Labels: build
>
> In config.xml I have
> {code:xml}
> <resource-file src="GoogleService-Info.plist" />
> {code}
> And GoogleService-Info.plist exists in the same directory as config.xml
> Running cordova build ios will then add GoogleService-Info.plist to the project, both
copying the file to platforms/ios/<AppName>/Resources and adding it to xcodeproj
> The trouble is, it does this EVERY time cordova build ios is run.  This means we end
up with the resource duplicated in the project file.  This then, intermittently (about 50%
of the time) causes cordova build ios to fail with errors like
> error: failed to remove /Users/adf/Library/Developer/Xcode/DerivedData/RMCv2dev-azdfkixnsmcojlhkzhmfjdrtncns/Build/Intermediates.noindex/ArchiveIntermediates/RMCv2dev/InstallationBuildProductsLocation/Applications/RMCv2dev.app/GoogleService-Info.plist:
“GoogleService-Info.plist” couldn’t be removed.
> I am guessing the multiple CopyPListFile(s) cause Xcode to trip over itself.
> If I manually remove the duplicates, the project will build.  But obviously that's not
the solution.
> I confirmed this behaviour by doing
> {code}
> $ grep GoogleService-Info platform/ios/*/*.xcodeproj/*
> $ cordova build ios
> $ grep GoogleService-Info platform/ios/*/*.xcodeproj/*
> {code}
> Output from first grep:
> 		BA868EDCEA5F4849860C3466 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile;
fileRef = FACACB566C33400482A88432 /* GoogleService-Info.plist */; };
> 		FACACB566C33400482A88432 /* GoogleService-Info.plist */ = {isa = PBXFileReference;
name = "GoogleService-Info.plist"; path = "GoogleService-Info.plist"; sourceTree = "<group>";
fileEncoding = 4; lastKnownFileType = text.plist.xml; explicitFileType = undefined; includeInIndex
= 0; };
> 				FACACB566C33400482A88432 /* GoogleService-Info.plist */,
> 				BA868EDCEA5F4849860C3466 /* GoogleService-Info.plist in Resources */,
> Output from second grep:
> 		BA868EDCEA5F4849860C3466 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile;
fileRef = FACACB566C33400482A88432 /* GoogleService-Info.plist */; };
> 		CBE3E71F15FA43BBACC4F1CB /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile;
fileRef = 50343613D6BC4DF19028EDA1 /* GoogleService-Info.plist */; };
> 		FACACB566C33400482A88432 /* GoogleService-Info.plist */ = {isa = PBXFileReference;
name = "GoogleService-Info.plist"; path = "GoogleService-Info.plist"; sourceTree = "<group>";
fileEncoding = 4; lastKnownFileType = text.plist.xml; explicitFileType = undefined; includeInIndex
= 0; };
> 		50343613D6BC4DF19028EDA1 /* GoogleService-Info.plist */ = {isa = PBXFileReference;
name = "GoogleService-Info.plist"; path = "GoogleService-Info.plist"; sourceTree = "<group>";
fileEncoding = 4; lastKnownFileType = text.plist.xml; explicitFileType = undefined; includeInIndex
= 0; };
> 				FACACB566C33400482A88432 /* GoogleService-Info.plist */,
> 				50343613D6BC4DF19028EDA1 /* GoogleService-Info.plist */,
> 				BA868EDCEA5F4849860C3466 /* GoogleService-Info.plist in Resources */,
> 				CBE3E71F15FA43BBACC4F1CB /* GoogleService-Info.plist in Resources */,
> Originally asked question here, before I determined this would appear to be a bug.
> https://stackoverflow.com/questions/46548213/cordova-ios-triplicating-plist-resource



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message