daihovey
daihovey

Reputation: 3575

Cannot install Watch app

When trying to test a Watch app on the Watch, in XCode I get the following warning

Watch App xcodeproj TARGETED_DEVICE_FAMILY contains a value incompatible with the target type.

enter image description here

Looking at the Device logs, it says:

(Error) WatchKit: validateWatchKitApplicationInfoDictionary, invalid UIDeviceFamily value

What am I missing?

Upvotes: 3

Views: 2116

Answers (2)

Exile3daime
Exile3daime

Reputation: 611

Modify Targeted Device Family

  1. Open file PROJECT.xcodeproj in your project folder
  2. Open file project.pbxproj
  3. Replace value of TARGETED_DEVICE_FAMILY: "4" for watchkitextension, "1,4" for watchkitapp
  4. Replace value of "TARGETED_DEVICE_FAMILY[sdk=iphonesimulator*]" = "1,4" for watchkitapp

e.g.

enter image description here

Upvotes: 2

ToddH
ToddH

Reputation: 2821

Your Watch Extension should have a TARGETED_DEVICE_FAMILY of iPhone whereas the Watch App target should have TARGETED_DEVICE_FAMILY of 1,4 like this:

Xcode device family settings for apple watch

I had a similar problem on a project that was created with an Xcode beta. I ended up creating a new test project and going through side by side and comparing all the settings.

Upvotes: 4

Related Questions