Short answer: at least five years, unless you can show that the app is expected to be in use for less. You decide the period yourself, per version, write down how you decided, and tell users the end date.
Article 13(8) sets a floor of five years. If an app is expected to be in use for less than five years, the support period corresponds to that expected use time.
During the support period you must handle vulnerabilities effectively and make security updates available free of charge (Annex I, Part II points (2) and (8)).
Three different clocks run: the support period, the 10 years a security update must stay available (Article 13(9)), and the 10 years the technical documentation must be kept (Article 13(13)).…