Skip to content

Commit 5c219eb

Browse files
authored
Merge branch 'main' into main
2 parents 47ed3ab + fe7c2fc commit 5c219eb

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

README.md

+9-8
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ In order to work correctly there needs to be some platform specific setup. Check
2020
<details><summary>iOS</summary>
2121

2222
### Add a Widget to your App in Xcode
23-
Add a widget extension by going `File > New > Target > Widget Extension`
23+
Add a widget extension by going <kbd>File</kbd> > <kbd>New</kbd> > <kbd>Target</kbd> > <kbd>Widget Extension</kbd>
2424

2525
![Widget Extension](https://github.com/ABausG/home_widget/blob/main/.github/assets/widget_extension.png?raw=true)
2626

@@ -30,19 +30,18 @@ You need to add a groupId to the App and the Widget Extension
3030

3131
**Note: in order to add groupIds you need a paid Apple Developer Account**
3232

33-
Go to your [Apple Developer Account](https://developer.apple.com/account/resources/identifiers/list/applicationGroup) and add a new group
34-
Add this group to you Runner and the Widget Extension inside XCode `Signing & Capabilities > App Groups > +`
33+
Go to your [Apple Developer Account](https://developer.apple.com/account/resources/identifiers/list/applicationGroup) and add a new group.
34+
Add this group to your Runner and the Widget Extension inside XCode: <kbd>Signing & Capabilities</kbd> > <kbd>App Groups</kbd> > <kbd>+</kbd>.
35+
(To swap between your App, and the Extension change the Target)
3536

3637
![Build Targets](https://github.com/ABausG/home_widget/blob/main/.github/assets/target.png?raw=true)
3738

38-
(To swap between your App, and the Extension change the Target)
39-
4039
### Sync CFBundleVersion (optional)
4140
This step is optional, this will sync the widget extension build version with your app version, so you don't get warnings of mismatch version from App Store Connect when uploading your app.
4241

4342
![Build Phases](https://github.com/ABausG/home_widget/blob/main/.github/assets/build_phases.png?raw=true)
4443

45-
In your Runner (app) target go to `Build Phases > + > New Run Script Phase` and add the following script:
44+
In your Runner (app) target go to <kbd>Build Phases</kbd> > <kbd>+</kbd> > <kbd>New Run Script Phase</kbd> and add the following script:
4645
```bash
4746
generatedPath="$SRCROOT/Flutter/Generated.xcconfig"
4847
versionNumber=$(grep FLUTTER_BUILD_NAME $generatedPath | cut -d '=' -f2)
@@ -126,8 +125,10 @@ HomeWidgetPlugin.getData(context)
126125

127126
### Setup
128127
<details><summary>iOS</summary>
128+
129129
For iOS, you need to call `HomeWidget.setAppGroupId('YOUR_GROUP_ID');`
130130
Without this you won't be able to share data between your App and the Widget and calls to `saveWidgetData` and `getWidgetData` will return an error
131+
131132
</details>
132133

133134
### Save Data
@@ -231,13 +232,13 @@ Android and iOS (starting with iOS 17) allow widgets to have interactive Element
231232
<details><summary>iOS</summary>
232233
233234
1. Adjust your Podfile to add `home_widget` as a dependency to your WidgetExtension
234-
```
235+
```rb
235236
target 'YourWidgetExtension' do
236237
use_frameworks!
237238
use_modular_headers!
238239
239240
pod 'home_widget', :path => '.symlinks/plugins/home_widget/ios'
240-
end
241+
end
241242
```
242243
2. To be able to use plugins with the Background Callback add this to your AppDelegate's `application` function
243244
```swift

0 commit comments

Comments
 (0)