How to implement a Feature Flag in Swift!

Поделиться
HTML-код
  • Опубликовано: 13 окт 2024
  • #iOS #swift #softwaredeveloper #iosdeveloper
    Thank you for watching this video 🙌
    ➜ Twitter: / v_pradeilles
    ➜ GitHub: github.com/vin...
    ➜ LinkedIn: / vincentpradeilles

Комментарии • 8

  • @v_pradeilles
    @v_pradeilles  2 года назад +2

    Did you find this explanation useful? Are you planning on using Feature Flags in your apps? Let me know in the comments 🚀

  • @marvinmeinhard4711
    @marvinmeinhard4711 Год назад

    Very nice, thanks for the explanation. I am going to use this procedure with an enum to implement a paywall over several different cases!

  • @RajaSekar1094
    @RajaSekar1094 2 года назад

    Hey Hi. First of all thank you so much for posting unique and interesting things. I have a quick question about the feature flag. Let's say I have class which has logics for a feature and I wanted it expose to only one target then how can we handle the feature flag. Example I have two apps sharing same code base where one needed Google maps and other doesn't. I know we can achieve it to #if Debug or Any User defined flags as you pointed it out in the video but is there any other better way to do it.

  • @omidrostami2208
    @omidrostami2208 2 года назад

    I think in the last part you made a mistake, you should use static instead of var, because you are working with Value type.

    • @v_pradeilles
      @v_pradeilles  2 года назад +1

      That's a good remark! The reason why I made it a var is because I wanted to be able to either inject a different configuration (for a test) or update it dynamically (either in a debug screen or by using a service like Firebase Remote Config). However, if you don't need any of these extra features, then a static could indeed do the job 👍

  • @roman3249
    @roman3249 2 года назад

    Why just don't make static let isDetailViewEnabled static var? (by the way, FeatureFlags should be enum, not struct)

    • @v_pradeilles
      @v_pradeilles  2 года назад +1

      That's a good remark! The reason why I made it a var is because I wanted to be able to either inject a different configuration (for a test) or update it dynamically (either in a debug screen or by using a service like Firebase Remote Config). However, if you don't need any of these extra features, then a static could indeed do the job 👍