Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nativescript/widget-example
iOS Home Screen Widget Example
https://github.com/nativescript/widget-example
ios javascript nativescript swift swiftui typescript
Last synced: 3 months ago
JSON representation
iOS Home Screen Widget Example
- Host: GitHub
- URL: https://github.com/nativescript/widget-example
- Owner: NativeScript
- Created: 2023-12-17T23:25:58.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-17T23:43:27.000Z (about 1 year ago)
- Last Synced: 2024-05-23T00:20:24.803Z (8 months ago)
- Topics: ios, javascript, nativescript, swift, swiftui, typescript
- Language: TypeScript
- Homepage: https://blog.nativescript.org/add-home-screen-widget/
- Size: 218 KB
- Stars: 8
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Learn how to add a Home Screen Widget
📲👉 https://blog.nativescript.org/add-home-screen-widget/
https://github.com/NativeScript/widget-example/assets/457187/1912cf11-e6d9-4ee5-957d-48dd7051085b
## Notes to run it yourself
1. This example uses it's own `DEVELOPMENT_TEAM` and `PROVISIONING_PROFILE`'s for both the app and the widget as well as it's own App ID's for both.
2. In order to run the example and experiment yourself, you will need to swap the following:- `App_Resources/iOS/build.xcconfig`:
- Change `DEVELOPMENT_TEAM` to your own.
- Change `PROVISIONING_PROFILE` to the name of the provision profile you create for the app itself.
- `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:```json
{
// This is the APP ID of the Widget // Widget Provision Name
"org.nativescript.widgetexample.widget": "WidgetExampleWidget"
}
```- `App_Resources/iOS/app.entitlements`: Update `group.org.nativescript.widgetexample` to the App Group ID you registered in your Apple Developer account.
- `App_Resources/iOS/extensions/widget/widget.entitlements`: Update `group.org.nativescript.widgetexample` to match App Group ID you registered in your Apple Developer account.
- Lastly, search for all occurrences of `group.org.nativescript.widgetexample` and update those to match your App Group ID.