I have configured the WatchKit App to run on iPhone 6, the WatchKit App Scheme Executable points to WatchKit App.app, Watch interface points to Main, but the IOS App is not starting only the WatchKit App.
When I select the WatchKit App to run on iPhone 6, the iPhone 6 simulator is starting, I see a black screen for a second after that the simulator returns to IOS level but the main app is not starting, only the WatchKit App on the Apple Watch simulator. I can not figure out why the IOS App is not starting?
Open the simulator applications from your macOS applications, use the mouse options menu on the icon in the dock, and select -> device -> watchOS, you can start your paired watch simulator from there.
The WatchKit framework provides infrastructure for creating watchOS apps, including an extension delegate that manages background tasks, extended runtime sessions, and Siri intents. The framework also performs other support tasks, such as accessing information about the user's Apple Watch.
How do I get the watch simulator to appear when I select an iPhone simulator in Device? In the Devices window under Simulators, select an iPhone 5 and later simulator. Under the Paired Watches table, click the Add button (+).
To build a watch-only app, start a new project in Xcode, select the Watch App template, and click Next. Provide a name, and choose the interface, life cycle, and language for your watch app. Select the options to include a notification scene template or unit and user interface tests, and click Next.
In order to debug the iOS app while running the Watch Extension, you should follow the steps explained here.
You also need to understand that the iOS App does not have to be running while the Watch app is running. You have several combinations of possible runtime scenarios...all of which your iOS app and Watch App must handle seamlessly.
I have also posted some additional information about launching the parent app from the Watch Extension as well as sharing data here.
Hopefully that helps.
If you want to see NSLogs from the container app, you can do this:
You should now be connected to both processes, and see breakpoints and logs from both. You can use the thread navigator in the left pane to switch between apps (which you'll need to do to get the watch app running again).
Note that an early breakpoint in the watch app is optional, I just find it useful to make sure any early breakpoints are caught.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With