[英]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:我在Xcode 7 beta 5 中导入了一个带有 Watch 目标的 Xcode 6 项目,我收到以下消息:
WatchOS storyboards do not support target device type 'iPhone'
WatchOS 故事板不支持目标设备类型“iPhone”
I clicked on the storyboard and removed it from the App target (left only the watch app target instead).我点击了故事板并将其从 App 目标中删除(只留下手表应用目标)。 However it still doesn't work.
但是它仍然不起作用。
How can I get this to work?我怎样才能让它发挥作用?
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.
检查 watchOS 并将图像添加到资产目录中的“Apple Watch”。 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您可以同时支持 Watch OS1 和 2,这里有一个很好的答案Xcode 7 support watch OS1 and OS2
The issue has not appeared on Xcode 6. For Xcode 7, my solution is to modify file project.pbxproj.该问题在 Xcode 6 上没有出现。对于 Xcode 7,我的解决方案是修改文件 project.pbxproj。
ps Originally the value TARGETED_DEVICE_FAMILY[sdk=iphonesimulator*] might by "1,4". ps 最初的值 TARGETED_DEVICE_FAMILY[sdk=iphonesimulator*] 可能是“1,4”。 Therefore we got this error.
因此我们得到了这个错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.