I've created a watchOS 2 app and extension in Xcode 7 (beta 5). The extension is set up to include a static library as the watchOS 1 extension used to. This means that the static library needs to be compiled using the watchOS 2 SDK. I have set my build options for the library to build with the armv7k architecture.
When I build the library separately in its own scheme, it builds without any errors or warnings. However, when I build my iPhone target, of which the watch and therefore the static library are dependencies, I get the following errors (amongst many)
In file included from /Users/ricky/Documents/Silverlake/Other Sources/Silverlake-Prefix-Watch.pch:8:
In file included from /Users/ricky/Documents/Silverlake/Silverlake_Watch.h:15:
In file included from /Applications/Xcode-beta.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator2.0.sdk/System/Library/Frameworks/WatchKit.framework/Headers/WatchKit.h:9:
In file included from /Applications/Xcode-beta.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator2.0.sdk/System/Library/Frameworks/WatchKit.framework/Headers/WKError.h:8:
In file included from /Applications/Xcode-beta.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator2.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In file included from /Applications/Xcode-beta.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator2.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:11:
In file included from /Applications/Xcode-beta.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator2.0.sdk/usr/include/sys/types.h:75:
/Applications/Xcode-beta.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator2.0.sdk/usr/include/sys/cdefs.h:707:2: error: Unsupported architecture
#error Unsupported architectureIf I enable modules, the format of the errors changes to:
While building module 'WatchKit' imported from /Users/ricky/Documents/Silverlake/Silverlake_Watch.h:15:
While building module 'Darwin' imported from /Applications/Xcode-beta.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator2.0.sdk/System/Library/Frameworks/WatchKit.framework/Headers/WKDefines.h:8:
In file included from <module-includes>:1:
/Applications/Xcode-beta.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator2.0.sdk/usr/include/sys/cdefs.h:707:2: error: Unsupported architecture
#error Unsupported architectureIt appears that the correct SDK is being used, but I have no idea what is causing these build errors.
Any advice would be hugely appreciated.