Hello.
I had the same problem. And then I tried the followings:
I can debug my iOS12.1 device with XCode10.1.
Howeve when I upload the manifest and ipa filee for "Over-the-air" installation,
the icon of the installed app shows is gray.
I am trying to solve the problem.
It might be your KeyChain Access is broken or XCode internal data is broken.
KeyChain Access:
You might need to save your developer certificate by xxxxx.p12. style.
You need to save a pair of a key and a certificate.
(1) Open KeyChain Access
(2) Click "System" and select your develop/distribute certificate and right click to open menu.
(3) Select Write. The KeyChain asks a file name and a password.
And then you need to open "Key Chain" menu and select Preference.
Click "Reset Default". "Login" is going to erase. Don't worry, when you re-login, "Login" will back
in KeyChain.
Logout and login again or restart your mac.
Open KeyChain and select "Login". And then double click the saved xxxxx.p12 and enter the password.
Your certificate shows in your KeyChain.
You might need to add the distribution certificate.
And start XCode.
XCode:
In my case, I delete the following folders by "Terminal"
~/Library/Developer/Xcode
~/Library/Caches/com.apple.dt.Xcode
When you delete these folders, your previous archives are gone.
Restart XCode.