-
Notifications
You must be signed in to change notification settings - Fork 534
Adding <universal-links> block in config.xml breaks "cordova platform add ios" #54
Comments
I assume, that if you first add platform, and only then plugin - it will be fine? Saw a similar problem when you "add plugin -> add platform", but since usually it's another way around - didn't fix it, since there were more critical stuff... |
Yes that does work. The problem is I'm using a script to build multiple apps using different bundle ids from the same cordova project, so in order to make sure the build is not encountering any overlap I remove and re-add the platforms. For now, I've modified the script to remove the plugin and then re-install it once the platforms have been added back. I realize that mine is probably a fringe use-case but thank you for accepting it as a bug! |
This identical error also occurs using this plugin within Visual Studio Tools for Apache Cordova.
Any thoughts? Should I play around with the order the platforms/plugins are listed within the config.xml file? |
@LukeHartcher Can you add platform and plugin manually via console instead of doing so in Visual Studio?
Don't know, how VS works with Cordova, so can't say that this will help. Maybe there is some info on that in their documentation... |
Thanks @nikDemyankov I will have a look. Unfortunately at this time I do not know exactly how VS performs the build process so will see what I can track down. I have also never built a Cordova project manually outside of VS but that sounds like a potential solution also. From what you say, I need to (1) add iOS Platform, and once that is complete (2) add plugin? Within VS you have one config.xml file that contains all the platforms/plugins and you build in one step - you simply select the target platform and press the build button. There is no multi-step process, just kick it off. There is some basic output but nothing detailed, will see if I can increase the output level. I will start doing some reading! |
Yes, correct. About VS: I don't how it helps with Cordova development, but I'm sure you can construct mobile project without it with the few commands in console.
I think after that you can open the resulting project in VC and it should work fine. Probably VC does the same thing under the hood. |
Thanks. Earlier today I manually created a project using Cordova CLI on Mac OS X and successfully got the cordova-universal-links-plugin working and compiling in Xcode via the generated .xcodeproj file and the web links opening my app. Visual Studio 2015 uses a TACO RemoteBuild service that is installed on a Mac and it listens for Build requests from VS, it does the build, then copies .ipa back to VS project folder on Windows. Its pretty cool as you can do all platform build on Windows. The issue is that you dont have any control over the build order and hence cant force the "add platform" before the "add plugin" as you suggest. I posted on the TACO github page about configuring the Build Order but it is not possible, the only suggestion is to do incremental builds in VS by doing an initial build prior to adding the plugin. But that is a pain to manage all the time. A final question @nikDemyankov - I do not fully understand the Cordova CLI build order either. Once I get the config.xml file setup and working correctly will the app/plugin then build correctly every time i.e platform before plugin? i.e. what does "add platform" and "add plugin" actually do that impacts the build order? Thanks in advance. |
Why there is an ordering problem with this plugin. To be honest, I'm not sure why you get
Usually it's another error, like When you first By the way, if
As a result, it should install UL plugin only after iOS platform is added to the project. And, of course, you need to remove UL plugin from dependencies in project's |
Great post, thanks for all the info. FYI - I did get node missing module errors (on Mac only) but installed them manually (via sudo npm install -g) and once all were resolved the CLI add plugin worked. Additionally, when I initially used TACO RemoteBuild the CordovaLib/VERSION file did not physically exist under the platforms folder and hence not found and the error was displayed. Not knowing enough about how/when the CordovaLib gets copied over I was not really sure how to resolve via VS. Another thing to note is that VS uses plugman to add the plugins, so not sure if that changes anything. Regarding the Cordova hooks, can I still leave the block in config.xml and it will get picked up once the plugin is added by the hook? Or would the hook need to inject these also? Overall I have found the plugin to be great! Building the web_hooks makes things so much easier and the hardest part is just the iOS/Apple side of things (which I always find more time consuming then Android). Thanks once again, cheers. |
You can leave it in |
FYI @nikDemyankov the TACO Build process is here: |
Released v1.2.1. Hope it works now. If not - will reopen the issue. |
Still getting the error with v1.2.1:
EDIT: I have to follow these steps if I want to rebuild the project:
I also get errors like this...
If I don't follow that order... |
Super weird... Reopening then. The bad thing is that I can't reproduce it myself :( |
Should I have npm xcode module installed ? |
Plugin uses only: "dependencies": {
"mkpath": ">=1.0.0",
"xml2js": ">=0.4",
"rimraf": ">=2.4",
"node-version-compare": ">=1.0.1",
"plist": ">=1.2.0"
} And it should install them automatically when you install plugin. So, if you see You can try to run in this folder: That might help. |
@nikDemyankov @mikegleasonjr I'm getting the same error as well. However, the same configuration One observation, my local machine has XCode 8 while the remote machine has XCode 7 |
@adityasaxena the simplest solution would be to go to |
@adityasaxena I have the same issue. Remote machine builds fail with xcode v7.2.1. Works with local machine with xcode 8. Were you able to fix this issue? |
@ramaguduri-bursys yes, I managed to resolve it. |
@nikDemyankov at the end of it, i put these modules as dependencies in my package.json |
@adityasaxena I am not able to get to even add ios platform using cordova cli when I have the plugins already added. If I remove the plugin, add platform and then add plugin it works fine. But if I try to add platform when the plugin is already added it fails with this error
Thanks for your help! |
for now I am going to remove plugin and add this plugin once the platform is added. |
👋 Hi! Thank you for your interest in this repo. 😢 We are not using nordnet/cordova-universal-links-plugin anymore, and we lack the manpower and the experience needed to maintain it. We are aware of the inconveniece that this may cause you. Feel free to use it as is, or create your own fork. 🔒 This will now be closed & locked. ℹ️ Please see #160 for more information. |
I've poured over the documents and couldn't find anything addressing this issue. I added a universal links block to my config.xml that looks like
And as a result I get the error
when trying to run 'cordova platform add ios'. In fact, it's as if CordovaLib isn't even being created, there's no directory at the time of the of crash.
I'm able to add the platform just fine when I remove that block from my config.xml, all I get is the expected error of " tag is not set in the config.xml. Universal Links plugin is not going to work." Any ideas on what could be causing this?
The text was updated successfully, but these errors were encountered: