mm24
mm24

Reputation: 9606

Xcode 7: WatchOS storyboards do not support target device type 'iphone'

I have imported an Xcode 6 project in Xcode 7 beta 5 with a Watch target and I get the following message:

WatchOS storyboards do not support target device type 'iPhone'

I clicked on the storyboard and removed it from the App target (left only the watch app target instead). However it still doesn't work.

How can I get this to work?

Upvotes: 9

Views: 3704

Answers (2)

Exile3daime
Exile3daime

Reputation: 611

Modify Targeted Devices Family

The issue has not appeared on Xcode 6. For Xcode 7, my solution is to modify file project.pbxproj.

  1. Open file PROJECT.xcodeproj in your project folder
  2. Open file project.pbxproj
  3. Modify value of TARGETED_DEVICE_FAMILY[sdk=iphonesimulator*] to "4" in section Watchkitapp. "4" means for Watch only and "1" is for iPhone.

p.s. Originally the value TARGETED_DEVICE_FAMILY[sdk=iphonesimulator*] might by "1,4". Therefore we got this error.

enter image description here

Upvotes: 0

JSA986
JSA986

Reputation: 5936

  • Update to recommended settings

  • Select your watch app storyboard

  • Uncheck the the first check box (your main app) and this will allow you to run your app without the error.

NOTE: This will result in no assets loaded. Go into your asset catalogue select the images one by one. In the inspector you will have a list of check boxes. Check watchOS and add the images to "Apple Watch" in the asset catalogue. The assets will now load as expected

You can support both Watch OS1 and 2 and there is a good answer here Xcode 7 supporting watch OS1 and OS2

Upvotes: 8

Related Questions