Unable to install on iPhone

When I drag the built app into Xcode I get this message:

The app “(null)” already exists on the device. Are you sure you want to replace it?

I had deleted the app (I thought).

Why the “(null)” ??

I assume you have the Devices window open in Xcode. Do you see your device there? When you select it, you will see what developed apps are installed. Is your app already there? I usually use the + button to install an app instead of dragging, so not sure what’s happening with the drag.