Accurately detecting the NH3 gas is an important task in different fields. For this demand, high-purity of semiconducting single-walled carbon nanotubes (sc-SWCNTs) are ideal for gas sensing, but the cost of their preparation could limit the application of this material. In this paper, a copolymer of poly [9, 9-dioctylfluorene-N, N′ - (1, 4-phenyl dimethyl) bis (4-iodoaniline)] (FO-N-PA) was reported, which was used to separate and non-covalently functionalize the sc-SWCNTs by simple ultrasonication and centrifugation with over 99 % purity. Then, the sorted FO-N-PA@SWCNTs were used as a sensing material for the detection of ammonia vapors at room temperature. Eventually, the FO-N-PA@SWCNTs complex-based sensor demonstrates high sensitivity, fast response, and high selectivity for low concentrations of ammonia vapors in the natural air. The response of the FO-N-PA@SWCNTs complex-based sensor is improved by 14 times than that of the raw SWCNTs-based sensor. In particular, the FO-N-PA@SWCNTs complex-based sensor showed response values of 21.3 % and 73.3 % for 1 ppm and 35 ppm ammonia vapors, respectively. The limit of detection (LOD) of the FO-N-PA@SWCNTs complex-based sensor was calculated to be 75.78 ppb. The test results showed that sensors have high sensitivity at both low and high ammonia concentrations.