lundi 6 juillet 2020

How to deal with dynamic feature list for dependent SDK?

How to deal with dynamic feature list for dependent SDK?

While working in an iOS/Swift application, an SDK A exposed supported feature list API which provides collection of supported feature names (string array) to dependent 3rd party application B. Now inside application B, developers require to use the supported features while writing code which has a potentiality of typo issue (developer cannot get to know the array value in compile time, only from SDK documentation though). SDK A cannot provide any enum API because they dynamically populate the supported feature list.

In such situation, what are the better approach to avoid this kind of dependency issue? Application B team want something similar to enum so that there will not be any potentiality of typo bug. On the other hand SDK A cannot provide it as enum because the list is created dynamically.

Aucun commentaire:

Enregistrer un commentaire