48.4 Adding the Widget Extension
The next step in the project is to add the widget extension by selecting the File -> New -> Target… menu option. From within the target template panel, select the Widget Extension option as shown in Figure 48-3 before clicking on the Next button:
Figure 48-3
On the subsequent screen, enter WeatherWidget into the product name field. When the widget is completed, the user will be able to select the geographical location for which weather updates are to be displayed. To make this possible the widget will need to use the intent configuration type. Before clicking on the Finish button, therefore, make sure that the Include Configuration Intent option is selected as shown in Figure 48-4:
Figure 48-4
When prompted, click on the Activate button to activate the extension within the project scheme. This will ensure that the widget is included in the project build process:
Figure 48-5
Once the extension has been added...