Reputation: 736
First of all, I am developing a Cordova app for Android and iOS, primarily.
I was using the deprecated version of the Phone gap push plugin:
https://github.com/phonegap-build/PushPlugin
Now I am using the new version:
https://github.com/phonegap/phonegap-plugin-push
And all my code is also using the new push plugin; I seem to not be able to get rid of the old push plugin completely and it sucks :(
It is beyond me how the old push plugin has a version number of 2.5 whereas the new push plugin has a version number of 1.5 or 1.6.. But moving on.
I am running the app on Android, and everything is ok. The app is running and working as supposed to. I am also successfully receiving notifications.
On iOS, also, everything was working as supposed to till give or take a month ago; but today when trying to deploy on an iOS device using Taco remote build from a windows pc (visual studio) to an apple macbook pro, I began facing many problems.
I then noticed that in the config.xml of the application (the one in the root of the project) there were both the old and the new push plugin. I mistakenly deleted the new one (because of the misleading version numbers; I thought it was in fact the old one). It seemed to run properly for a bit (on both Android and iOS) but after a while, I noticed that in reality the app was not going to work properly as it needed the new push plugin and it was not being found. So I deleted the old push plugin and installed the new push plugin (which happened to be also a more updated version of the new push plugin that I previously had).
Presently, my problem is that when running via taco remote build, the app manages to successfully deploy on an iOS device (iPhone 6) - so yes the remote build seems to be happening correctly!, however the app seems to not be recognising/locating/finding the new push plugin when running. I am suspecting that the new push plugin is not being transferred from visual studio on my windows pc into my apple macbook pro through the taco remote build.
In this directory: /Users/Jurgen/.taco_home/ I can see the build, with all the generated files. In the outermost plugins folder I can see the phonegap-plugin-push folder referring to the new push plugin:
/Users/Jurgen/.taco_home/remote-builds/taco-remote/builds/16880/cordovaApp/plugins/phonegap-plugin-push
Going further into the directory, into the platforms folder/ios/www/plugins etc, there is no phonegap-plugin-push:
/Users/Jurgen/.taco_home/remote-builds/taco-remote/builds/16880/cordovaApp/platforms/ios/www/plugins/-----
I think this might be the cause of the problem: though I am not 100% sure. I thought that the iOS build most probably uses the plugins folder from the www folder inside the iOS folder and not the outermost (in the first directory shown above): And since the push plugin was nowhere to be seen inside there; that could have been the problem, even more so when bearing in mind that the .xcodeproject file resides in the same 'ios' folder.
So what I did was manually copy the push plugin folder into the innermost directory; which didn't work either. Even if it did, it does not really make sense and is highly inconvenient.
What can I do to ensure that the plugin is transferred into the iOS build with taco remote build? Could the problem be something else rather than what I suspect?
I am completely stuck; so any help would be greatly appreciated!
Upvotes: 0
Views: 316
Reputation: 161
It sounds like the remote project is confused. Try this to see if it helps:
On your non-mac machine, ensure that only the correct plugin is referenced. This includes both config.xml and in the plugins folder. Consider removing the plugin entirely, then re-adding the correct version. If other plugins specify a dependency on the push plugin in their plugin.xml then that may also cause problems, especially if the biggest version number is not the latest version. You may need to remove those plugins too.
Once that is done, perform a clean build. Via taco-cli
this would be taco build ios --clean
, with whatever other device etc flags you want. Using Visual Studio you would go to build -> clean
i believe.
This should copy your project in its entirety again, and avoid issues with conflicting plugin versions partially persisting.
Upvotes: 0