2016-07-30 26 views
0

當我嘗試導入WatchConnectivity框架是這樣的:Apple關注連接性文件未找到

#import <WatchConnectivity/WatchConnectivity.h> 

我得到這個錯誤:

'WatchConnectivity/WatchConnectivity.h' file not found

是否有額外的東西,我不得不進口或這與我的Xcode版本有問題?

+1

你有什麼版本的Xcode?你想支持哪個版本的watchOS? – 2016-07-30 22:41:40

+0

我有版本6.4 – av993

回答

1

Xcode版本6.4不支持watchOS 2 SDK,這是使用WatchConnectivity時需要的。

這就是爲什麼#import返回「找不到文件」的錯誤,作爲特定的頭文件(和框架)不存在之前watchOS 2.

你將不得不升級到版本的Xcode 7.0或更高,如果你想使用WatchConnectivity或其他watchOS 2功能。