target specifies product type 'com.apple.product-type.bundle.ui-testing', but there's no such product type for the 'iphonesimulator' platform
Asked Answered
S

2

6

When i was running my swift project, I got this error.

target specifies product type 'com.apple.product-type.bundle.ui-testing', but there's no such product type for the 'iphonesimulator' platform

I found some similar questions on SO but this answer didn't solve my problem. I googled it too, there are no project with this product type inside.

I'm using xcode 6.4 and swift 1.2

Sucre answered 16/7, 2015 at 22:49 Comment(0)
T
12

I had this issue after adding a product for UI testing using Xcode 7 Beta and constantly switching between Xcode 6.4 and 7 Beta. A simple clean made it go away.

Triglyceride answered 21/7, 2015 at 21:45 Comment(1)
Thanks. I tried other options but this is the only one that worked.Sucre
P
6

In my case, clean did not work.

Open AppName.xcodeproj/project.pbxproj, replace all com.apple.product-type.* (there are 3 of them) with com.apple.product-type.application solved my problem.

It seems apple changed the type name in Xcode 7.

Phelia answered 27/8, 2015 at 3:33 Comment(2)
How do you access AppName.xcodeproj/project.pbxproj ? I'm having this same problemObliterate
@Obliterate Use Finder or Terminal, open with any text editor you like.Phelia

© 2022 - 2024 — McMap. All rights reserved.