forked from d-date/SwiftPMProjectExample
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBuild.swift
48 lines (40 loc) · 1.5 KB
/
Build.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import Foundation
public struct Build {
public var eventbriteURL: () -> URL
public var iOSDCJapanWebURL: () -> URL
public var sponsorURL: () -> URL
public var bloglinkURL: () -> URL
public var timetableURL: () -> URL
public var blogURL: () -> URL
}
public extension Build {
static var live = Self(
eventbriteURL: {
let url = Bundle.main.infoDictionary!["Eventbrite URL"] as! String
return URL(string: url)!
}, iOSDCJapanWebURL: {
let url = Bundle.main.infoDictionary!["iOSDC JAPAN URL"] as! String
return URL(string: url)!
}, sponsorURL: {
let url = Bundle.main.infoDictionary!["Sponsor URL"] as! String
return URL(string: url)!
}, bloglinkURL: {
let url = Bundle.main.infoDictionary!["Bloglink URL"] as! String
return URL(string: url)!
}, timetableURL: {
let url = Bundle.main.infoDictionary!["Timetable URL"] as! String
return URL(string: url)!
}, blogURL: {
let url = Bundle.main.infoDictionary!["Blog URL"] as! String
return URL(string: url)!
}
)
static var none = Self(
eventbriteURL: { URL(string: "https://")! },
iOSDCJapanWebURL: { URL(string: "https://")! },
sponsorURL: { URL(string: "https://")! },
bloglinkURL: { URL(string: "https://")! },
timetableURL: { URL(string: "https://")! },
blogURL: { URL(string: "https://")! }
)
}