We introduce a method of geometric quantization for compact $b$-symplectic manifolds in terms of the index of an Atiyah-Patodi-Singer (APS) boundary value problem. We show further that b-symplectic manifolds have canonical Spin-c structures in the usual sense, and that the APS index above coincides with the index of the Spin-c Dirac operator. We show that if the manifold is endowed with a Hamiltonian action of a compact connected Lie group with non-zero modular weights, then this method satisfies the Guillemin-Sternberg ``quantization commutes with reduction property. In particular our quantization coincides with the formal quantization defined by Guillemin, Miranda and Weitsman, providing a positive answer to a question posed in their paper.