Code signing is required for product type 'Application' in SDK 'iOS 13.2'

I am trying to test my application on a physical iOS device using Xcode (Version 11.2), but it fails during the build process with the following message:


Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 13.2'


I do not see this error if I build and run the application on a simulated device in Xcode: The application builds and runs fine on simulated devices.


I have tried this using a iPhone 5s (software version 12.4.3) and a 5th generation iPad (software version 13.2). I get the same error on both devices, even though my iOS build target is version 9, and only the iPad is running software version 13.2. I also see this same error when I try to create an Archive of my app on a "Generic iOS Device".


In my application settings, I have tried enabling and disabling "Automatically manage signing" (in both cases either selecting my team or the appropriate provisioning profile from the drop down menus). I have tried signing out of my associated Apple ID, deleting it from Xcode, and then adding it back. I have also tried running Product>Clean on the application, restarting Xcode, and restarting my computer.


The closest match to this problemthat I found here on the Apple Developer Forum lead to this stack overflow post, but there are multitudes of answers to this problem posted, and none appear to be authoritative. The most highly rated solution is over 2 years old, and it ends with an exasperated dig at the Apple's code signing process: "Really, Apple? Was this supposed to make our lives easier?" This post also appears to be specific to something called "StickerPackExtension". To the extent that I could follow solution (the project structures do not match mine, and it looks like Xcode may have undergone significant changes since the post), it did not work.


Another post here on the Apple Developer Forum(3 years old) references using the command xattr -rc, among other solutions. I have not yet tried this, since I don't fully undestand what it is meant to fix.


Can anyone provide or at least point me in the direction of a solution to this that actually works for me?

Replies

>...even though my iOS build target is version 9,


I trust you meant 'deployment OS'...?


Is it mandatory to create one app that supports five OSs?


What happens if you create a new project using Xcode's Single View iOS template, make no changes and attempt to build it to your iPad on iOS 13.2?


Using a valid paid Developer Program account or Xcode's 'free provisioning'?

As much as i know, code signing is required for a physical device.