You downloaded a Developer Certificate, then told your device that you trust this person to have access to your phone. That does not involve any virus or a hacking of your phone, and you voluntarily gave them the access. They can certainly access your photos and contacts as well. The certificate you trusted can be viewed and removed at Settings > General > VPN & Device Management. Resetting your phone will prevent further access and also remove the Certificate. There is nothing you can do about the data they already have such as your Photos and Contacts.
It is like giving someone your Bank Account number, then wondering how come money is missing from your account. I suspect the exact message you saw was this one:
- Allow apps from this developer to be opened on your phone and to access your data.
In any case, you have removed access by resetting your phone, although it is not recommended to restore from a backup. If you did, you may want to check the Device Management setting above to verify that it is no longer there or perform a Factory Reset and do NOT restore from a backup. The data they accessed is in their hands, so you cannot change that fact. You now understand the importance of reading those warnings and should choose wisely who you Trust with your data. In the future, stick to downloading apps in the Apple App Store, and if you do not see an app there that you want, consider that there is likely a good reason for that.