- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 197
Closed
Description
Is your feature request related to a problem? Please describe.
Currently there is no way to include an Apple Watch App in your NativeScript application.
Describe the solution you'd like
I'd like to add the watch app and watch app extension code inside App_Resources/iOS and the tooling to integrate them build time inside the iOS app.
Describe alternatives you've considered
No alternatives.
Additional context
None.
Workflow:
- Create Single Page App from Xcode.
- Add watch app target - File>New>Target>WatchKit App
- Add a name to your watch app, for example MyFirstWatchApp
- Copy the generated "MyFirstWatchApp" and MyFirstWatchApp Extensionto.../apps/MyApp/app/App_Resources/iOS/watchapp/MyFirstWatchAppand.../apps/MyApp/app/App_Resources/iOS/watchextension/MyFirstWatchApp Extensionrespectively.
- Inside the Info.plistof the Watch App replace the value ofWKCompanionAppBundleIdentifierwith$(WK_APP_BUNDLE_IDENTIFIER).
 6 Inside theInfo.plistof the Watch Extension replace the value ofWKAppBundleIdentifierwith$(WK_APP_BUNDLE_IDENTIFIER).
- You can populate the Assets.xcassetsof the Watch App and the Watch Extension and add the name of theappiconsetto the.../apps/MyApp/app/App_Resources/iOS/watchapp/MyFirstWatchApp/watchapp.jsonand.../apps/MyApp/app/App_Resources/iOS/watchextension/MyFirstWatchApp Extension/extension.jsonrespectively:
{
    "assetcatalogCompilerAppiconName": "AppIcon"
}- You can modify the WATCHOS_DEPLOYMENT_TARGETof the Watch App by adding the value inside thewatchapp.jsonlike this:
{
    "assetcatalogCompilerAppiconName": "AppIcon",
    "targetBuildConfigurationProperties": {
        "WATCHOS_DEPLOYMENT_TARGET": 4.1
    }
}- Run the NativeScript application
adrian-niculescu and NickIliev