Users should be able to configure Titanium app to use WatchKit extension and able to launch external display (watch simulator) whenever they launch the app onto iOS simulator. Here are the various factors we need to add in order to support WatchKit. The details iOS Extensions and WatchKit is captured at https://wiki.appcelerator.org/display/pe/iOS+Extensions+and+WatchKit
- Show iOS extension section in TiApp only if the app is enabled for iphone/ipad platform.
- Allow users to add a new or existing extension.
- If they are creating a new extension, invoke cli command to create an extension.
- If they are adding an existing one, then they should provide path to xcode project. Then, Studio should parse for targets by reading xcodeproject.
- After finding targets, we need to find bundle identifier for each target.
- Add a new attribute (called 'extension') inside 'ios' tag of tiapp.xml and reload those extensions, targets.
- Let users to choose provisioning profiles for each target.
- The structure of tiapp.xml extensions is listed at https://wiki.appcelerator.org/display/pe/iOS+Extensions+and+WatchKit
- whenever users re-open tiapp, we need to re-scan the targets from the watchkit xcode project and make sure the targets match with the existing tiapp.
- Launch external display if the app supports watchkit.
- ti info output contains information whether the simulator supports watchkit extension
- whenever user launches an app that supports watchkit extension, we should pass an additional command line argument to launch external display.
- If the user doesn't want to launch external display everytime whenever they launch iOS simulator, then they should be able to set a preference to prevent launching external display even if the app supports watchkit extension.,
- One of the strategic location to expose this preference is to add a menu item (similar to Launch Automatically, or Run Configuration...) within iOS simulators sub-menu.