I am trying to establish a interface to handle the back-compatibility in cordova existing as well as custom plugins. I have a few custom plugins, but as the new requirements and new devices are released in market, I need to tweak them. The native side and the non-native side talk to each other on this interface. I am looking for a way to be able to provide easy coding and switching between versions. For eg: If my non-native side is executing version 1 (sending string as a parameter to function call), but my native side (version 2) excepts a number , the app not work. So I am looking for a way to implement versioning such that I can pass in the version and will be able to accept a string even if my native side is on version 2, and vice a versa (if non-native side is at higher version, then it should auto detect the version of native api and send in the correct (datatype) parameter/default value).
Aucun commentaire:
Enregistrer un commentaire