Updated to Xcode 13, get unique error code when trying to run SwiftUI app on iOS but not macOS

Viewed 4732

When I try to build my app I receive the following error:

Unable to find a profile type for platform iOS and purpose development. You may need to reinstall Xcode.

Which I promptly did, but it does not fix the issue. Neither does cleaning build folder, rebooting, restarting, etc. Anybody encountered this before?

4 Answers

I fixed this by removing "Allow Multi-Platform Builds" in Build Settings.

I got the same problem, it was building only on simulator and not in device. This happened after I installed a new package in SPM (SwiftLint).

And this is what worked for me:

  1. Go to target
  2. Build Settings
  3. In "Build Options", set "Allow Multi-platforms Builds" to "No"

Found the answer myself. Was an issue of having 'Targeted device families' in the build settings set to iPhone, Mac, iPad. Set it to just iPhone and it works again.

For me it was even more rudimentary. I had selected an iOS device in the Scheme to build for, and switching to My Mac (in the top-middle toolbar) resolved this cryptic error.

enter image description here

Related