Comments (6)
@knight9999 damn... after 2 days of hunting the specific issue here is the bug in all its glory. Ran into this as well, actually ran through the entire alphabet to realize that any letter after 'P' was a problem and was totally stumped why that would be the case but I did realize that it had something to do with CocoaPods.
Ok so now that knight has done all the hard work of figuring out why it happens here's the solution:
diff --git a/node_modules/cordova-common/src/ConfigChanges/ConfigFile.js b/node_modules/cordova-common/src/ConfigChanges/ConfigFile.js
index be8f78e..20340fe 100644
--- a/node_modules/cordova-common/src/ConfigChanges/ConfigFile.js
+++ b/node_modules/cordova-common/src/ConfigChanges/ConfigFile.js
@@ -175,7 +175,7 @@ function resolveConfigFilePath (project_dir, platform, file) {
// [CB-5989] multiple Info.plist files may exist. default to $PROJECT_NAME-Info.plist
if (matches.length > 1 && file.includes('-Info.plist')) {
- var plistName = getIOSProjectname(project_dir) + '-Info.plist';
+ var plistName = '/' + getIOSProjectname(project_dir) + '-Info.plist';
for (var i = 0; i < matches.length; i++) {
if (matches[i].includes(plistName)) {
filepath = matches[i];
Just throw that change into patch-package and you are golden (make sure to get your local project node-modules AND the global npm node-modules). This change ensures that the only matching filename MUST begin with the forward slash (which excludes any Pods path) without accidentally excluding app names that might start with the word "Pods".
I'd open a PR for this but... I've actually spent 5 days hunting this down (it started when I realized none of the plugins had any of their variables). Time to catch up on lost time.
from cordova-common.
One thing worth noting is that in newly-created Xcode projects, the plist filename is just Info.plist
without the app name prefix. Unfortunately we can't rename ours to match without breaking every plugin.xml or config.xml that tries to edit it 😕
from cordova-common.
@codinronan, @knight9999 thx for yours effort. 🥇
from cordova-common.
Thanks @dpogue .
You are right. I have just confirmed it by creating a new project by Xcode 10.3 with using a default ios Single View App
template. The created file name is Info.plist
.
If we can't rename ours [App Name]-Info.plist
filename in cordova-ios,
I think we'd better update the logic to find *-Info.plist
in ConfigFile.js
.
from cordova-common.
I have a same problem. Is there a solution without changing the name of the application?
from cordova-common.
@codinronan Thanks for the great work. Please open your PR!
from cordova-common.
Related Issues (20)
- Config changes not properly applied if paths differ but resolve to same file HOT 5
- Fix license spec of transitive xmldom dependency HOT 2
- config-file is merged into wrong *-Info.plist when other plugin has podspec. HOT 5
- Error: Cannot find module '@netflix/nerror' HOT 4
- Unable to graft xml at selector "manifest/uses-sdk" HOT 6
- Not possible to disable backup, because of config conflicts are handled HOT 1
- Problem with edit-config attribute in plugin.xml HOT 12
- config-file conflicts between plugins and config.xml
- doc.find is not a function HOT 7
- Security Vulnerability in underscore <= 1.12.0 CVE-2021-23358 HOT 2
- getPreference broken in #133 HOT 3
- Allow `getPodSpecs` to support the new "plugin" config element
- PluginInfo getPreferences is designed in a way that prevents safely adding new attributes HOT 2
- Mark plugin-/engine-Tags as deprecated
- Failed to install '<plugin>': TypeError: Cannot read properties of undefined (reading 'id') HOT 7
- CordovaError test fails
- cordova prepare misses updated files with same size and older timestamp HOT 6
- Modify *.jsproj files with "config-file" element HOT 3
- FileUpdater fails to copy symlinked files HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-common.