Skip to content

Commit 9c18f4a

Browse files
committed
Updated iOS example project
1 parent 3a307d5 commit 9c18f4a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Example/iOS Example/ViewController.swift

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
import UIKit
1010
import ForecastIO
11+
import CoreLocation
1112

1213
class ViewController: UIViewController {
1314

@@ -18,7 +19,8 @@ class ViewController: UIViewController {
1819
let client = DarkSkyClient(apiKey: "FAKE-API-KEY")
1920
client.units = .auto
2021
client.language = .english
21-
client.getForecast(latitude: 30, longitude: 30, excludeFields: [.alerts, .currently, .daily, .flags, .minutely]) { result in
22+
let loc = CLLocationCoordinate2D(latitude: 30, longitude: 30)
23+
client.getForecast(location: loc, excludeFields: [.alerts, .currently, .daily, .flags, .minutely]) { result in
2224
switch result {
2325
case .success(let forecast, let requestMetadata):
2426
print(forecast.hourly!.data)

0 commit comments

Comments
 (0)