Terminal Watch Widget Face for Apple Watch.
For devices running watchOS 10 iOS17 or higher.
Due to the new version of WatchOS not supporting app resident foreground display,
here we use widgets to achieve a Watch Face similar to the Terminal effect.
Thanks for TermiWatch https://github.com/kuglee/TermiWatch/
Use WeatherKit to obtain weather information. WeatherKit only supports paid developer accounts.
Next, I will add other methods to obtain weather data.
qweather has been introduced, and you can apply for a Key to replace the WeatherKit yourself. https://dev.qweather.com/en/
Refer to TermiWatch's tutorial
-
Xcode Settings Tips
1. Project file navigator
2. Find navigator
3. Project main file, click to display the project settings window on the right
4. Targets. Click on different targets to modify their settings
5. Schemes. Switch the schemes to compile apps for iPhone or Watch -
For each of the 3 targets replece void in the Bundle Identifier field with the name of your developer account. (The name of your Apple ID without the @xxxx.com.)
- Change the project's team:
- Select the Signing & Capabilities tab:
- For each of the 3 targets change the Team to your team. (Usually this is your name.)
- Manually replace bundle identifiers:
- Select Xcode menu -> Find -> Find and Replace in Project….
- In the Text field type void (Maybe others like xxx in com.xxx.TermiWatch)
- In the With field type the name of your developer account. (The name of your Apple ID without the @xxxx.com.)
- Click the Replace All button.
- If there is an error in WeatherKit or HealthKit, please set Capability. If you do not use WeatherKit, you do not need to set up WeatherKit.
log in to the developer page https://developer.apple.com/account , certificate->Identifiers,Find the corresponding bundleID.
Click to enter, Capabilities -> find WeatherKit and HealthKit ☑️,in App Services find WeatherKit ☑️
- Added qweather module, If using 'qweather' to replace weatherkit https://dev.qweather.com/en/docs/
- Go to https://id.qweather.com/#/login to apply for the API Key for qweather
- Refer doc https://dev.qweather.com/en/docs/configuration/project-and-key/
- Copy Key to HFWeatherKey (/TermiWatchWidget/QConfiguration.swift)
- Please delete the Weatherkit for each of the 3 targets
- Watch and iPhone Go to Settings -> Privacy and Security -> open Developer Mode
- Plug your phone into your computer.
- Unlock your phone and trust your computer.
- Two ways
1. Select Xcode menu -> Product -> Scheme, select TermiWatchWdiget, -> Destination select your phone.
2. Select Xcode menu -> Product -> Run.
3. Wait for the app to install on your phone.
4. Select Xcode menu -> Product -> Scheme, select TermiWatchWdiget Watch App, Product -> Destination select your watch.
5. Select Xcode menu -> Product -> Run.
6. Wait for the app to install on your watch. - Or
1. Select Xcode menu -> Product -> Destination. At the Device section select your phone.
2. Select Xcode menu -> Product -> Run.
3. Wait for the app to install on your phone.
4. iPhone Go to Settings -> General -> Profiles & Device Management on your phone to trust the app.
5. Install the watchOS app from the Watch app. - If Device list does not display 'watch', check the network connection is on the local area network. If it does not work, restart the phone
- Open this App on iPhone, click "Sync Watch Face".
- Check "My Faces", select and set it.
- Find /TermiWatchWidget/QConfiguration.swift, modify text, color.
- Image path on TermiWatchWidget/TermiWatchWidget_Widget/Assets.xcassets/LeftTopImage.imageset, you can replace it
- More custom go to /TermiWatchWidget Watch App/View/QCommonView.swift
- When the language is Chinese, the [DATE] is based on the Chinese lunar calendar, while for other languages it is "EEE MM/dd YYYY". You can change it yourself. TWExtension.swift - currentDate.
- Due to the refresh mechanism of Widgets, there is a limit on the number of daily updates, and there may be a lag in data updates.
- The healthRefreshInterval can be modified to adjust the refresh interval of health information.
- When the data has not been updated for a long time, you can click on the Widget to enter the app and manually refresh it.