WatchKit is officially out!!!! Here is how to get started:
Download XCode 6.2 Beta
Just head over to the XCode Downloads page, and get the latest Beta of XCode!
Create New Project
Got to your new XCode-Beta, and select Create a new Xcode project. As usual, select Single View Application, and go through the process of saving the project as normal:
Create a Watch App Target
Now here comes the fun part! From the XCode menu, select New -> Target:
Now, go to the Apple Watch Section, and select Watch App:
Click Next, and de-select the Notification and Glance Scene optionsto make life simpler to start with:
Click Finish, and you’re almost there!
Add Label
Go to the Interface.storyboard in your Watch App Target:
Now, drag a label onto your Interface Controller, and add the Hello, World! text. Make sure to Center your label!
Yes, that’s right. No AutoLayout here!
Run the App!
This is where things get tricky. Make sure to select the Watch App Target to run. Just choose any iPhone Simulator.
Finally, select the Apple Watch as an External Device from your iOS Simulator Hardware Menu option:
Re-run the app, and you’ll see the watch app!
No comments:
Post a Comment