## 2 Results and Discussion  
### Synthesis of Ionic Liquid Monomers and Poly(Ionic Liquids)  
Quaternary ammonium monomers with varying alkyl chain lengths were synthesized through the quaternization of the commercially available diallylmethylamine (DAM) compound (Figure 1a). The quaternary ammonium monomers were obtained with high purity, with yields higher than 90%in all cases. \({}^{1}\)H-NMR spectra confirmed the successful attachment of the alkyl groups that displayed methyl -CH\({}_{3}\) resonances around 0.7 ppm, 0.9, and 1.3 ppm for [DAMC\({}_{14}\)], [DAMC\({}_{8}\)] (Figure S1), and [DAMC\({}_{2}\)] cations, respectively. The adjacent methylene -CH\({}_{2}\)- resonances were observed between 1.01-1.37 ppm, 1.20-1.40 ppm, and 2.85-2.95 ppm for [DAMC\({}_{14}\)], [DAMC\({}_{8}\)] and [DAMC\({}_{2}\)] cations, respectively. Due to the specific requirements of the SPME process, specifically the high temperature of the injector (200-280 \({}^{\circ}\)C) and the thermal stability of the materials used in the fiber preparation is of great importance. It is well known that, due to their high basicities, halide anions decrease the thermal stability of ionic materials through elimination mechanisms resulting in the formation of unsaturated groups and free amines [26]. Therefore, in order to improve the thermal stability of the IL-based materials, bulky fluorinated anions were used [12; 27]. Thus, anion exchange metathesis reactions were performed over the synthesized quaternary ammonium monomers to replace the halide anion with bis(trifluoromenthanesulfonyl)imide ([TFSI]\({}^{-}\)) (Figure 1b). In all three cases, the resulting monomers were viscous liquids at room temperature, which allowed us to perform facile photopolymerization reactions without the use of complex synthetic strategies, which require temperature and purification steps. In all of the cases, a desired amount of crosslinker was mixed with the IL monomer to improve the structural integrity of the fiber material. A calculated amount of photoinitiator was added into the mixture prior to exposure to UV light. The reaction steps to obtain the monomers and the ensuing polymers are depicted in Figure 1.  
The time required for complete polymerization of the [DAMC\({}_{n}\)][TFSI] monomers was determined by means of \({}^{1}\)H-NMR, through the disappearance of the resonances attributed to the polymerizable groups. For that purpose, a mixture composed of each one of the monomer of interest and 5% in weight relative to monomer of 2-hydroxy-2-methylpropiophenone as photoinitiator (PI) was prepared and stored at 4 \({}^{\circ}\)C. Each mixture was exposed to UV light for exposure times varying from 10 to 60 s. It was observed that after 60 s of exposure, all of the experiences resulted in high degrees of monomer conversion. 60 s were then used to prepare crosslinked materials by adding DVB to the reaction mixture. In order to quantify any possible unreacted monomer in the crosslinked polymer, a sample of each crosslinked material was left in acetone so that any unreacted monomer was extracted. The insoluble parts were filtered, the acetone was dried, and deuterated solvent was added. The resulting \({}^{1}\)H-NMR spectra did not show any signs of the [DAMC\({}_{n}\)][TFSI] monomers and DVB, meaning that complete polymerization was successfully achieved.  
Despite the presence of two polymerizable groups in each monomer, no crosslinking was observed when exposing only the monomer and photoinitiator to the UV light. The five-side ring closing mechanism [28; 29], is preferred in both free radical polymerization and photopolymerization, and consequently only the pyrrolidinium ring is formed.  
Figure 1: Overall synthetic scheme of pyrrolidinium-based poly(ionic liquids) (Pyrr-PIL) used in this work: (**a**) synthesis of the quaternary ammonium monomers with different alkyl chain lengths; (**b**) anion exchange reaction step to obtain the IL monomers with poly(methyltetradacyl pyrrolinium) (TFSI) anion; and, (**c**) photopolymerization process.