I'm sorry to hear about your bad experience in Barcelona. I live in Barcelona and it is indeed a shady city, and the Centre? Place is real bad. I have more or less managed to be OK because I come from a very dangerous country myself. This is why I always use prepaid phone lines only, because a decade ago I had a very bad experience (elsewhere in the World) with officially adding a credit card. If you had emails and other stuff synced to your iPhone, go to the respective sites online (GMail, etc) and change your password. These apps will stop syncing soon enough.
Sorry to hear your trip got ruined... :(