My app runs fine in the simulator, but when I try to install it on my iPhone it says
App installation failed: An unknown error has occurred.
try it :
Xcode-> Preferences->Locations->Derived Data-> Delete it...
It will clean your project, Try to restart your device. Then build the app on the device.