-
Notifications
You must be signed in to change notification settings - Fork 984
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
[MAJOR] Do not overwrite all targets with same id (minimal) #708
Conversation
…th the old behavior it were not possible to add apple watch targets and build it because cordova bricked the bundleids for these targets. * Add new build parameter multipleProvisioningProfiles. Here the usage within the build.json: "multipleProvisioningProfiles": [ { "key": "de.demo.html5", "value": "DemoME-Enterprise" }, { "key": "de.demo.html5.watchkitapp", "value": "DemoWE-Enterprise" }, { "key": "de.demo.html5.watchkitapp.watchkitextension", "value": "DemoWE Extension-Enterprise" } ], This one is needed too otherwise the signing step fails because cordova generates a wrong bundleid to prov.profile mapping. With these settings the exportOptions.plist is written correctly for multiple targets. This patch is needed to make the apple watch targets work with the cordova-ios workflow (apple watch targets added within a post process scripts using npm xcode)
# Conflicts: # bin/templates/scripts/cordova/lib/prepare.js
Extension should work on iPads
I changed the the original PR that way that only the bundle id gets checked for the target. Other settings should be applied to other targets, too. For my type of extensions this necessary. @msari-ipe-ext-1 Does this work for watch extensions? |
Would be great to get this and this apache/cordova-node-xcode#79 fixed for the next release. How can I help to get this ready? |
Hi @NiklasMerz I may need some extra time to understand the history of issue #538, previous attempts such as #545, this proposal, and apache/cordova-node-xcode#79, before I am ready to answer your question. I would also like to point to the sustainability issue I raised in apache/cordova#163. Thanks for your understanding and thanks for your recent contributions! |
I added [MAJOR] to the title and set the milestone to the next major release (6.0.0), due to the risk of this change breaking something else. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I think test cases are needed to help ensure this functionality does not get broken in the future.
- I think this change should be done in a major release due to the risk of breaking something, as I said in another comment.
- I find the added code pretty hard to understand, wonder if there is anything we can do to make it easier to understand.
- Use of the displayName variable name does not make sense to me. Please explain it and please consider changing it.
Please feel free to follow up on GitHub, mailing list, or Slack (see footer of cordova.io for contact information). As I said before and in apache/cordova#163, committers are overloaded due to resource issues.
Thanks @brodybits for your review. Good points. I am aware of the current maintainer situation. I will do my best to clear this code up and explain the open questions as soon as I find time at work with my dev environment on hand. Tests are a good idea since this should be a fix for a regression as described in #583. To put that confusing discussion into short words: Cordova previously did not touch additional targets in Xcode projects (like Watch extension, call directroy extension ..). With Cordova 5 that changed and thos additinal targets get the name of the host app for example. This is undesirable for certain complex apps with additional targets. This PR tries to bring back the old behavior basically. I think the whole replacing placeholder stuff in Xcode projects changed in Cordova 5. That's why apache/cordova-node-xcode#79 is needed to fix the As said before I am going to work on the code and I am open to discussions. We are using to extensions to our Cordova app and this is really important. A new release with this fix is not urgent because using forks works is fine for a while but I don't want to maintain these forks forever. |
I updated the I can agree the @wolfmanfx What do you think of this PR? Do you have ideas how to improve this method? |
Thanks @NiklasMerz for the recent fix, looks nice. And thanks for your help and understanding of our maintainer situation. I completely understand that you are basically adapting a bug fix from someone else, with the obvious challenges of taking over code with missing test cases. I would like to continue the discussion in #538 which I have just pinned in order to get a better understanding of the whole situation of this functionality. |
Yes the missing test cases part is crucial. That kind of app is not considered in the tests and I am having a hard time thinking of adding it right now. But I must admit that using extensions with Cordova might not be a often used features except for plugins like open with . |
Codecov Report
@@ Coverage Diff @@
## master #708 +/- ##
=========================================
+ Coverage 74.42% 74.63% +0.2%
=========================================
Files 11 11
Lines 1830 1853 +23
=========================================
+ Hits 1362 1383 +21
- Misses 468 470 +2
Continue to review full report at Codecov.
|
I've restarted the timed out Travis test, CI is now green |
Co-Authored-By: エリス <erisu@users.noreply.github.com>
Co-Authored-By: エリス <erisu@users.noreply.github.com>
Co-Authored-By: エリス <erisu@users.noreply.github.com>
Used a throw to fall back to default. Changed a for loop to use for-of See: #1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 JS stuff LGTM
Combined patch from apache#708 from @msari-ipe-ext-1 with refactorings Co-authored-by: Murat Sari <murat.sari@coderabbit.at>
This code somehow works for my project, but is not correct. We need to find a better solution possibly involving a change in cordova-node-xcode. I would love to contribute this but I think it is beyon my capabilities and understandings of Cordova. I tried to work on this a few times but I head always explodes. I appreciate if someone with more experience has the capacity to work on this and I will do my best to support that. |
Platforms affected
iOS
Motivation and Context
This is a simplified version of #545 with the minimal changes to fix #538
Description
See discussion in #545
Testing
Manual tests with complex project
Checklist
(platform)
if this change only applies to one platform (e.g.(android)
)