Your first sentence:
In case you're living under a rock, this app allows you to ...
would translate into:
Au cas où tu habites dans une grotte : cette application permet de...
That's by far the closest and idiomatic translation.
As for the one yout finally sent to your friend:
Quoi ?! Qu'est-ce que ça te coûte de sortir un peu plus souvent, ma petite troglodyte !
I'd say:
Tu ne connais pas ?! Tu habites dans une grotte ou quoi ?
I like that version with "grotte" (more than the other ones provided in other answers, that are also good but less good IMO, like "tu vis dans la Creuse", "tu débarques", "tu sors de ta cambrousse", "tu vis sur une île déserte") because:
- I think it's the most common/understandable.
- Some people may get wrong the expressions referring to a real placeplaces where actual people live, like "Creuse" or "cambrousse".
- You immediately picture someone living at the Stone Age.
- It may also convey the idea of Plato's Cave.
What you sent has 2 things that are a bit weird/not really idiomatic in a casual relationship:
- "Qu'est-ce que ça te coûte de sortir un peu plus souvent" may sound a bit aggressive, and does not match the joking/casual tone you wanted. This expression is used when there's actually something to really blame about.
- "troglodyte" is a funny word but seldom used in a casual chat.
Also note that the whole "ma petite troglodyte" may be seen as flirting... but maybe that was the intentionintent...