Abstract The simultaneous photopolymerization and covalent immobilization of thin decyl methacrylate (DMA) films onto glass substrates represents a new approach for the fabrication of optical ion sensing devices. Robust and durable optical sensors for small ions are described based on photocrosslinked DMA membrane films doped with appropriate chromoionophores, ionophores, or ion-exchangers. Sensors prepared with the chromoionophore ETH 2412 and the non-specific anion-exchanger TDMAC exhibit a rapid, reproducible and reversible response towards inorganic anions with selectivity following the classical Hofmeister pattern. Sensors prepared with ETH 5350, valinomycin, and a tetraphenylborate derivative respond to potassium with excellent selectivity and reproducibility. Sensor response times of approximately 30 s compare well with similar optical sensors prepared with other membrane matrices, and are not affected by the crosslinker content of the DMA film. The ability to covalently attach the DMA films to silanized glass substrates results in optical sensing devices with substantially increased lifetimes relative to similar devices based on solvent-cast polymeric films.