-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
config-file is merged into wrong *-Info.plist when other plugin has podspec. #144
Comments
This should theoretically have been fixed with version It only happens if you use CocoaPods version greater 1.6. When the target is specified as Also see the issue where the bug was originally identified: #88 |
@jamesyoon11 As @EvelinJK mentioned, this should be fixed in |
This is still an issue with If the app I've created a repo to a reproducible test case: https://github.com/dpa99c/cordova-common-issue-144 It contains 2 test plugins - both of which use a First clone the repo:
Now checkout the branch which contains the app name "Podr" (one letter before "Pods" in the alphabet):
Now let's add
And we confirm we're using the expected versions of
We're expecting to see that both our plugins add their entries to the app info plist. So if we search for our first plugin entry:
We should see:
Same for our second plugin:
Now checkout the "Podt" branch (one letter after "Pods" in the alphabet)
Remove and re-add the ios platform:
This time when we search for the first plugin plist entry, the result is unexpected:
We see it's in both the app plist as expected, but also in the Pods plist. And the second plugin:
Is only present in the Pods plist - it's missing from the app plist. To confirm that the
The app name is "Z" on this branch, which of course comes after "Pods" in the alphabet, so we'd expect to see the issue manifest (you can confirm this by checking out the "Z" branch which has the same app name but no commented out Remove and re-add the ios platform:
As before, the first plugin entry is present in both plists:
But the second plugin entry is now also present in both plists:
This issue is affecting a production project of mine, so I'm keen to find a fix (currently my workaround is to manually move the missing keys from the Pods plist to the app plist). |
… are present (apache#144). When multiple plist files exists in a cordova-ios project (e.g. due to a plugin containing `<podspec>`), ConfigFile was updated under CB-5989 to select the app plist as the target for changes destined for *-Info.plist. However, the change made under CB-5989 incorrectly constructed the path to the app plist by omitting the project name subdirectory from the path, causing the fix to fail to work. This commit fixes this by correcting the constructed path to the app plist.
Oops, that was implicit - didn't mean to close without review |
… files are present (apache#144). When multiple plist files exists in a cordova-ios project (e.g. due to a plugin containing `<podspec>`), ConfigFile was updated under CB-5989 to select the app plist as the target for changes destined for *-Info.plist. However, the change made under CB-5989 incorrectly constructed the path to the app plist by omitting the project name subdirectory from the path, causing the fix to fail to work. This commit fixes this by correcting the constructed path to the app plist.
The above PR fixes this issue. To confirm, run the following test (continuing on from my test scenarios above):
This checks out a branch where the app name is still "Podt" but it references my fork of Re-add the platform using my fork:
Now search for the plugin plist strings:
They are now in the expected app plist location. |
… files are present (apache#144). When multiple plist files exists in a cordova-ios project (e.g. due to a plugin containing `<podspec>`), ConfigFile was updated under CB-5989 to select the app plist as the target for changes destined for *-Info.plist. However, the change made under CB-5989 incorrectly constructed the path to the app plist by omitting the project name subdirectory from the path, causing the fix to fail to work. This commit fixes this by correcting the constructed path to the app plist.
fix: resolve correct path to app info plist when multiple plist files are present (#144)
Bug Report
The config-file in plug.xml is merged into wrong *-info.plist when it has installed Pods.
Here is the step to reproduce
cordova-plugin-facebook4 installs cocoaPods Facebook SDK.
cordova-plugin-background-mode has UIBackgroundMode config-file:
It should have merged into SampleApp-Info.plist but it merged into Pods/Target Support Files/Pods-SampleApp/Pods-SampleApp-Info.plist.
However, if the project name is lower than 'Pods' (ex 'MyApp'), the issue does not happen.
The text was updated successfully, but these errors were encountered: