📲👉 https://blog.nativescript.org/add-home-screen-widget/
ns-widgets.mp4
- This example uses it's own
DEVELOPMENT_TEAMandPROVISIONING_PROFILE's for both the app and the widget as well as it's own App ID's for both. - In order to run the example and experiment yourself, you will need to swap the following:
App_Resources/iOS/build.xcconfig:- Change
DEVELOPMENT_TEAMto your own. - Change
PROVISIONING_PROFILEto the name of the provision profile you create for the app itself.
- Change
App_Resources/iOS/extensions/provisioning.json: modify the key to match the App ID of your widget and the value to the name of the provision profile you create for the widget itself, for example:
{
// This is the APP ID of the Widget // Widget Provision Name
"org.nativescript.widgetexample.widget": "WidgetExampleWidget"
}App_Resources/iOS/app.entitlements: Updategroup.org.nativescript.widgetexampleto the App Group ID you registered in your Apple Developer account.App_Resources/iOS/extensions/widget/widget.entitlements: Updategroup.org.nativescript.widgetexampleto match App Group ID you registered in your Apple Developer account.- Lastly, search for all occurrences of
group.org.nativescript.widgetexampleand update those to match your App Group ID.