I had the same issue. You get the same error if you have the option on the iPhone activated to unload apps if you storage is low. If you have apps with a cloud symbol ☁ you have to download or delete them. After this you can install from Xcode without error