For competitive swimmers, note FINA doping control rules (based on the World Anti-Doping Agency regulations). Most asthma medications are on the Prohibited List including inhaled steroids and inhaled Beta2 agonists.
Therefore, elite athletes with asthma must apply for special permission to use these medications, known as the “Therapeutic Use Exemption” (TUE) program. If competing at FINA events, then you apply directly to the FINA Doping Control Review Board to have their applications considered. Lower level athletes should apply to their national anti-doping body.