Following is a very common error that lot of iOS developers run into when they try to launch their applications on iPhone/iPad through XCode.
There are few reasons that lead to this error.
What happens is that when you choose your connected device as deployment target in XCode, the application does get installed on your device. You can verify it by looking at installed application icons on your device. If you will click on the icon on device and try to launch the application, you will be prompted with details that you need to change settings on device to trust the publisher of this application. Simply change the settings to Trust applications installed by your apple id. After this when you will try to debug the application from XCode, this error will not show up.