11

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 4

20

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

Sign up to request clarification or add additional context in comments.

1 Comment

This works for me, too, though I don't understand why. It should be okay if the target is built for multiple platforms.
9

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"

Comments

2

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.

3 Comments

No, that doesn't seem like the right answer. All the rest of have all the targeted device families set that way, and we don't have this issue.
Well it works again after changing that one setting.
I understand that, and it's great you have it working, but it should work even with targeting the other devices too, since it works for the rest of us that way. A workaround is great but it is not an explanation. It would be really nice to try to arrive at an explanation! Of course you've no time for that, but that's the point of my comment.
0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.