A simple understanding of Watch's SDK and project build: first create Watch's taget in a project that does not fit watch:
The following target and extension directories are generated in the post-creation project:
Here tick the build glance, will create the corresponding controller file, the generated 3 controller files in turn corresponding to the main display interface of the app, Notification interface (notification screen with swipe-down gestures on the watch) and a quick display interface (a purely static display interface that is outlined in the watch upward gesture)
You can add the test control in SB to see the effect, simulator run, wathch size of the display to be selected in the external:
The above two graphs correspond, notice the addition element in glance is limited.
Next Test on the real machine:
The certificate is set as follows:
The bundleidentifier of the main target is unchanged: com.apps.apptest
Extension's BundleIdentifier:com.apps.apptest.watchkitextension
WatchKit app's BundleIdentifier:com.apps.apptest.watchkitapp
In addition, extension nsextension-nsextensionattributes-wkappbundleidentifier need to be correlated WatchKit App's Bundleidentifier (Com.apps.apptest.watchkitapp)
The wkcompanionappbundleidentifier of the WatchKit app requires the Bundleidentifier (com.appzoom.apptest) associated with the main target.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
On Apple Watch