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.
I have had luck by disconnecting my iPhone from my mac, and then Analyzing (Shift + Command + B or Product -> Analyze).
After that I plugged my iPhone back in and did a clean (Command + k) and then ran! Worked!
This worked for me :
1) Product > Archive (From Xcode)
2) Export iPa
3) Install this iPa from iTunes or Diawi.
This happened to me before. I had to navigate to derived data and delete it. Restart Xcode. Solved the issue for me. You may want to restart your computer as well.
This line in the device logs stood out to me, and hopefully you saw it too:
Failed to verify code signature of /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.FvOJz0/extracted/FSS App.app/PlugIns/QuickSched.appex
This is saying that (although Xcode thought everything was OK at build time), your device rejected the code signature of your app extension.
There are a few solutions here, but in my personal experience, this issue can only be fixed by tinkering with the code signing settings for your app and app extension. Make sure that the app and app extension are being signed with the same certificate (although likely different provisioning profiles).
As others have recommended, I've also been able to fix this by running the Clean
action in Xcode for the project, and also by deleting the derived data directories. But I have not always been successful with this.
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.
I had the same problem but with an app without app extension on XCode 10.2.1.
None of the solutions worked for me, so I deleted the XCode target and recreated it with the same files and settings. This worked for me.