We are building an application that would be cross-platform and hence using CMake as the build system. While am able to build for iOS, macOS, tvOS etc, have not been able to build for watchOS using CMake. Right now, am looking for an independent watchOS app. Can someone help with any pointers or reference link for the same ?
What issues are you encountering? To build for WatchOS, simply set CMAKE_SYSTEM_NAME to watchOS and CMAKE_XCODE_EFFECTIVE_PLATFORMS to -watchos
Thanks Ben !
My project has an ExtensionDelegate and an InterfaceController. When I build the project through CMake, I get ‘_main’ not found. I have tried giving an entry point via ‘-e WKExtensionMain’ as compile options in CMake. With this the build works fine but none of my code gets linked and the generated .app is around 67KB. Now, even if i try to deploy this 67KN .app on the watch simulator, it says ‘WatchKit 1 apps are not supported on this version of watchOS’. May be am missing something hence wanted to understand the steps.