{"id":15050663,"url":"https://github.com/dtcalabro/libdcweather","last_synced_at":"2025-07-01T09:37:12.684Z","repository":{"id":231605518,"uuid":"763831792","full_name":"dtcalabro/libDCWeather","owner":"dtcalabro","description":"A weather fetching library for jailbroken iOS devices","archived":false,"fork":false,"pushed_at":"2024-04-09T00:07:08.000Z","size":437,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-09T02:18:03.661Z","etag":null,"topics":["ios","jailbreak","jailbreak-library","jailbreak-tweak","library","objective-c","tweak-library","weather"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dtcalabro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-27T01:54:55.000Z","updated_at":"2024-04-15T02:27:18.485Z","dependencies_parsed_at":"2024-04-15T02:38:37.030Z","dependency_job_id":null,"html_url":"https://github.com/dtcalabro/libDCWeather","commit_stats":null,"previous_names":["dtcalabro/libdcweather"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtcalabro%2FlibDCWeather","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtcalabro%2FlibDCWeather/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtcalabro%2FlibDCWeather/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtcalabro%2FlibDCWeather/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dtcalabro","download_url":"https://codeload.github.com/dtcalabro/libDCWeather/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248142906,"owners_count":21054672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ios","jailbreak","jailbreak-library","jailbreak-tweak","library","objective-c","tweak-library","weather"],"created_at":"2024-09-24T21:28:49.429Z","updated_at":"2025-04-10T02:19:23.438Z","avatar_url":"https://github.com/dtcalabro.png","language":"Objective-C","funding_links":["https://www.buymeacoffee.com/dtcalabro"],"categories":[],"sub_categories":[],"readme":"# libDCWeather\n\nA weather fetching library for jailbroken iOS devices\n\n\u003cimg src=\"images/logo.png\" width=\"512\" height=\"auto\" alt=\"libDCWeather Logo\"\u003e\n\n[![GitHub Stars](https://img.shields.io/github/stars/dtcalabro/libDCWeather)](https://github.com/dtcalabro/libDCWeather/stargazers)\n[![GitHub Forks](https://img.shields.io/github/forks/dtcalabro/libDCWeather)](https://github.com/dtcalabro/libDCWeather/network/members)\n[![GitHub Issues](https://img.shields.io/github/issues/dtcalabro/libDCWeather)](https://github.com/dtcalabro/libDCWeather/issues)\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n\n## Overview\n\n- Fetches weather using `Weather.framework`\n- Simple and easy to use\n- Options to fit your needs\n\n## Weather Data\n\n- [X] Current condition string (48 conditions, not including severe weather alerts)\n- [X] Current condition image (supports day and night images)\n- [X] Current temperature (supports Celsius, Fahrenheit, and Kelvin, but defaults to the user's preferred unit)\n- [X] Feels like temperature (supports Celsius, Fahrenheit, and Kelvin, but defaults to the user's preferred unit)\n- [X] Wind speed (supports kilometers per hour and miles per hour, but defaults to the user's preferred unit)\n- [X] Wind direction\n- [X] Current city name\n- [ ] Daily high and low temperatures\n- [ ] Humidity\n- [ ] Visibility\n\n## Features\n\n- [X] Listen for weather update notifications\n- [X] Fetch weather data on demand\n- [X] Set the weather auto update interval (default is 5 minutes)\n- [X] Set the distance threshold to consider the location as changed (default is 1 mile)\n- [X] Choose whether to support severe weather alerts, which applies to both condition strings and images (default is NO)\n- [X] Set the temperature unit (default is the user's preferred unit)\n- [X] Set the speed unit (default is the user's preferred unit)\n- [ ] Multilingual support\n\n## I am a user; where can I get this?\n\nI should preface by saying that this library does not do anything on its own. It is meant to be used by developers in their projects.\n\nWith that being said, if you still wish to install this library, it can be downloaded from havoc at \u003chttps://havoc.app/package/libdcweather\u003e.\n\n## I am a developer; how do I integrate this into my project?\n\nIf you wish to integrate this library into your project, you can follow the instructions below.\n\n## Installation\n\nRun the following command to install the library to your Theos environment\n\n```bash\n./install_to_theos.sh\n```\n\n## Project Integration\n\nYou will need to add it to the libraries in your project makefile\n\n```makefile\nTWEAKNAME_LIBRARIES = dcweather\n```\n\nYou must also add it to your project's control file, like so\n\n```control\nDepends: mobilesubstrate, com.dcproducts.libdcweather\n```\n\nThen you can import the library into your tweak and start using it\n\n```objc\n#import \u003clibDCWeather.h\u003e\n```\n\n## Usage\n\nThere are two ways to initialize the library. You can either use the shared instance or create a new instance, depending on your needs.\n\n```objc\n// Shared instance\nDCWeather *weather = [DCWeather sharedInstance];\n```\n\n```objc\n// New instance\nDCWeather *weather = [[DCWeather alloc] init];\n```\n\n### Setting the auto-update interval\n\nThere are three ways to set the auto-update interval. The default is 5 minutes, but you can either set it to a specific number of seconds, minutes, or hours.\n\n```objc\n// Seconds\n[weather setAutoUpdateInvervalInSeconds:30];\n\n// Minutes\n[weather setAutoUpdateInvervalInMinutes:5];\n\n// Hours\n[weather setAutoUpdateInvervalInHours:1];\n```\n\n### Setting the distance threshold\n\nYou can set the distance threshold to consider the location as changed. The default is 1 mile, but you can change it to your liking.\n\n```objc\n// Meters\n[weather setDistanceThresholdToConsiderLocationChangeInMeters:100];\n\n// Kilometers\n[weather setDistanceThresholdToConsiderLocationChangeInKilometers:1];\n\n// Feet\n[weather setDistanceThresholdToConsiderLocationChangeInFeet:500];\n\n// Yards\n[weather setDistanceThresholdToConsiderLocationChangeInYards:250];\n\n// Miles\n[weather setDistanceThresholdToConsiderLocationChangeInMiles:2];\n```\n\n### Setting the severe weather alerts support\n\nYou can choose whether to support severe weather alerts. This applies to both condition strings and images. The default is NO but you can change it to YES if you wish to support severe weather alerts.\n\n```objc\n[weather conditionIncludesSevereWeather:YES];\n```\n\n### Setting the temperature unit\n\nYou can set the temperature unit to either Celsius, Fahrenheit, or Kelvin. The default is the user's preferred unit, but you can change it to your liking.\n\n```objc\n// To set it to Celsius\n[weather setTemperatureUnit:Celsius];\n\n// To set it to Fahrenheit\n[weather setTemperatureUnit:Fahrenheit];\n\n// To set it to Kelvin\n[weather setTemperatureUnit:Kelvin];\n```\n\n### Setting the speed unit\n\nYou can set the speed unit to either kilometers per hour or miles per hour. The default is the user's preferred unit, but you can change it to your liking.\n\n```objc\n// To set it to kilometers per hour\n[weather setSpeedUnit:KilometersPerHour];\n\n// To set it to miles per hour\n[weather setSpeedUnit:MilesPerHour];\n```\n\n### Forcing a weather update\n\nWeather will automatically update based on the auto-update interval you set. However, if you wish to force a weather update, you can do so at any point by calling the following method.\n\n```objc\n[weather requestRefresh];\n```\n\n### How to get current temperature string\n\n```objc\nNSString *temperature = [weather temperatureString];\n```\n\n### How to get current temperature\n\n```objc\ndouble temperature = [weather temperature];\n```\n\n### How to get current feels like temperature string\n\n```objc\nNSString *feelsLikeTemperature = [weather feelsLikeTemperatureString];\n```\n\n### How to get current feels like temperature\n\n```objc\ndouble feelsLikeTemperature = [weather feelsLikeTemperature];\n```\n\n### How to get the current condition string\n\n```objc\nNSString *condition = [weather conditionString];\n```\n\n### How to get the current condition image\n\n```objc\nUIImage *conditionImage = [weather conditionImage];\n```\n\n### How to get the current wind speed string\n\n```objc\nNSString *windSpeed = [weather windSpeedString];\n```\n\n### How to get the current wind speed\n\n```objc\ndouble windSpeed = [weather windSpeed];\n```\n\n### How to get the current wind direction string\n\n```objc\nNSString *windDirection = [weather windDirectionString];\n```\n\n### How to get the current city string\n\n```objc\nNSString *city = [weather cityString];\n```\n\n### How to listen for updates\n\nYou can listen for updates by adding an observer to the default notification center. Currently, you can listen for the temperature, feels like temperature, location, condition, wind speed, and wind direction changes.\n\n```objc\n// Assuming you wish to invoke the weatherChanged method when the weather changes\n[[NSNotificationCenter defaultCenter] addObserver:self\n                                      selector:@selector(weatherChanged)\n                                      name:@\"kDCWeatherChange\"\n                                      object:nil];\n\n// Assuming you wish to invoke the temperatureChanged method when the temperature changes\n[[NSNotificationCenter defaultCenter] addObserver:self\n                                      selector:@selector(temperatureChanged)\n                                      name:@\"kDCWeatherTemperatureChange\"\n                                      object:nil];\n\n// Assuming you wish to invoke the feelsLikeTemperatureChanged method when the feels like temperature changes\n[[NSNotificationCenter defaultCenter] addObserver:self\n                                      selector:@selector(feelsLikeTemperatureChanged)\n                                      name:@\"kDCWeatherFeelsLikeTemperatureChange\"\n                                      object:nil];\n\n// Assuming you wish to invoke the locationChanged method when the location changes\n[[NSNotificationCenter defaultCenter] addObserver:self\n                                      selector:@selector(locationChanged)\n                                      name:@\"kDCWeatherLocationChange\"\n                                      object:nil];\n\n// Assuming you wish to invoke the conditionChanged method when the condition changes\n[[NSNotificationCenter defaultCenter] addObserver:self\n                                      selector:@selector(conditionChanged)\n                                      name:@\"kDCWeatherConditionChange\"\n                                      object:nil];\n\n// Assuming you wish to invoke the windSpeedChanged method when the wind speed changes\n[[NSNotificationCenter defaultCenter] addObserver:self\n                                      selector:@selector(windSpeedChanged)\n                                      name:@\"kDCWeatherWindSpeedChange\"\n                                      object:nil];\n\n// Assuming you wish to invoke the windDirectionChanged method when the wind direction changes\n[[NSNotificationCenter defaultCenter] addObserver:self\n                                      selector:@selector(windDirectionChanged)\n                                      name:@\"kDCWeatherWindDirectionChange\"\n                                      object:nil];\n```\n\n## Donations\n\nIf you like the project and wish to support my work, please consider donating. Your support is greatly appreciated.\n\n\u003ca href=\"https://www.buymeacoffee.com/dtcalabro\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" width=\"200\" height=\"auto\" alt=\"BuyMeACoffee Logo\"\u003e\u003c/a\u003e\n\n## Credits\n\nDeveloped and maintained by [dtcalabro](https://github.com/dtcalabro)\n\n## License\n\n- libDCWeather is available under the GPLv3 license. See the [LICENSE](LICENSE) file for more info.\n- __Please don't steal my work!__ I spent a lot of time making this come to life, so if you wish to use this library in your project, please give credit where credit is due.\n\n## Submit Bugs or Fixes\n\n\u003chttps://github.com/dtcalabro/libDCWeather/issues\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdtcalabro%2Flibdcweather","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdtcalabro%2Flibdcweather","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdtcalabro%2Flibdcweather/lists"}