Use Qt app with Apple Watch
-
Hi,
I have been working with Qt for a few years now, so I'm pretty comfortable making apps with Qt now. It is my goto-tool even for iOS-only apps. I would like to develop an app that also has an Apple Watch-app, but I'm having a bit trouble doing so. By creating a standard Qt Quick Application, compiling (so the XCode-project is generated), I managed to open the XCode-project and add a Apple Watch target there without trouble (only some compiler settings that I needed to fix). So this actually works and I can in principle communicate between the watch and i.e. QML easily this way.
The problem is that when I do any changes in Qt Creator and recompile, the .xcodeproj-files are overwritten so that my changes in XCode are gone. Is there any easy way to fix this? I'm comfortable with changing the Qt Creator source code myself, but not sure if that's the best way.
-
Hi and welcome to devnet,
Depending on the changes you did, a new mkspec might be enough. You could take the iOS as a base.
-
@andershaf I add the Watch Kit to my project but still having compiler errors. What did you change to make it work?
-
Hi,
IIRC, the dev branch at least has now a mkspec for watchOS.
-
Clone Qt's sources and checkout the dev branch.
-
Does Qt5.8 supports now watchOs? https://wiki.qt.io/New_Features_in_Qt_5.8
"New Platforms
Apple tvOS (technology preview)
Apple watchOS (technology preview)" -
Right, I forgot there was the tech preview. So indeed you can grab Qt 5.8.