Preheat the oven to 135°C.
Pat the rack of ribs dry with kitchen paper, then remove the silvery membrane from the bone side.
In a small bowl, whisk together the light soft brown sugar, smoked paprika, garlic powder, onion powder, salt, black pepper and cayenne pepper (if using).
Generously rub the spice mix all over the ribs, pressing gently to help it stick.
Tear off a large piece of heavy-duty aluminium foil. Place the ribs meat-side up on the foil, then pour over the apple cider vinegar or water.
Tightly wrap the ribs in the foil, sealing the edges. Place the wrapped ribs on a roasting tin and bake for 2½–3 hours for baby back ribs, or 3–3½ hours for spare ribs, until very tender.
Carefully open the foil and drain off any liquid. Increase the oven temperature to 190°C.
Brush the barbecue sauce all over the ribs. Return the ribs to the oven, uncovered, and bake for 20–30 minutes, brushing with more sauce halfway through, until the sauce is bubbling and caramelised.
Remove the ribs from the oven and let them rest on a chopping board for 10–15 minutes. Slice between the bones and serve.