-
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
Cordova overwrites bundleIdentifier for all existing targets #538
Comments
So did I understand correctly that using Can you pinpoint which files are changed to do this (quickly create a temp git project in |
Hi, When I open the project.pbxproj the PRODUCT_BUNDLE_IDENTIFIER for all 3 targets are different and correct when I run Can you point to the code where the updates happen? |
That happens here: cordova-ios/bin/templates/scripts/cordova/lib/prepare.js Lines 301 to 304 in 5e688ca
|
Ok - Looking here https://github.com/apache/cordova-node-xcode/blob/master/lib/pbxProject.js#L1128 I guess that function is not designed for the usecase to update just one target. My vote would to not update the bundle id but if needed it should only update a specific target. Any thoughts? |
We have to update the bundle ID because that's how it gets set in the Info.plist |
The bundle id is set on creation but the overwrite happens on the build stage too - or does the cli can not distinct between initial creation and build step? |
It could also help to disable this behaviour through a flag or so, just thinking loud :) |
Another idea would to create a parameter for the build.json which defines the target project and we overwrite just the settings of the desired project instead of every target? |
So I am open for input as I am going to fork and fix that issuse. |
Probably because a |
Whatever the default behaviour is must not require people to know about Xcode build targets or require manually configuring things in build.json. It needs to just work out of the box for the basic use case of packaging up web content with an auto-generated Xcode project for iOS. |
Thx - I have created a PR which fixes the behavior, no new params added. I am open for feedback also for a better solution thx |
So I have pushed a new PR #545 this time I have added a new parameter to the build.json (optional) which is needed to sign mutliple targets with different budleids. |
@dpogue Did you had time to review the changes - I know there are some styling things needs to be addressed but if its not gonna merged I wont put extra time into it ;) |
Experiencing this myself, after adding a call kit call directory extension to my project. |
As @tombell I also have this problem with the call directory plugin and the share/openwith plugin, too. What can I do the help this getting merged. My tests with the PR were successful. |
I am using my branch in productive with an apple watch extension - everything working 👍 |
@msari-ipe-ext-1 Great to hear! How do I use I always have trouble with setting provioning profiles automatically for the main app and extensions. This breaks in strange ways. |
Hi, In the build.json you can get multiple key value pairs
|
Yes exactly that's what I am asking. What is |
Just to add my perspective on this again shortly. For us this is a critical app because our app uses two plugins that have hooks to add extensions to the Xcode project (calldirectory and share extension). The changes in Cordova 5 mean that the extensions Xcode config gets broken every time the app builds. I agree that @msari-ipe-ext-1 's solution is to broad and confusing with the prov. profile feature that's why my fork tries to solve this with #708 . We are going to set the prov. profiles anyways by hand or via the plugins hooks. This works for us with this fork and cordova-node-xcode forked around these issues (apache/cordova-node-xcode#79). I am open to polish #708 as much as possible to get that in a good state to be merged. |
I have updated the title, pushed the milestone to 6.0.0, and added an update to the description. Thanks again @NiklasMerz for your input and contributions so far. I would like to target the next major release of any components to be updated due to the nature of what is being changed and potential risk of breaking something else. I would like to find a smooth way to move this forward, unfortunately dealing with very limited maintainer resources (see apache/cordova#163) and lack of understanding of this functionality. I am getting ready to sign off, can take another look in the next day or so. It would be extremely helpful if someone could walk me and others through:
|
…in target bundle id (issue apache#538)
In case some of you are stuck until this issue is fixed, as a workaround, you can temporarily force the target value of the bundle identifier of the app extension directly in it's Info.plist, so the build does not use the bad project setting. |
How? |
There is a |
What is the status of this? Anyone? |
I cannot get my head around how to fix this properly but this is definitly an issue and I hacked around it. Cordova iOS 5 definitly causes issues for the tiny percentage of apps that use more than the default target (watch, share, calldirectory extensions). |
Bug Report
When cordova (using 5.0.0) projects contains watch targets (watchkit, watch extension) which have their own bundle id setup correctly, cordova overwrites all targets with the same id.
Problem
Its not possible to pack new targets in the project and use cordova cli build
cordova build --platform ios --device --release
What is expected to happen?
It should not overwrite the PRODUCT_BUNDLE_IDENTIFIER of all targets.
What does actually happen?
Signing does not work anymore.
Updates by @brodybits:
This issue seems to also break functionality of plugins that do extensions to Xcode projects by using hooks. See below for discussions.
The text was updated successfully, but these errors were encountered: