The solution to dyld_shared_cache_extract_dylibs failed for Xcode!
The solution for the dyld_shared_cache_extract_dylibs failed error took me a while but I got it.
1: Go onto the settings of the device you are downloading Xcode sample apps (or whatever else you are doing). In this case I download my apps to my iPhone so I will be using iPhone based instructions.
2: go to privacy & security, go down to developer mode and turn it off. I recommend restarting your phone after this step.
3: Do the opposite of step 2, by now turning on developer mode in Privacy & security. This will restart the phone.
4: go to Xcode, plug the phone in and run the app you are making, it may ask you to download a cache, so let it do that.
5: Enjoy ☺️