You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apple Watch App Beta feature enables embedding a watch app in NativeScript application by adding watchapp and watchextension folders inside App_Resources/iOS/.
The watch app should be created and developed inside Xcode. Once the user is happy with the result, the folder containing the watch app and the watch app extension should be copied inside App_Resources/iOS/watchapp and App_Resources/iOS/watchextension respectively. Optionally you can add watchapp.json and extension.json which support multiple configurations for the build of the watch app and watch app extension.
Example JSON file:
Add a name to your watch app, for example MyFirstWatchApp
Copy the generated "MyFirstWatchApp" and MyFirstWatchApp Extension to .../apps/MyApp/app/App_Resources/iOS/watchapp/MyFirstWatchApp and .../apps/MyApp/app/App_Resources/iOS/watchextension/MyFirstWatchApp Extension respectively.
Inside the Info.plist of the Watch App replace the value of WKCompanionAppBundleIdentifier with $(WK_APP_BUNDLE_IDENTIFIER).
6 Inside the Info.plist of the Watch Extension replace the value of WKAppBundleIdentifier with $(WK_APP_BUNDLE_IDENTIFIER).
You can populate the Assets.xcassets of the Watch App and the Watch Extension and add the name of the appiconset to the .../apps/MyApp/app/App_Resources/iOS/watchapp/MyFirstWatchApp/watchapp.json and .../apps/MyApp/app/App_Resources/iOS/watchextension/MyFirstWatchApp Extension/extension.json respectively:
{
"assetcatalogCompilerAppiconName": "AppIcon"
}
You can modify the WATCHOS_DEPLOYMENT_TARGET of the Watch App by adding the value inside the watchapp.json like this:
The watch app inside NativeScript application support only Automatic code signing. Any provision configuration inside App_Resources/iOS/build.xcconfig will be ignored. And the application build will most probably fail.
Local frameworks (not SDK ones) will not be included in the build of the watch app.
Please, don't report problems here. Instead, open a new issue and link it to this one.
Let's use this discussion for suggestions and improvement ideas. We would love to hear from you!
The text was updated successfully, but these errors were encountered:
KristianDD
changed the title
[Tracking] Embedding Apple Watch App inside NativeScript App
[Tracking][Beta] Embedding Apple Watch App inside NativeScript App
May 15, 2019
Overview
Apple Watch App Beta feature enables embedding a watch app in NativeScript application by adding
watchapp
andwatchextension
folders insideApp_Resources/iOS/
.The watch app should be created and developed inside Xcode. Once the user is happy with the result, the folder containing the watch app and the watch app extension should be copied inside
App_Resources/iOS/watchapp
andApp_Resources/iOS/watchextension
respectively. Optionally you can addwatchapp.json
andextension.json
which support multiple configurations for the build of the watch app and watch app extension.Example JSON file:
In the example above you should have an
.xcassets
catalog withAppIcon.appiconset
inside the watchapp folder.More information can be found in the feature issue here.
Workflow:
MyFirstWatchApp
MyFirstWatchApp Extension
to.../apps/MyApp/app/App_Resources/iOS/watchapp/MyFirstWatchApp
and.../apps/MyApp/app/App_Resources/iOS/watchextension/MyFirstWatchApp Extension
respectively.Info.plist
of the Watch App replace the value ofWKCompanionAppBundleIdentifier
with$(WK_APP_BUNDLE_IDENTIFIER)
.6 Inside the
Info.plist
of the Watch Extension replace the value ofWKAppBundleIdentifier
with$(WK_APP_BUNDLE_IDENTIFIER)
.Assets.xcassets
of the Watch App and the Watch Extension and add the name of theappiconset
to the.../apps/MyApp/app/App_Resources/iOS/watchapp/MyFirstWatchApp/watchapp.json
and.../apps/MyApp/app/App_Resources/iOS/watchextension/MyFirstWatchApp Extension/extension.json
respectively:WATCHOS_DEPLOYMENT_TARGET
of the Watch App by adding the value inside thewatchapp.json
like this:Known issues
Automatic
code signing. Any provision configuration insideApp_Resources/iOS/build.xcconfig
will be ignored. And the application build will most probably fail..entitlements
file, the prepare step of the project will fail. - Apple Watch extension with space in name and.entitlements
file not working. #5005Discussion
Please, don't report problems here. Instead, open a new issue and link it to this one.
Let's use this discussion for suggestions and improvement ideas. We would love to hear from you!
The text was updated successfully, but these errors were encountered: