diff --git a/SwiftPMExample/Package/Sources/Blog/Blog.swift b/SwiftPMExample/Package/Sources/Blog/Blog.swift index a8c1305..81922c1 100644 --- a/SwiftPMExample/Package/Sources/Blog/Blog.swift +++ b/SwiftPMExample/Package/Sources/Blog/Blog.swift @@ -15,6 +15,6 @@ public struct Blog: View { struct Blog_Previews: PreviewProvider { static var previews: some View { - Blog(url: .init(string: "https://blog.iosdc.jp")!) + Blog(url: URL(string: "https://blog.iosdc.jp")!) } } diff --git a/SwiftPMExample/Package/Sources/BlogLinks/BlogLinks.swift b/SwiftPMExample/Package/Sources/BlogLinks/BlogLinks.swift index 415700b..50a7805 100644 --- a/SwiftPMExample/Package/Sources/BlogLinks/BlogLinks.swift +++ b/SwiftPMExample/Package/Sources/BlogLinks/BlogLinks.swift @@ -15,7 +15,7 @@ public struct BlogLinks: View { struct BlogLinks_Previews: PreviewProvider { static var previews: some View { - BlogLinks(url: .init(string: "https://fortee.jp/iosdc-japan-2021/blog-link")!) + BlogLinks(url: URL(string: "https://fortee.jp/iosdc-japan-2021/blog-link")!) } } diff --git a/SwiftPMExample/Package/Sources/Build/Build.swift b/SwiftPMExample/Package/Sources/Build/Build.swift index 3d16dc9..63fd3bd 100644 --- a/SwiftPMExample/Package/Sources/Build/Build.swift +++ b/SwiftPMExample/Package/Sources/Build/Build.swift @@ -18,31 +18,31 @@ public extension Build { static var live = Self( eventbriteURL: { let url = Bundle.main.infoDictionary!["Eventbrite URL"] as! String - return .init(string: url)! + return URL(string: url)! }, iOSDCJapanWebURL: { let url = Bundle.main.infoDictionary!["iOSDC JAPAN URL"] as! String - return .init(string: url)! + return URL(string: url)! }, sponsorURL: { let url = Bundle.main.infoDictionary!["Sponsor URL"] as! String - return .init(string: url)! + return URL(string: url)! }, bloglinkURL: { let url = Bundle.main.infoDictionary!["Bloglink URL"] as! String - return .init(string: url)! + return URL(string: url)! }, timetableURL: { let url = Bundle.main.infoDictionary!["Timetable URL"] as! String - return .init(string: url)! + return URL(string: url)! }, blogURL: { let url = Bundle.main.infoDictionary!["Blog URL"] as! String - return .init(string: url)! + return URL(string: url)! } ) static var none = Self( - eventbriteURL: { .init(string: "https://")! }, - iOSDCJapanWebURL: { .init(string: "https://")! }, - sponsorURL: { .init(string: "https://")! }, - bloglinkURL: { .init(string: "https://")! }, - timetableURL: { .init(string: "https://")! }, - blogURL: { .init(string: "https://")! } + eventbriteURL: { URL(string: "https://")! }, + iOSDCJapanWebURL: { URL(string: "https://")! }, + sponsorURL: { URL(string: "https://")! }, + bloglinkURL: { URL(string: "https://")! }, + timetableURL: { URL(string: "https://")! }, + blogURL: { URL(string: "https://")! } ) } diff --git a/SwiftPMExample/Package/Sources/Home/Home.swift b/SwiftPMExample/Package/Sources/Home/Home.swift index c7cd8b0..a459d18 100644 --- a/SwiftPMExample/Package/Sources/Home/Home.swift +++ b/SwiftPMExample/Package/Sources/Home/Home.swift @@ -78,8 +78,8 @@ struct PrimaryButtonStyle: ButtonStyle { func makeBody(configuration: Configuration) -> some View { #if os(macOS) - configuration.label - .font(.body.bold()) + return configuration.label + .font(Font.body.bold()) .foregroundColor(.init(.windowBackgroundColor)) .opacity(configuration.isPressed ? 0.2 : 1.0) .padding() @@ -90,8 +90,8 @@ struct PrimaryButtonStyle: ButtonStyle { .cornerRadius(4.0) .shadow(color: Color(.labelColor).opacity(0.12), radius: 20, x: 0, y: 6) #else - configuration.label - .font(.body.bold()) + return configuration.label + .font(Font.body.bold()) .foregroundColor(.init(.systemBackground)) .opacity(configuration.isPressed ? 0.2 : 1.0) .padding() diff --git a/SwiftPMExample/Package/Sources/Setting/Setting.swift b/SwiftPMExample/Package/Sources/Setting/Setting.swift index eab3430..5f7bb29 100644 --- a/SwiftPMExample/Package/Sources/Setting/Setting.swift +++ b/SwiftPMExample/Package/Sources/Setting/Setting.swift @@ -11,7 +11,7 @@ public struct Setting: View { NavigationView { List { NavigationLink("Sign in fortee", destination: - WebView(request: .init(url: .init(string: "https://fortee.jp/login")!), configuration: .init()) + WebView(request: .init(url: URL(string: "https://fortee.jp/login")!), configuration: .init()) ) } .navigationTitle("Settings") diff --git a/SwiftPMExample/Package/Sources/Sponsor/Sponsor.swift b/SwiftPMExample/Package/Sources/Sponsor/Sponsor.swift index 16143b0..3637976 100644 --- a/SwiftPMExample/Package/Sources/Sponsor/Sponsor.swift +++ b/SwiftPMExample/Package/Sources/Sponsor/Sponsor.swift @@ -15,7 +15,7 @@ public struct Sponsor: View { struct Sponsor_Previews: PreviewProvider { static var previews: some View { - Sponsor(url: .init(string: "https://iosdc.jp/2021/sponsor.html")!) + Sponsor(url: URL(string: "https://iosdc.jp/2021/sponsor.html")!) } } diff --git a/SwiftPMExample/Package/Sources/TimeTable/Timetable.swift b/SwiftPMExample/Package/Sources/TimeTable/Timetable.swift index df7228d..6290f00 100644 --- a/SwiftPMExample/Package/Sources/TimeTable/Timetable.swift +++ b/SwiftPMExample/Package/Sources/TimeTable/Timetable.swift @@ -18,7 +18,7 @@ public struct Timetable: View { struct Timetable_Previews: PreviewProvider { static var previews: some View { - Timetable(url: .init(string: "https://fortee.jp/iosdc-japan-2021/timetable")!) + Timetable(url: URL(string: "https://fortee.jp/iosdc-japan-2021/timetable")!) } }