Xcode The run destination iPhone is not valid

Error: While running the app on iPhone via Xcode you are getting the following error:

The run destination .. iPhone is not valid for Running the scheme ‘App’.

The solution is to turn the developer mode on and then restart the device. After restart it will ask for the Turn On Developer Mode prompt:

Click the Turn On button and The run destination iPhone is not valid.. issue will be fixed.