Skip to content

Commit

Permalink
Merge pull request #8 from liu044100/develop
Browse files Browse the repository at this point in the history
use https for wunderground api
  • Loading branch information
liu044100 authored Jan 8, 2017
2 parents fb46009 + 4abf486 commit b37b8df
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 14 deletions.
9 changes: 0 additions & 9 deletions SmileWeather-Example/SmileWeather-Example/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,6 @@
<key>NSTemporaryExceptionMinimumTLSVersion</key>
<string>TLSv1.1</string>
</dict>
<key>wunderground.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSTemporaryExceptionMinimumTLSVersion</key>
<string>TLSv1.1</string>
</dict>
</dict>
</dict>
<key>SmileWeather</key>
Expand Down
2 changes: 2 additions & 0 deletions SmileWeather-Example/SmileWeather-Example/ViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ - (void)viewDidLoad {
_demoVC = [SmileWeatherDemoVC DemoVCToView:self.containerView];
_demoVC.delegate = self;
_demoVC.fahrenheit = [_userDefaults boolForKey:kIsFahrenheit];
//customize tint color
//_demoVC.higlightedInterfaceColor = [UIColor brownColor];

//get weather data
[self getWeatherData];
Expand Down
2 changes: 1 addition & 1 deletion SmileWeather.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "SmileWeather"
s.version = "0.2.2"
s.version = "0.2.3"
s.summary = "A library for Search & Parse the weather data from Wunderground conveniently."
s.description = <<-DESC
1. Handle all complicated things about Search & Parse the weather data.
Expand Down
6 changes: 3 additions & 3 deletions SmileWeather/Classes/SmileWeatherDemoVC.m
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,8 @@ -(void)updateUI{

self.conditionsLabel.text = self.data.currentData.condition;
self.loading = NO;

self.tempUnitsSegmentControl.tintColor = self.higlightedInterfaceColor;
}

#pragma mark <UICollectionViewDataSource>
Expand Down Expand Up @@ -355,11 +357,9 @@ -(void)configureForForecastCell:(UICollectionViewCell*)cell atIndexPath:(NSIndex
UILabel *lowTempLabel = (UILabel*)[cell viewWithTag:400];

if (self.nightMode) {
weekLabel.textColor = self.mainInterfaceNightModeColor;
weatherLabel.textColor = self.mainInterfaceNightModeColor;
highTempLabel.textColor = self.mainInterfaceNightModeColor;
} else {
weekLabel.textColor = self.mainInterfaceColor;
weatherLabel.textColor = self.mainInterfaceColor;
highTempLabel.textColor = self.mainInterfaceColor;
}
Expand All @@ -380,7 +380,7 @@ -(void)configureForForecastCell:(UICollectionViewCell*)cell atIndexPath:(NSIndex
if (self.nightMode){
weekLabel.textColor = self.mainInterfaceNightModeColor;
}else{
weekLabel.textColor = self.mainInterfaceColor;
weekLabel.textColor = [UIColor whiteColor];
}
weekLabel.layer.cornerRadius = 3;
weekLabel.layer.masksToBounds = YES;
Expand Down
2 changes: 1 addition & 1 deletion SmileWeather/Classes/SmileWeatherDownLoader.m
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ -(NSURL*)urlForLocation:(CLLocation *)location {

NSString *lang = [[SmileWeatherDownLoader sharedDownloader] preferedLanguage];

static NSString *baseURL_wunderground = @"http://api.wunderground.com/api/";
static NSString *baseURL_wunderground = @"https://api.wunderground.com/api/";
NSString *parameters_wunderground = [NSString stringWithFormat:@"/forecast/conditions/astronomy/hourly/lang:%@/q/",lang];
CLLocationCoordinate2D coordinates = location.coordinate;
requestURL = [NSString stringWithFormat:@"%@%@%@%f,%f.json", baseURL_wunderground, self.key, parameters_wunderground, coordinates.latitude, coordinates.longitude];
Expand Down

0 comments on commit b37b8df

Please sign in to comment.