You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Austin France (JIRA)" <ji...@apache.org> on 2017/10/03 16:18:00 UTC
[jira] [Created] (CB-13383) resource-file in config.xml add
resource to ios project each time build is run causing failures
Austin France created CB-13383:
----------------------------------
Summary: 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
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
$ grep GoogleService-Info platform/ios/*/*.xcodeproj/*
$ cordova build ios
$ grep GoogleService-Info platform/ios/*/*.xcodeproj/*
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